Topic closed
Reply #176 - 2007 June 28, 11:23 pm
resolve Member
From: 山口 Registered: 2007-05-29 Posts: 919 Website

The import should have preserved the order. My only guess is that syncing caused some cards to be put out of order.

Anyway, download this file:

http://repose.cx/dump/order.py

Put it in ~/.anki/plugins

Start up Anki, save your deck, remove the file from the plugins directory again (or it'll keep sorting every deck when you open the program). It should work fine after that.

Edit: ~ is Documents and Settings\username on Windows. The code will also print the new order of the deck into the log file for confirmation, so don't be alarmed if it tells you there were "errors".

Last edited by resolve (2007 June 28, 11:34 pm)

Reply #177 - 2007 June 28, 11:35 pm
resolve Member
From: 山口 Registered: 2007-05-29 Posts: 919 Website

wzafran: thanks for the feedback! Buttons for rich text editing will probably be included at some point - there's just a bunch of other stuff I have to finish first. Anki 0.3 will have a different edit deck window that will make HTML editing easier, too.

Reply #178 - 2007 July 01, 4:13 am
yorkii Member
From: Moriya, Ibaraki Registered: 2005-10-26 Posts: 408 Website

I'm getting loads of errors with anki recently. especially when i try to make cards. the whole add cards system seems to be very unstable for me. most of the errors are of the type:
Traceback (most recent call last):
  File "ui\add.pyc", line 139, in questionChanged
  File "anki\cardgen.pyc", line 111, in toFurigana
  File "anki\cardgen.pyc", line 62, in toFurigana
UnicodeEncodeError: 'shift_jis' codec can't encode character u'\ufffc' in position 0: illegal multibyte sequence


what exactly is causing these errors?

Advertising (register and sign in to hide this)
JapanesePod101 Sponsor
 
Reply #179 - 2007 July 01, 5:24 am
resolve Member
From: 山口 Registered: 2007-05-29 Posts: 919 Website

Unstable is not really the right choice of words - it's not crashing, is it?

The problem is that you've entered characters into your question which can't be encoded in shift-jis - only in unicode. The program which generates readings for your text automatically doesn't understand unicode, so Anki has to convert it to shift-jis first. The solution is to ignore any characters which can't be encoded (they'll just be left out of the reading generation). It'll be fixed in 0.3.

If you are getting other errors, please let me know.

PS: I did get your email with feature suggestions, but I've been too busy to look at it properly yet. The bug tracker's a good place to post things you don't want me to miss. ;-)

Last edited by resolve (2007 July 01, 6:01 am)

Reply #180 - 2007 July 01, 6:25 am
yorkii Member
From: Moriya, Ibaraki Registered: 2005-10-26 Posts: 408 Website

ok, ill keep the bug tracker in mind.

the thing is, it does crash on me sometimes.

when i go to paste some text in it will just disappear so i have to open the program again. then it tells me that it is in lock mode and asks if i want to resume anyway.

thanks for clearing up what the problem is anyway. looks like ill have to be careful what i am exactly putting in the question and answers here.

Another comment if I may:

on the "Add Cards" interface, it would be nice if there was a way to turn off the "1.5 side" - hiragana - from automatically including itself.

Last edited by yorkii (2007 July 01, 6:26 am)

Reply #181 - 2007 July 01, 6:48 am
resolve Member
From: 山口 Registered: 2007-05-29 Posts: 919 Website

In 0.3 you can customize what fields you want in your deck. For now, if you select 'English/other' as the target language in your deck, it won't use hiragana.

Reply #182 - 2007 July 01, 7:35 am
yorkii Member
From: Moriya, Ibaraki Registered: 2005-10-26 Posts: 408 Website

thanks for the prompt reply.

yorkii

Reply #183 - 2007 July 01, 7:07 pm
Aikiboy Member
From: Kitakyushu Registered: 2006-12-09 Posts: 127 Website

Resolve, thanks for the quick help last Friday on the deck order.  I did as you suggested, yet have no clue if it worked or not.  I'm still reviewing and haven't added new cards.  Assuming the plug-in worked, will Anki search for the skipped words in the deck or simply continue from where it stopped, in order?  And if this is so, how can I make it add the kanji that it previously skipped?  BTW, the only error that I encountered was when I tried to access Anki by cell phone.  But after sync'ing, cell phone version is fine.  Thanks for the help!

Reply #184 - 2007 July 01, 10:15 pm
resolve Member
From: 山口 Registered: 2007-05-29 Posts: 919 Website

The deck is a list like [1, 2, 3]. The plugin sorts your deck by the number in the question and prints the new order in the debug log (so you can look at that to see the order is correct).

If you add new cards with the 'add cards' dialog, they will be added in a random position in the deck, because in 0.2.x the insertion position is not customizable (it will be in 0.3). If you use the 'import text file' approach, the cards should be added at the end of the deck. The only issue you should encounter is with syncing: currently syncing doesn't preserve order, so while your local deck should remain in the correct order, new cards will be added out of order on the cell/web interface.

It seems like you want to see these cards in order the first time you see them, but not necessarily practice them in order after that? I imagine reviewing in order would not be so good, as each kanji tends to build on the kanji that came before it - which makes review too easy.

Reply #185 - 2007 July 02, 12:19 am
Aikiboy Member
From: Kitakyushu Registered: 2006-12-09 Posts: 127 Website

Hi Resolve,  I managed to finish the next chapter's stories, 1483 and started into the review.  It still skips kanji in my list.  sad I have only imported one list.  I have never added a list.  I did synch on-line and that shuffled the deck, then you deleted the deck for me and I re-loaded my local deck. I wonder if my local deck was then shuffled? At any rate this did sync my local and on-line decks and I thought things were cool.  But it seems they both skip kanji?    Presently, under Edit, my list appears in order, but lists many kanji I've passed in number as new cards.

You are correct, I would like to have the kanji introduced in order, and whatever scheduling anki decides thereafter is fine with me.  It's just that many cards have not been presented and are not on a review schedule which will definitely throw me off.

I wonder now, that if the correct order was resumed after your plug-in, could it be possible that the on-line deck is now synching and shuffling the local deck?  Would it be better if I deleted my on-line deck, reloaded the plug-in fixing the order, and re-added my local deck from on-line?

Thanks again for your time and patience.

BTW, I never saw that log file.  Hmmm...fishy, eh.hmm

Last edited by Aikiboy (2007 July 02, 12:22 am)

Reply #186 - 2007 July 02, 1:26 am
Aikiboy Member
From: Kitakyushu Registered: 2006-12-09 Posts: 127 Website

Resolve, O.K. seems like I screwed that up last week by saving the plugin as a different format somehow.  I copied the lines saved to notepad under order.py and fired up Anki.  Something's different!  Thought it was skipping for a sec, but looks like it's reading all my non-radical primitives marked by asteriks.  That seems like it's in order, just numerical/alphabetical, not my original import list order.  Since they are marked by asteriks and not numbers, should I go ahead and edit my list and enter a #/letter combo like 1412a or are decimals ok 1412.1, 1412.2?  And then re-order my list again.  Advice?  Thanks, again.

BTW, when I went to erase the plug-in I found a new file, order.pyc.  I'll leave that till you tell me to do otherwise.  Cheers.

Reply #187 - 2007 July 02, 1:32 am
resolve Member
From: 山口 Registered: 2007-05-29 Posts: 919 Website

The code I wrote for you looks for some numbers, a dot and a space. Actually it looks for some numbers, a character and a space because I made a mistake, but the effect is the same. I'd suggest "1412.1", and change this line of the file:

        m = re.match("^(\d+). ", question)

to

        m = re.match("^(\d+)\.", question)

(adding a \, and removing the space)

You can delete the .pyc file whenever you like. It's just a cache to speed up loading in the future.

Reply #188 - 2007 July 02, 9:54 am
Aikiboy Member
From: Kitakyushu Registered: 2006-12-09 Posts: 127 Website

Hi Resolve, thanks for explaining the code.  That helps me understand things a bit better.  I've already edited over half the asterik'd entries in a number/letter format and the entries seem to be going to their proper placement.  Do you foresee any problem with keeping the letters? After I complete the rest(unless I really shouldn't), I'll try reordering it minus the space, but I'm curious.  What does the extra backslash mean?  And if the .pyc speeds things up, shouldn't I just leave it there?  BTW, should I erase the on-line deck and re-load once I get it all straight?  Thanks again!

Reply #189 - 2007 July 02, 5:45 pm
resolve Member
From: 山口 Registered: 2007-05-29 Posts: 919 Website

I don't see any problem with keeping the letters, but the code I gave you orders or the first number only and completely ignores anything after that (so you may see 'c', then 'a'). The '\' marks the '.' as an actual '.' instead of a wildcard (google for 'regular expressions' if you're interested). You don't need to delete the .pyc, but you asked if you could: yes, once you remove the plugin you don't need to keep the .pyc file around.

After you've got your deck in order, if you erase your online deck and upload your local copy, they should have the same order.

Good luck!

Reply #190 - 2007 July 02, 8:04 pm
Aikiboy Member
From: Kitakyushu Registered: 2006-12-09 Posts: 127 Website

Hi Resolve, thanks for all the info. smile  Glad I don't have to retype all of those entries!  I see what you mean, though.  The numbers would keep it numerical, simple that.  But most often they are single cases and it doesn't really matter.  When there are more, they are at least within the same chapter which is fine.  Almost finished renumbering, so I'll be back on track later today.

I'll definitely keep all this in mind the next time I make a deck!  Hindsight, a wonderful thing!wink Thanks again.

Reply #191 - 2007 July 02, 8:45 pm
Bortrun Member
Registered: 2007-05-15 Posts: 16

Hi there,

Perhaps this question has been asked, but I didn't see it so I thought I'd go ahead.

Is it possible for the furigana automatically generated by Anki to be assigned to the question side rather than to the answer side?  I notice that it's set up that way for the sample deck for JLPT 4, but I can't figure out how to set that up for the cards that I enter.  I'm still working through RTK 1, so I don't know how to pronounce many of the kanji, so I either need to not use kanji (hiragana only) or I need furigana when I'm studying vocabuary.

Thanks.

Reply #192 - 2007 July 02, 8:56 pm
brose Member
From: Tokyo Registered: 2006-11-15 Posts: 94

Someone may have mentioned this but....during the review it would be really nice to have buttons to click on rather than the using the keyboard to enter "0 1 2 3".

Reply #193 - 2007 July 02, 9:03 pm
Megaqwerty Member
Registered: 2007-04-05 Posts: 318

brose wrote:

During the review it would be really nice to have buttons to click on rather than the using the keyboard to enter "0 1 2 3".

I'll vouch for that: I have a tendency to use my laptop while it's in slate mode, meaning, of course, no keyboard, so having buttons to click, a la Mnemosyne, would be a convenience, but it's not necessary by any means.

Bortrun, it may be to your long-term advantage to keep the furigana hidden so that you can start memorizing readings. Personally, I have a tendency of ignoring the kanji if I show furigana and the word doesn't have synonyms.

Reply #194 - 2007 July 02, 9:08 pm
JimmySeal Member
From: Kyoto Registered: 2006-03-28 Posts: 2279

brose wrote:

Someone may have mentioned this but....during the review it would be really nice to have buttons to click on rather than the using the keyboard to enter "0 1 2 3".

http://repose.ath.cx/tracker/anki/issue30

I agree that it would be quite a nice feature.

Reply #195 - 2007 July 03, 8:23 pm
Aikiboy Member
From: Kitakyushu Registered: 2006-12-09 Posts: 127 Website

Hi Resolve, everything seems to be in order now.  Thanks a bunch.  Anki slammed me will all the ones that it skipped, nigh on 200, but I'm through it and back on track.  A couple more questions lurking around my dark matter...When the list is displayed, it does so listing all numbers beginning with 1 first.  1, 10, 100, 1000 then to 2 etc.  This doesn't seem like the order the cards are being presented in, at least I haven't noticed it.  Is it just for presentation?

Anki has great kanji stats and because of that I found a couple of kanji I'd skipped somehow or were perhaps never imported.  I also found a mistake in the book, 飽 - 1480 sated.(BTW folks, is there a list of mistakes in RTK1 somewhere?)  It took me a while to narrow that down.  Yeah Anki!  Anki also showed me as missing one kanji, 璽 じ sated, which also threw me for a loop.(And of course I didn't have my Wordtank!)  It was listed by Anki as a JHS kanji and I couldn't find this in RTK1.  I did find it in a list I have coming after 2042 yet having no number or English keyword.  It seems to be an older kanji, not in common use and most Japanese I spoke with didn't know it.  How does it relate to RTK1 and 常用漢字?

Reply #196 - 2007 July 03, 9:09 pm
synewave Member
From: Susono, Japan Registered: 2006-06-23 Posts: 864 Website

Two links for you:

Cumulative errata for the 4th edition.

The brain teaser thread has some info on 璽

Reply #197 - 2007 July 03, 9:09 pm
Megaqwerty Member
Registered: 2007-04-05 Posts: 318

Aikiboy wrote:

Anki also showed me as missing one kanji, 璽 じ sated, which also threw me for a loop.

The only 常用 not in RTK I, 璽, imperial seal, is, like, on the second page of RTK III (frame 2075), ironically.

EDIT: eh, synewave beat me to the punch, drat.

Last edited by Megaqwerty (2007 July 03, 9:14 pm)

Reply #198 - 2007 July 04, 1:25 am
resolve Member
From: 山口 Registered: 2007-05-29 Posts: 919 Website

Aikiboy: the editor sorts the deck by the selected column header - question, answer, created date, etc. So the list does not reflect the actual order of the deck. The list goes '1, 10, 100' because alphabetical order is not the same as numerical order. By naming your cards '001, 010, 100' you can ensure that it's in the same numerical and alphabetical order - but it's a bit too late for that now :-) (though the renaming process is easy to script)

Reply #199 - 2007 July 04, 10:58 am
Aikiboy Member
From: Kitakyushu Registered: 2006-12-09 Posts: 127 Website

Megaqwerty and Synewave, thanks for the info!

Resolve, I figured it was something like that.  Easy for you to script maybe, but a whole education for me! Definitely too late to change.  Maybe I'll number that way for other decks I'll eventually make.  Thanks for all the help!

Reply #200 - 2007 July 05, 6:51 pm
dilandau23 Member
From: Japan Registered: 2006-09-13 Posts: 330

So I have been talking up Anki to a friend of mine.  He is using Excel@Japanese and is not willing to give up his work done in that program.  I think that E@J is a buggy pile of 肥 but, still progress is progress.  What I was wondering is does anyone have the desire or drive to write some way to import from E@J into Anki so I can rescue him from VBScript hell.

Topic closed