Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the manual for (.csv and .txt import export) #133

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

kimaya000
Copy link

@kimaya000 kimaya000 commented May 6, 2024

Tried to be articulate about the procedure for import and export of .txt and .csv files. Further criticism will be helpful!

Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Sorry for the delay, life's been busy

manual.asc Outdated
* When the "Match Notes" field is set to "Notetype," Anki flags a duplicate if another note with the same notetype shares the same first field. However, when "Notetype and Deck" is selected, duplicates are only flagged if the existing note is also present in the deck you are importing into. This distinction ensures precise duplicate identification based on your import preferences.
* In the last 'Field Matching', you can choose which field in the file you uploaded can be set as the front, back and tags of the flashcards.

The procedure on Desktop Anki is the same. The import option can be found on the bottom right button of the homepage or can be accessed on the File tab and selected from there.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be useful to link to the Desktop manual

manual.asc Outdated
=== Exporting in .txt format
On AnkiDroid:
* Click on the three dots button on the top right corner and choose 'Export...'
* In the export format, choose either 'Notes in Plain Txt' or 'Cards in Plain Txt'.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and in other places

Suggested change
* In the export format, choose either 'Notes in Plain Txt' or 'Cards in Plain Txt'.
* In the export format, choose either 'Notes in Plain Text' or 'Cards in Plain Text'.

manual.asc Outdated
On AnkiDroid:
* Click on the three dots button on the top right corner and choose 'Export...'
* In the export format, choose either 'Notes in Plain Txt' or 'Cards in Plain Txt'.
* In 'Notes in Plain Txt', you can choose if you want to include HTML and media references, tags, deck names, notetype name and unique identifier.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* In 'Notes in Plain Txt', you can choose if you want to include HTML and media references, tags, deck names, notetype name and unique identifier.
* In 'Notes in Plain Txt', you can choose if you want to include HTML and media references, tags, deck names, notetype name and unique identifiers.

manual.asc Outdated
* In 'Notes in Plain Txt', you can choose if you want to include HTML and media references, tags, deck names, notetype name and unique identifier.
* In 'Cards in Plain Txt', you choose if you want to include HTML and media references or not.

The procedure is the same on Anki Desktop. Th export option can be accessed from the File button, or by using shortcut CTRL + E.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The procedure is the same on Anki Desktop. Th export option can be accessed from the File button, or by using shortcut CTRL + E.
The procedure is the same on Anki Desktop. The export option can be accessed from the File button, or by using shortcut CTRL + E.

manual.asc Outdated
* In 'Notes in Plain Txt', you can choose if you want to include HTML and media references, tags, deck names, notetype name and unique identifier.
* In 'Cards in Plain Txt', you choose if you want to include HTML and media references or not.

The procedure is the same on Anki Desktop. Th export option can be accessed from the File button, or by using shortcut CTRL + E.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The procedure is the same on Anki Desktop. Th export option can be accessed from the File button, or by using shortcut CTRL + E.
The procedure is the same on Anki Desktop. Th export option can be accessed from the File button, or by the shortcut CTRL + E.

manual.asc Outdated
* In 'Notes in Plain Txt', you can choose if you want to include HTML and media references, tags, deck names, notetype name and unique identifier.
* In 'Cards in Plain Txt', you choose if you want to include HTML and media references or not.

The procedure is the same on Anki Desktop. Th export option can be accessed from the File button, or by using shortcut CTRL + E.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The procedure is the same on Anki Desktop. Th export option can be accessed from the File button, or by using shortcut CTRL + E.
The procedure is the same on Anki Desktop. Th export option can be accessed from the File button, or by using shortcut kbd:[Ctrl+E].

manual.asc Outdated

=== Exporting in .txt format
On AnkiDroid:
* Click on the three dots button on the top right corner and choose 'Export...'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not always on the right side

Suggested change
* Click on the three dots button on the top right corner and choose 'Export...'
* Click on the menu dots button on the app bar and choose 'Export...'

