|
| 1 | +/* |
| 2 | + * AlgorithmsToLaTeX.java Copyright (C) 2024 Daniel H. Huson |
| 3 | + * |
| 4 | + * (Some files contain contributions from other authors, who are then mentioned separately.) |
| 5 | + * |
| 6 | + * This program is free software: you can redistribute it and/or modify |
| 7 | + * it under the terms of the GNU General Public License as published by |
| 8 | + * the Free Software Foundation, either version 3 of the License, or |
| 9 | + * (at your option) any later version. |
| 10 | + * |
| 11 | + * This program is distributed in the hope that it will be useful, |
| 12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | + * GNU General Public License for more details. |
| 15 | + * |
| 16 | + * You should have received a copy of the GNU General Public License |
| 17 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 18 | + */ |
| 19 | + |
| 20 | +package splitstree6.xtra.latex; |
| 21 | + |
| 22 | +import splitstree6.algorithms.AlgorithmList; |
| 23 | +import splitstree6.workflow.DataTaxaFilter; |
| 24 | +import splitstree6.workflow.interfaces.DoNotLoadThisAlgorithm; |
| 25 | + |
| 26 | +import java.util.TreeSet; |
| 27 | + |
| 28 | +/** |
| 29 | + * outputs a LaTeX document containing a description of all algorithms |
| 30 | + * Daniel Huson, 3.2024 |
| 31 | + */ |
| 32 | +public class ExtractReferences { |
| 33 | + public static void main(String[] args) { |
| 34 | + var set = new TreeSet<String>(); |
| 35 | + |
| 36 | + for (var algorithm : AlgorithmList.list()) { |
| 37 | + if (!(algorithm instanceof DataTaxaFilter || algorithm instanceof DoNotLoadThisAlgorithm)) { |
| 38 | + |
| 39 | + |
| 40 | + var citations = algorithm.getCitation(); |
| 41 | + if (citations != null && !citations.isBlank()) { |
| 42 | + var pos = citations.indexOf(";"); |
| 43 | + if (pos > 0) |
| 44 | + citations = citations.substring(pos + 1); |
| 45 | + set.add(citations); |
| 46 | + } |
| 47 | + } |
| 48 | + } |
| 49 | + |
| 50 | + for (var line : set) { |
| 51 | + System.out.println("\n- " + line); |
| 52 | + } |
| 53 | + |
| 54 | + |
| 55 | + } |
| 56 | +} |
0 commit comments