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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions manual.asc
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,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 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'.
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.

* 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.
Comment on lines +581 to +595
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.



[[exporting]]
== Exporting Anki Files
AnkiDroid can export your flashcards in the .apkg Anki file format so that you can import them into Anki Desktop, or share them with other people.
Expand Down Expand Up @@ -614,6 +631,16 @@ From the main menu in the decks screen:
. Tap *Export*
. Tap *OK* using the default options
. Tap *OK* again to email the exported apkg to another user

=== Exporting in .txt format
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].
Comment on lines +636 to +642
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




[[backups]]
Expand Down