manual.asc Outdated
@@ -562,6 +562,23 @@ This is not officially supported, but `.anki2` files can manually be imported if
* (If applicable) Temporarily log out of your AnkiWeb account: `Settings - AnkiDroid - AnkiWeb account`
* Open `Settings - Advanced - AnkiDroid Directory` and set the AnkiDroid Directory to the newly created folder.

== Importing Comma-seperated Value files and Text files (.txt, .csv)
Anki now supports the import of .csv and .txt files. The procedure for it on AnkiDroid is as follows:
* Click the three dots on the upper right hand corner.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto - not always right side

* Choose the file from your folders when prompted and click OK
* In case of .csv, the seperator will be autoselected as comma, but you can choose a suitable seperator for your .txt file from Tab, Pipe, Semicolon, Colon, Comma and Space
* If you want HTML to be allowed in the fields, turn the button on.
* In the 'Import options' section, first pick the notetype from options 'Basic', 'Basic (and reversed card)', 'Basic (optional reversed card)', 'Basic (type in the answer)', 'Cloze' and 'Image Occlusion'.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a fixed list

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi, what should i change here? i'm sorry if it's a very trivial question

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list of Note Types which a user has is variable.

Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rough rewrite, needs some tweaking

* Choose the file from your folders when prompted and click OK
* In case of .csv, the seperator will be autoselected as comma, but you can choose a suitable seperator for your .txt file from Tab, Pipe, Semicolon, Colon, Comma and Space
* If you want HTML to be allowed in the fields, turn the button on.
* In the 'Import options' section, first pick the notetype from options 'Basic', 'Basic (and reversed card)', 'Basic (optional reversed card)', 'Basic (type in the answer)', 'Cloze' and 'Image Occlusion'.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list of Note Types which a user has is variable.

Comment on lines +581 to +595
== Importing Comma-seperated Value files and Text files (.txt, .csv)
Anki now supports the import of .csv and .txt files. The procedure for it on AnkiDroid is as follows:
* Click the three dots on the app bar.
* Choose Import
* Choose 'Text file (.txt, .csv)'
* Choose the file from your folders when prompted and click OK
* In case of .csv, the seperator will be autoselected as comma, but you can choose a suitable seperator for your .txt file from Tab, Pipe, Semicolon, Colon, Comma and Space
* If you want HTML to be allowed in the fields, turn the button on.
* In the 'Import options' section, first pick the notetype from options 'Basic', 'Basic (and reversed card)', 'Basic (optional reversed card)', 'Basic (type in the answer)', 'Cloze' and 'Image Occlusion'.
* Then, select the deck that you want to put the new cards in. 'Default' makes a new deck called Default.
* In the existing notes section, pick if you want to preserve the old notes, update them or duplicate them.
* When the "Match Notes" field is set to "Notetype," Anki flags a duplicate if another note with the same notetype shares the same first field. However, when "Notetype and Deck" is selected, duplicates are only flagged if the existing note is also present in the deck you are importing into. This distinction ensures precise duplicate identification based on your import preferences.
* In the last 'Field Matching', you can choose which field in the file you uploaded can be set as the front, back and tags of the flashcards.

