Converting from Anki to FCD

Converting from Anki to FCD

Postby radiator » Sat Oct 02, 2010 4:45 pm

Hey Ernie - nice to see you finally got a REAL Flashcards Deluxe board going - its about time!!

Anyway, I did some work a little while back because I was very interested in Migrating from Anki to Flashcards Deluxe, and in particular how well it handled audio files. Migrating was easy.

I took the time to write a document that outlined the steps to do it - for those interested, you can check out the following link. http://goo.gl/g7OQ

I even threw in a small video (more of a "marketing" video than useful... but still I thought it was cool!...).

FCD is awsome. I have done a lot more with this program since then, so will post more about it when I get a bit more time.
radiator
 
Posts: 19
Joined: Sat Oct 02, 2010 4:38 pm

Re: Converting from Anki to FCD

Postby Ernie » Sat Oct 02, 2010 5:51 pm

Excellent! Thanks Radiator for posting this.

For any user interested in exporting from Anki, the trick is to export as "Facts in Tab separated Text File (*.txt)" which will create a text file that Flashcards Deluxe should be able to read. The exported text may be filled with html coding, but this app can handle that.

One complication might be pictures and sounds, as Anki has its own way to signal these in the text file. If you put this text file on your own server and import directly into the app, it should work fine, as there is special logic to interpret Anki's formatting. If you try to upload to my website, it will will not understand the picture and sound definitions, so the text will need to be cleaned up first in this case.
Ernie
Site Admin
 
Posts: 5013
Joined: Fri Oct 01, 2010 6:12 pm
Location: San Francisco / Taiwan

Re: Converting from Anki to FCD

Postby radiator » Sat Oct 02, 2010 5:59 pm

I think the good news is that (unless I am mistaken...) many Anki users already use things like Dropbox to store their files in the cloud. In this case, they would be able to import without any modifications after doing their export. The only challenge is the score files.
radiator
 
Posts: 19
Joined: Sat Oct 02, 2010 4:38 pm

Re: Converting from Anki to FCD

Postby bnz » Sun Feb 05, 2012 3:35 pm

Hi,

i'm wondering: is there any way to migrate from Anki while preserving the individual spacing for each card? It would be kind of impossible having to go through all those cards once more. Is there even a way to import cards including predetermined spacing into flashcards deluxe if I figured out a way to gather the data from Anki?

Ben
bnz
 
Posts: 5
Joined: Fri Jun 03, 2011 3:36 pm

Re: Converting from Anki to FCD

Postby Ernie » Sun Feb 05, 2012 10:08 pm

Ben,

Statistics can be import/exporting into my app using the normal text file. If you export a deck with statistics, you'll see a "Statistics 1" column with a string of values. Interval (the basic statistics in spaced repetition) is in there. The format of this statistics string can be found in the following Excel file:
http://orangeorapple.com/Flashcards/Sta ... Format.xls

I have some formulas in the Excel file that can split apart the pieces and put them together. So, you can manipulate them and import them back with your flashcard data.

As for Anki, I don't really support any quick conversions from Anki. But below are a couple links that might be helpful
1) General method to transfer from Anki without statistics:
viewtopic.php?f=2&t=1380
2) Very technical approach to transferring statistics from Anki that a user posted:
http://blog.sleepmail.com/migrating-fro ... w-history/

Ernie
Ernie
Site Admin
 
Posts: 5013
Joined: Fri Oct 01, 2010 6:12 pm
Location: San Francisco / Taiwan

Re: Converting from Anki to FCD

Postby bnz » Sun Feb 05, 2012 11:18 pm

Fantastic! Thanks for the pointer. The second blog post is exactly what I was looking for...
bnz
 
Posts: 5
Joined: Fri Jun 03, 2011 3:36 pm

Re: Converting from Anki to FCD

Postby lettucewacker » Tue May 15, 2012 11:53 pm

I created a 4 card deck with 2 cards with pictures and 1 card with sound. I used the procedure as outlined in this thread to convert this deck from Anki version 1.2.8 to something I tried to import with FlashCardsDeluxe Lite version 3.1. I got the deck imported onto my iPhone, but the picture and sound links are broken.
I hate spam!!
lettucewacker
 

Re: Converting from Anki to FCD

Postby Ernie » Wed May 16, 2012 3:35 pm

First, make sure you are doing the following: In the dropbox download screen, tap the gear icon at the top right and change "Text Format" to "Basic TSV".
("TSV" will interpret quotes differently.)

Others who have had success probably did not have sounds. If you have sounds, try the following workaround:
1) Import as usual
2) Export back to Dropbox
3) Open the text file and delete the header row that looks like: * media-dir ....
4) Save and re-import that text file. Hopefully that will work.

Importing anki pictures shows them different than normal (anki = imbedded in the web page vs normal = in their own picture control). You might find problems with how pictures are shown.

I'll consider adding better support for Anki imports in the next update, I just haven't made this a priority.
Ernie
Site Admin
 
Posts: 5013
Joined: Fri Oct 01, 2010 6:12 pm
Location: San Francisco / Taiwan

