first figure out how stuff works by manually creating fake anki cards and fake export files:
[x] GUID: try exporting notes with GUID field
updating fields works as expected
[x] GUID mixed file: what happens with mixed export files (some entries with GUID, some without GUID)? Does it work?
works. GUID must be empty string
[x] GUID + global tags: what happens to existing cards tags, when tags are defined globally in the export file?
global tags are just added on top of existing tags
but unexpectedly, when no field is changed, the note is skipped altogether and the tags aren't added. new tags aren't recognized as change. Global tags are even not applied, when custom row tags are added but no fields are changed. This behavior seems undeterministic. Don't rely on it.
[x] GUID + row tags: what happens to existing cards tags, when tags are defined for each item in the export file in a column?
row-tags override existing tags, even leech and marked
are added together with the global tags (at least in case a field is changed)
when a tags column is defined in the file header (e.g #tags column:2), tags must be filled or are deleted
[x] GUID + mixed tags: what happens to existing cards tags, when tags are defined globally AND per row? how do they interfere with each other?
yes, see above. they interfere in an unforeseeable behavior.
[x] Anki import methods: try different import mechanisms in Anki: update and preserve
updating via GUID is skipped in preserve mode. update mode required.
Conclusion:
for the beginning create separate Note Creation (preserve mode) and Note Update (update mode) export files! When my app becomes stable, it might be safe to have a single file and always use Ankis update import mode.
neither import nor export the tags per note. Just use global tags. Adding global tags on top of existing tags is exactly what's required.
depending on the outcome of the above, update the import and export process:
[ ] Export GUID
[ ] Split export into 2 categories: Create and Update? Needed if we use two different import methods in Anki.
[x] Add Tags to AnkiCards and their Views -> no custom tag management in the app necessary
[x] Add Tags to VocabItems and their Views -> no custom tag management in the app necessary
[x] Import Tags and apply them to VocabItems -> no custom tag management in the app necessary
[x] Export Tags -> no custom tag management in the app necessary
Final Goal:
[ ] have a review process like for the imports, which allows to review changes compared to the latest imported anki file and mark individual items for export.
[ ] somehow compare timestamps of anki import with latest change, to see which items which have been changed since the last import. it may still make sense to offer reviews and export for the other items, since Anki cards may still change without a VocabItem beeing touched, e.g. when the auto-notes format changed.
as exporting new items works already and exporting updates of existing items isn't very important, the value of this issue is downgraded and the rest of the issue can be done later.
first figure out how stuff works by manually creating fake anki cards and fake export files:
#tags column:2
), tags must be filled or are deletedConclusion:
depending on the outcome of the above, update the import and export process:
Add Tags to AnkiCards and their Views-> no custom tag management in the app necessaryAdd Tags to VocabItems and their Views-> no custom tag management in the app necessaryImport Tags and apply them to VocabItems-> no custom tag management in the app necessaryExport Tags-> no custom tag management in the app necessaryFinal Goal:
related to:
55