The procedure on Desktop Anki is the same https://docs.ankiweb.net/importing/text-files.html. The import option can be found on the bottom right button of the homepage or can be accessed on the File tab and selected from there.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
== Importing Comma-seperated Value files and Text files (.txt, .csv)
Anki now supports the import of .csv and .txt files. The procedure for it on AnkiDroid is as follows:
* Click the three dots on the app bar.
* Choose Import
* Choose 'Text file (.txt, .csv)'
* Choose the file from your folders when prompted and click OK
* In case of .csv, the seperator will be autoselected as comma, but you can choose a suitable seperator for your .txt file from Tab, Pipe, Semicolon, Colon, Comma and Space
* If you want HTML to be allowed in the fields, turn the button on.
* In the 'Import options' section, first pick the notetype from options 'Basic', 'Basic (and reversed card)', 'Basic (optional reversed card)', 'Basic (type in the answer)', 'Cloze' and 'Image Occlusion'.
* Then, select the deck that you want to put the new cards in. 'Default' makes a new deck called Default.
* In the existing notes section, pick if you want to preserve the old notes, update them or duplicate them.
* When the "Match Notes" field is set to "Notetype," Anki flags a duplicate if another note with the same notetype shares the same first field. However, when "Notetype and Deck" is selected, duplicates are only flagged if the existing note is also present in the deck you are importing into. This distinction ensures precise duplicate identification based on your import preferences.
* In the last 'Field Matching', you can choose which field in the file you uploaded can be set as the front, back and tags of the flashcards.
The procedure on Desktop Anki is the same https://docs.ankiweb.net/importing/text-files.html. The import option can be found on the bottom right button of the homepage or can be accessed on the File tab and selected from there.
== Importing delimited files & text files (.csv, .tsv, .txt)
The 'Import' menu of the Deck Picker allows the import of text files. These files must be in the UTF-8 format, and in plain text (not .docx/.xlsx etc...)
It is typically best to use a spreadsheet program to export text files as a UTF-8 .csv, as this handles most complexities with formatting a file for use in AnkiDroid.
In order for a row in a text file to be converted to a list of fields, each field be separated by a **delimiter**. This is typically auto-detected by AnkiDroid, based on the first line of the file. In the following example, a semicolon is used as a delimiter: **Front;Back**.
After AnkiDroid detects the notes, and fields defined by the text file, the import dialog allows you to select how fields are mapped to a note type, and deck/tag preferences when importing.
Please see the https://docs.ankiweb.net/importing/text-files.html[Anki Desktop manual] for more information on the import dialog options.

Comment on lines +636 to +642
On AnkiDroid:
* Click on the menu dots button on the app bar and choose 'Export...'
* In the export format, choose either 'Notes in Plain Text' or 'Cards in Plain Text'.
* In 'Notes in Plain Text', you can choose if you want to include HTML and media references, tags, deck names, notetype name and unique identifiers.
* In 'Cards in Plain Text', you choose if you want to include HTML and media references or not.

The procedure is the same on Anki Desktop. The export option can be accessed from the File button, or by the shortcut kbd:[Ctrl+E].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
On AnkiDroid:
* Click on the menu dots button on the app bar and choose 'Export...'
* In the export format, choose either 'Notes in Plain Text' or 'Cards in Plain Text'.
* In 'Notes in Plain Text', you can choose if you want to include HTML and media references, tags, deck names, notetype name and unique identifiers.
* In 'Cards in Plain Text', you choose if you want to include HTML and media references or not.
The procedure is the same on Anki Desktop. The export option can be accessed from the File button, or by the shortcut kbd:[Ctrl+E].
WARNING: `.txt` files do not include scheduling information. Use `colpkg` or `apkg` if you plan on re-importing your notes into Anki to ensure all data is retained.
Anki supports `.txt` exports for compatibility with other apps.
There are 3 ways to export as `.txt` files:
1. Exporting everything in the collection
* On the main 'Deck Picker' screen, select 'Export'
* Optionally filter by deck
2. Exporting a deck
* Long-press a deck on the main 'Deck Picker' screen and select 'Export Deck'
3. Exporting a selection of notes
* Open the Card Browser
* Long press and select the cards to export
* Select 'Export Cards' in the menu
After beginning the export process, you will be able to either export as 'Cards in Plain Text' or 'Notes in Plain Text'. Both of these produce a `.txt` formatted document.
Both options support 'Include HTML and media references'
Exporting notes also allows you to include:
* Tags
* Deck names
* Note Type Names
* A unique identifier

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Include HTML and media references' needs to be better explained

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSV import/export description are missing from the manual
2 participants