On Wed, Jan 13, 2010 at 5:27 AM, Roger <[email protected]> wrote:
> Hi All,
>
> here is a solution for identifying your top leech items on a Linux
> machine. The used program is available for Windows too (http://
> sourceforge.net/projects/xmlstar/), but I did not test it on Windows.
> The procedure produces a simple list of your flashcards sorted
> descending by lapses.
>
> Background information about leech items:
> http://ichi2.net/anki/wiki/Leeches
> http://www.supermemo.com/help/leech.htm
>
> Requirements for the procedure:
> - Linux
> - xmlstarlet installed (http://sourceforge.net/projects/xmlstar/)
>
> Procedure:
> - export the database to xml including learning data
> - run the following command under linux in a console in the same
> directory where you put the xml file:
> xmlstarlet sel -T -t -m /mnemosyne/item -s D:N:- "@lps" -v "concat
> (@lps,'|',Q,'|',A)" -n default.xml >> lps_ranking.txt
>
> Result/ Output:
> The output file (lps_ranking.txt) is a descending sorted list of all
> your Flashcards by lapses.
> Here are the first few lines of my output file:
> 8|<img src="media/ui/semester1/eff1/Sorbus_aria-knospe.jpg">|
> Sorbus_aria
> 8|Terminus von "Gips" |Calciumsulfat
> 7|Ethanol|<$>C_2H_6O</$>
> 7|Japanischer Pagodenbaum|Styphnolobium japonicum
> 6|<img src="media/ui/semester1/eff1/Ulmus_minor-knospe1.jpg">|
> Ulmus_minor
> 6|<img src="media/ui/semester1/eff1/Sorbus_torminalis-knospe.jpg">|
> Sorbus_torminalis
> 6|Sanddorn|Hippophaë rhamnoides
> 5|Berg-Föhre|Pinus mugo
> 5|incite|to encourage someone to do or feel something unpleasant or
> violent
>
>
> Hopefully this post is useful to some of you!
>
> Greetings,
> Roger

Your formatting seems to be off. I had to remove the space between
"D:N:-" and ""@lps"" to get it to work - the error messages were
incomprehensible, but I think that was the solution:

     xmlstarlet sel -T -t -m /mnemosyne/item -s D:N:-"@lps" -v "concat
(@lps,'|',Q,'|',A)" -n default.xml

(Alas for me, I've never got the hang of the 0/1 rankings and so all
my leeches are marked '2', so this script doesn't help me.)

-- 
gwern
-- 
You received this message because you are subscribed to the Google Groups 
"mnemosyne-proj-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/mnemosyne-proj-users?hl=en.


Reply via email to