Skip to content

Commit

Permalink
close #34
Browse files Browse the repository at this point in the history
  • Loading branch information
sjPlot committed Oct 13, 2015
1 parent 4dd5f36 commit c2618e7
Show file tree
Hide file tree
Showing 13 changed files with 251 additions and 48 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ Ausführliche Anleitungen zu den verschiedenen Funktionen gibt es [in der Wiki](
* In der Registerkarte _Überschriften_ werden jetzt Zettel als Ausgangsfolgezettel oder Folgezettel markiert ([#96](https://github.com/sjPlot/Zettelkasten/issues/96)). Die Sortierung der Spalte _Folgezettel_ in der Registerkarte _Überschriften_ ist per Voreinstellung deakitiviert, da der erstmalige Aufbau der Tabelle länger dauern kann. Die Sortierung kann in den Einstellungen _Tabellen und Listen_ aktiviert werden.
* Der Export von Zetteln ins Markdown-, Text- und LaTex-Format kann jetzt auch jeden Zettel als einzelne Datei exportieren ([#13](https://github.com/sjPlot/Zettelkasten/issues/13) und [#77](https://github.com/sjPlot/Zettelkasten/issues/77)).
* Beim Export ins Markdown-, Text- und LaTex-Format werden Fußnoten durch formatierte Autorenangaben ersetzt (sofern die Literatur mit Bibkey verknüpft ist).
* Im englischen Interface wurden _trails_ in _note sequences_ und _entry_ in _note_ umbenannt.
* Literaturfußnoten können jetzt auch den Bibkey statt der Nummer des Literatureintrags enthalten (`[fn luhsozsys:123]` würde z.B. umgewandelt in `Luhmann 1984: 123`).
* Das automatische Einklammern von Literaturfußnoten kann in den Einstellungen abgestellt werden ([#91](https://github.com/sjPlot/Zettelkasten/issues/91)).
* Über das Menü _Suchen_ (Untermenü _Zettel_) können jetzt Zettel gesucht werden, die Teil einer Folgezettelsequenz sind (entweder Ausgangs- oder Folgezettel).
* Über das Menü _Suchen_ (Untermenü _Zettel_) können jetzt Zettel gesucht werden, die _keine_ Querverweise enthalten (und auf die nicht durch Querverweise verwiesen wird) ([#34](https://github.com/sjPlot/Zettelkasten/issues/34)).
* Literatur, die während der Neueingabe oder Bearbeiten eines Zettels als Literaturfußnote im Text referenziert wird, wird beim Beenden der Eingabe automatisch als Autorenangabe zum Zettel hinzugefügt, falls dies noch nicht geschehen ist.
* Verbesserte Stabilität aller Lese- und Schreib-Operationen von Daten (Import, Export, Laden, Speichern, Auto-Backup...).
* Geschwindigkeitsverbesserungen der Suchfunktionen ([#95](https://github.com/sjPlot/Zettelkasten/issues/95)).
* Im englischen Interface wurden _trails_ in _note sequences_ und _entry_ in _note_ umbenannt.
* Neue Einstellung, um Formatierungs-Tags bei einer Suche _nicht_ zu entfernen. Dadurch wird die Suchgeschwindigkeit erhöht, jedoch werden Wörter, die durch Formatierungen unterbrochen werden, nicht gefunden (eine Suche nach `Zettelkasten` findet dann nicht `[f]Zettel[/f]kasten`).

#### Behobene Fehler
Expand Down
21 changes: 21 additions & 0 deletions src/de/danielluedecke/zettelkasten/ZettelkastenView.form
Original file line number Diff line number Diff line change
Expand Up @@ -1936,11 +1936,32 @@
<Property name="name" type="java.lang.String" value="findEntriesWithRemarks" noResource="true"/>
</Properties>
</MenuItem>
<MenuItem class="javax.swing.JPopupMenu$Separator" name="jSeparator106">
<Properties>
<Property name="name" type="java.lang.String" value="jSeparator106" noResource="true"/>
</Properties>
</MenuItem>
<MenuItem class="javax.swing.JMenuItem" name="findEntriesWithoutManualLinks">
<Properties>
<Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor">
<action class="de.danielluedecke.zettelkasten.ZettelkastenView" id="findWithoutManualLinks" methodName="findWithoutManualLinks"/>
</Property>
<Property name="name" type="java.lang.String" value="findEntriesWithoutManualLinks" noResource="true"/>
</Properties>
</MenuItem>
<MenuItem class="javax.swing.JPopupMenu$Separator" name="jSeparator65">
<Properties>
<Property name="name" type="java.lang.String" value="jSeparator65" noResource="true"/>
</Properties>
</MenuItem>
<MenuItem class="javax.swing.JMenuItem" name="findEntriesAnyLuhmann">
<Properties>
<Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor">
<action class="de.danielluedecke.zettelkasten.ZettelkastenView" id="findLuhmannAny" methodName="findLuhmannAny"/>
</Property>
<Property name="name" type="java.lang.String" value="findEntriesAnyLuhmann" noResource="true"/>
</Properties>
</MenuItem>
<MenuItem class="javax.swing.JMenuItem" name="findEntriesTopLevelLuhmann">
<Properties>
<Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor">
Expand Down
35 changes: 34 additions & 1 deletion src/de/danielluedecke/zettelkasten/ZettelkastenView.java
Original file line number Diff line number Diff line change
Expand Up @@ -9965,12 +9965,28 @@ public void findWithRating() {
findEntryWithout(Constants.SEARCH_WITH_RATINGS);
}
/**
* Starts a search request and finds entries that have <i>not</i>been rated.
* Starts a search request and finds entries that have <i>not</i> been rated.
*/
@Action(enabledProperty = "moreEntriesAvailable")
public void findWithoutRating() {
findEntryWithout(Constants.SEARCH_WITHOUT_RATINGS);
}
/**
* Starts a search request and finds entries that have <i>no</i>
* manual links.
*/
@Action(enabledProperty = "moreEntriesAvailable")
public void findWithoutManualLinks() {
findEntryWithout(Constants.SEARCH_WITHOUT_MANUAL_LINKS);
}
/**
* Starts a search request and finds entries that are part of
* any note sequence.
*/
@Action(enabledProperty = "moreEntriesAvailable")
public void findLuhmannAny() {
findEntryWithout(Constants.SEARCH_IS_ANY_LUHMANN);
}
/**
* Starts a search request and finds entries that are top-level
* trailing entries (follower).
Expand Down Expand Up @@ -11587,7 +11603,10 @@ public String getToolTipText(MouseEvent evt) {
jSeparator75 = new javax.swing.JSeparator();
findEntriesWithoutRemarks = new javax.swing.JMenuItem();
findEntriesWithRemarks = new javax.swing.JMenuItem();
jSeparator106 = new javax.swing.JPopupMenu.Separator();
findEntriesWithoutManualLinks = new javax.swing.JMenuItem();
jSeparator65 = new javax.swing.JPopupMenu.Separator();
findEntriesAnyLuhmann = new javax.swing.JMenuItem();
findEntriesTopLevelLuhmann = new javax.swing.JMenuItem();
jSeparator110 = new javax.swing.JSeparator();
findEntriesWithRatings = new javax.swing.JMenuItem();
Expand Down Expand Up @@ -13036,9 +13055,20 @@ public boolean isCellEditable(int rowIndex, int columnIndex) {
findEntriesWithRemarks.setName("findEntriesWithRemarks"); // NOI18N
findEntryWithout.add(findEntriesWithRemarks);

jSeparator106.setName("jSeparator106"); // NOI18N
findEntryWithout.add(jSeparator106);

findEntriesWithoutManualLinks.setAction(actionMap.get("findWithoutManualLinks")); // NOI18N
findEntriesWithoutManualLinks.setName("findEntriesWithoutManualLinks"); // NOI18N
findEntryWithout.add(findEntriesWithoutManualLinks);

jSeparator65.setName("jSeparator65"); // NOI18N
findEntryWithout.add(jSeparator65);

findEntriesAnyLuhmann.setAction(actionMap.get("findLuhmannAny")); // NOI18N
findEntriesAnyLuhmann.setName("findEntriesAnyLuhmann"); // NOI18N
findEntryWithout.add(findEntriesAnyLuhmann);

findEntriesTopLevelLuhmann.setAction(actionMap.get("findLuhmannParent")); // NOI18N
findEntriesTopLevelLuhmann.setName("findEntriesTopLevelLuhmann"); // NOI18N
findEntryWithout.add(findEntriesTopLevelLuhmann);
Expand Down Expand Up @@ -14622,6 +14652,7 @@ private void initViewMenuLinks() {
private javax.swing.JMenuItem exportMenuItem;
private javax.swing.JMenu fileMenu;
private javax.swing.JMenuItem findDoubleEntriesItem;
private javax.swing.JMenuItem findEntriesAnyLuhmann;
private javax.swing.JMenuItem findEntriesFromCreatedTimestamp;
private javax.swing.JMenuItem findEntriesFromEditedTimestamp;
private javax.swing.JMenuItem findEntriesTopLevelLuhmann;
Expand All @@ -14630,6 +14661,7 @@ private void initViewMenuLinks() {
private javax.swing.JMenuItem findEntriesWithRemarks;
private javax.swing.JMenuItem findEntriesWithoutAuthors;
private javax.swing.JMenuItem findEntriesWithoutKeywords;
private javax.swing.JMenuItem findEntriesWithoutManualLinks;
private javax.swing.JMenuItem findEntriesWithoutRatings;
private javax.swing.JMenuItem findEntriesWithoutRemarks;
private javax.swing.JMenu findEntryKeywordsMenu;
Expand Down Expand Up @@ -14713,6 +14745,7 @@ private void initViewMenuLinks() {
private javax.swing.JSeparator jSeparator103;
private javax.swing.JSeparator jSeparator104;
private javax.swing.JSeparator jSeparator105;
private javax.swing.JPopupMenu.Separator jSeparator106;
private javax.swing.JSeparator jSeparator107;
private javax.swing.JPopupMenu.Separator jSeparator108;
private javax.swing.JSeparator jSeparator109;
Expand Down
73 changes: 72 additions & 1 deletion src/de/danielluedecke/zettelkasten/database/Daten.java
Original file line number Diff line number Diff line change
Expand Up @@ -3942,7 +3942,7 @@ public int[] getLuhmannNumbersAsInteger(int pos) {
*
* @param pos the position of the entry which manual links we want to have
* @return an integer array containing the entry-numbers where the current
* entry refers to, or null if no entry-numbers exist...
* entry refers to, or {@code null} if no entry-numbers exist...
*/
public int[] getManualLinks(int pos) {
// get Manual Links as String Array
Expand Down Expand Up @@ -7626,6 +7626,77 @@ public int[] getAllLuhmannNumbers(int zettelpos) {
return arr;
}

/**
* This method retrieves all notes (resp. their ID) in the Zettelkasten that are part of a
* note sequence, i.e. which are top level notes in a note sequence or
* which have sub-ordinated notes, and returns the index numbers as integer array.
* <br/><b>Caution!</b> The position {@code zettelpos} is a value from
* <b>1</b> to {@link #getCount(int) getCount()} - in contrary to usual
* array handling where the range is from 0 to (size-1).
*
* @return all note-IDs in the Zettelkasten that are part of a note sequence,
* as integer array
*/
public List<Integer> getAllLuhmannNumbers() {
List<Integer> luhmannNumbers = new ArrayList<>();
// iterate data base
for (int cnt = 1; cnt <= getCount(Daten.ZKNCOUNT); cnt++) {
// does entry have any followers / note sequences?
if (hasLuhmannNumbers(cnt)) {
// if yes, get all note sequences
int[] curnum = getLuhmannNumbersAsInteger(cnt);
// iterate all note sequence IDs
for (int cn : curnum) {
// check if we already added that ID
if (!luhmannNumbers.contains(cn)) {
// if not, add it now
luhmannNumbers.add(cn);
}
}
// now add the current "parent" note as well
if (!luhmannNumbers.contains(cnt)) {
// if not, add it now
luhmannNumbers.add(cnt);
}
}
}
// return result
return luhmannNumbers;
}

/**
* This method retrieves all notes (resp. their ID) in the Zettelkasten that are part of a
* note sequence, i.e. which are top level notes in a note sequence or
* which have sub-ordinated notes, and returns the index numbers as integer array.
* <br/><b>Caution!</b> The position {@code zettelpos} is a value from
* <b>1</b> to {@link #getCount(int) getCount()} - in contrary to usual
* array handling where the range is from 0 to (size-1).
*
* @return all note-IDs in the Zettelkasten that are part of a note sequence,
* as integer array
*/
public List<Integer> getAllManualLinks() {
List<Integer> manualLinkNumbers = new ArrayList<>();
// iterate data base
for (int cnt = 1; cnt <= getCount(Daten.ZKNCOUNT); cnt++) {
// get manual links
int[] curnum = getManualLinks(cnt);
// check if note has any manual links
if (curnum != null) {
// iterate all note sequence IDs
for (int cn : curnum) {
// check if we already added that ID
if (!manualLinkNumbers.contains(cn)) {
// if not, add it now
manualLinkNumbers.add(cn);
}
}
}
}
// return result
return manualLinkNumbers;
}

/**
* This method checks whether the entry {@code zettelpos} has follower /
* trails / luhmann numbers or not.
Expand Down
Loading

0 comments on commit c2618e7

Please sign in to comment.