Re: Converting from Anki to FCD

Postby lettucewacker » Wed May 16, 2012 5:59 pm

Thank you for your reply!!

Because you mentioned Dropbox, I retried the procedure again and this time used the "Public" Dropbox folder because before I was just using a directory that Flashcards Deluxe created automatically. Using the "Public" folder I was successful. I should be able to transfer my many Anki decks for use on the iPhone and I plan to purchase FCD.
lettucewacker
 

Re: Converting from Anki to FCD

Postby Ernie » Wed May 16, 2012 8:14 pm

**************
Instructions to import an Anki deck into Flashcards Deluxe
Note that statistics are not imported using this method.
**************

In Anki, export deck as "Facts in Tab separated Text File (*.txt)"
If you have media files, put media directory in same directory as text file and rename as documented below.
You can import the text file using the /Dropbox/Flashcards Deluxe/ folder, or any public web location:

Dropbox - private "Flashcards Deluxe" folder
- Media folder is named same a text file without ".txt" and with " Media" added (e.g. "mydeck.txt" -> "mydeck Media\"
- Choose "Basic TSV" format in Dropbox setting screen

Any web location, such as Dropbox public folder
- Media folder is named same a text file without ".txt". (e.g. "mydeck.txt" -> "mydeck\")
- Enter URL of text file as "Deck Code" in Add > Private Deck screen


If you have sound files, Flashcards Deluxe can tell it's an Anki file. Otherwise, you can explicitly tell Flashcards Deluxe it's an Anki file by adding the follow header text at the top of the text file:
* anki 1
(the two spaces above are a TAB)
Doing this is not required but has the following benefits:
1) You don't have to manually select "Basic TSV" format for Dropbox imports
2) Pictures will be shown using picture control (instead of as html img) which has some benefits like auto-resize and zoom ability
Ernie
Site Admin
 
Posts: 5013
Joined: Fri Oct 01, 2010 6:12 pm
Location: San Francisco / Taiwan

Re: Converting from Anki to FCD

Postby Guest » Wed Nov 28, 2012 8:36 am

Presumably there is no way to export a deck with sound from Anki 2.0 to Flashcard Deluxe, now that Anki stores all the media in-deck?
Guest
 

Re: Converting from Anki to FCD

Postby Ernie » Wed Nov 28, 2012 6:39 pm

I'm no expert with Anki, but it seems like you can export ok. All media seems to be in one folder now:
\Anki\User 1\collection.media
So I assume you can find any media there. Exporting to a text file creates a tab delimited file. One complication might be that it's not easy to tell which media files go with with which decks though.
Ernie
Site Admin
 
Posts: 5013
Joined: Fri Oct 01, 2010 6:12 pm
Location: San Francisco / Taiwan

Re: Converting from Anki to FCD

Postby Guest » Thu Nov 29, 2012 2:43 am

Thank you (especially for such a prompt response), I'll try that.
!!
Guest
 

Re: Converting from Anki to FCD

Postby Arta » Fri Nov 30, 2012 1:00 pm

Hi,
I just imported a deck from Anki 2.
I exported a deck from Anki 2, as Notes in Plain Text (*.txt), and uploaded a "Deck.txt" file and a "Deck Media" folder to Dropbox, and then imported "Deck" to Flashcards using the Basic TSV setting.
When I view the cards, it looks good, but when I browse, I see HTML tags and entities (<br/>, &amp; &lt; etc.). When I edit the text to replace these with "normal" break line (hitting Enter), "normal" &, "normal" <, etc., whatever is after the first replaced HTML tag/entity simply disappears from the card view (in the card browser as well as in the card viewing modes).
Did I do something incorrectly?
Thank you very much.

PS. When I open the imported Deck.txt, it, too, has the HTML tags and entities.
Arta
 

Re: Converting from Anki to FCD

Postby Ernie » Fri Nov 30, 2012 5:28 pm

Arta,

I'm not sure, but...

In card listing and card view, the app will hide html tags that are in < > (for a cleaner look). If you edit a side (with the keyboard showing), the html tags will get shown for your editing. I don't try to hide html not in < >, such as &amp.

If the text disapears after you edit, maybe you've screwed up the html. Do you have all your text inside some html tag: "<abc your valid card text>", which would hide it because the app thinks it's html?

It possible, you might want to get rid of all html in the text file bofore importing. For line breaks, use a | (shift \ = pipe) to signal a linefeed.
Ernie
Site Admin
 
Posts: 5013
Joined: Fri Oct 01, 2010 6:12 pm
Location: San Francisco / Taiwan

Re: Converting from Anki to FCD

Postby Arta » Sun Dec 02, 2012 4:45 pm

Aha. The behavior now makes sense. I am using <> to enclose my own specific content, not as html tags.

If I understand, I should replace those with regular parenthesis, or (curly) brackets. I should also replace html entities with the intended character output: &amp; with &, etc. And replace <br/> with |

Correct?

Thank you!
Arta
 

Re: Converting from Anki to FCD

Postby Ernie » Sun Dec 02, 2012 8:03 pm

Correct.

The flashcard study view is a web view, so if you use <>, the web view can get confused and think it's html code.

If you want to use < > in your text, instead of deleting them (which may be a good option for you), you can fix the problem by putting a space after a "<", for example:
< some notes>
Ernie
Site Admin
 
Posts: 5013
Joined: Fri Oct 01, 2010 6:12 pm
Location: San Francisco / Taiwan

Re: Converting from Anki to FCD

Postby Arta » Mon Dec 03, 2012 1:50 pm

Thank you, Ernie!! I'll go over the import document.
Arta
 

Re: Converting from Anki to FCD

Postby polyglot wannabe » Tue Sep 06, 2016 10:18 pm

Is there a way to convert a file made for Anki (.apkg) without having to use the Anki app?
polyglot wannabe
 

Re: Converting from Anki to FCD

Postby Ernie » Sun Sep 11, 2016 10:22 pm

Hi. Sorry that I didn't see your post until now. I don't provide a tool to open apkg files (and FCD cannot read). They are zip files, so you can rename and unzip, but I assume the flashcard data are in databases that would be difficult to access. If you search online you might find other readers to open apkg files, but Anki Deckstop seems like the best option.
Ernie
Site Admin
 
Posts: 5013
Joined: Fri Oct 01, 2010 6:12 pm
Location: San Francisco / Taiwan

Re: Converting from Anki to FCD

Postby Guest » Fri Aug 24, 2018 11:33 am

Hello everyone,

I just bought a Deck containing some 4k cards for Anki, but I for this deck I prefer using Flashcards Deluxe. I'm grateful to Anki for allowing to export and import decks.

The approaches that I see higher above in this thread don't seem to be available anymore, so this is what I've done (from Anki 2.1.1):

1. I exported as "Notes in Plain Text (*.txt)", including tags (not sure what "tags" mean but I assume they are HTML tags. It won't affect media, I guess.), as "foobar.txt"
2. I opened the file foobar.txt in LibreOffice Calc and added a header row with Text 1, Text 2, Text 3, Sound 1, Category 1
3. For every sound file, which looks like [sound:filename.mp3], I stripped the "[sound:" and "]" bits.
4. I went to C:\Users\Manuel\AppData\Roaming\Anki2\msoutopico\collection.media and copied all the mp3 files to "foobar Media" folder in my "C:\Users\Manuel\Dropbox\Apps\Flashcards Deluxe" folder.
5. Import the deck in FCD in my iPad.

That's as good as I can get. It downloads all the media except for some rows where there are more than one mp3 file, e.g. "[sound:sound1.mp3][sound:sound2.mp3]" (it seems the deck I purchased uses one mp3 file for each word in the first column). In those cases, I have separated them as "sound1.mp3;sound2.mp3", in the hope that FCD could understand it and read it well, but that's not the case.

Does anyone have any tip what I could do to have all sounds files read? (other than merging them manually, of course)

Thank you!
Manuel
Guest
 

Re: Converting from Anki to FCD

Postby Ernie » Sat Aug 25, 2018 5:37 pm

Hi Manuel,

Your approach looks exactly correct.

Flashcards Deluxe only supports a single sound file on a side.
Possible workarounds:
1) combine sounds into single file, as you mentioned, which is likely troublesome
2) move the sound to the "Sound 2" column, which could then be played when viewing side two
3) Move sound to say "Sound 3" column and create a custom Card Layout. This would be a little tricky to set for those not familiar with card layouts in my app. You could set a card layout as follows: side 1 = text 1 + sound 1; side 2 = sound 3; side 3 = text 2 (answer). So your side 2 would be just then 2nd sound clip. The app should skip this side if nothing in Sound 3. A similar solution would be to move the answer side 3 and use Sound 2 just when it exists. I like having answer in Text 2 as default layouts will work well in this case, with just the optional sound on side 3 if exists... unless a custom layout used.
Ernie
Site Admin
 
Posts: 5013
Joined: Fri Oct 01, 2010 6:12 pm
Location: San Francisco / Taiwan

Re: Converting from Anki to FCD

Postby msoutopico » Thu Aug 30, 2018 4:42 am

Thank you for your reply, Ernie.

Yet, I've done a bit of research and have found another workaround: basically I run a command line script to merge the mp3 files.

For example:

@echo off
title Merge mp3
echo I will merge some mp3 files
pause
echo Merging tcav01-009.mp3 and tcav01-010.mp3 as tcav01-009-010.mp3
copy/b tcav01-009.mp3+tcav01-010.mp3 tcav01-009-010.mp3
move tcav01-009.mp3 merged
move tcav01-010.mp3 merged

With a few regexes I can easily convert all lines containing a semi-colon (e.g. sound1.mp3;sound2.mp3) to the format above, i.e. copy/b etc.

Cheers, Manuel
msoutopico
 
Posts: 4
Joined: Thu Aug 16, 2018 3:23 am

Return to Comments, Questions and Feedback