Register  Login  Active Topics  Maps  

Knowledgeable in Anki programming?

 Language Learning Forum : Learning Techniques, Methods & Strategies Post Reply
10 messages over 2 pages: 1 2  Next >>
Arekkusu
Hexaglot
Senior Member
Canada
bit.ly/qc_10_lec
Joined 5373 days ago

3971 posts - 7747 votes 
Speaks: English, French*, GermanC1, Spanish, Japanese, Esperanto
Studies: Italian, Norwegian, Mandarin, Romanian, Estonian

 
 Message 1 of 10
02 January 2011 at 6:23pm | IP Logged 
I'm wondering if anyone here is knowledgeable in programming Anki cards with html code.
In trying to insert a specific line of code from a webpage onto cards, namely the line
that contains the entry that reads

うみ1 【海】

from this webpage

http://dic.yahoo.co.jp/dsearch?enc=UTF-8&p=海&stype=1&dtype =0&dname=0ss

In the best of worlds, the link would change automatically depending on the card (this,
I can already do -- I already have a link to the dictionary page in question on each
card), but I'd like to automatically return only that specific line that starts with
<h1> -- there is only one in the page.

What I really want is access to that little number or numbers in subscript next to the
entry, the accent pitch. Now, I have to click on the link for each card. I wish it
could be added automatically instead.




2 persons have voted this message useful



Sprachprofi
Nonaglot
Senior Member
Germany
learnlangs.comRegistered users can see my Skype Name
Joined 6462 days ago

2608 posts - 4866 votes 
Speaks: German*, English, French, Esperanto, Greek, Mandarin, Latin, Dutch, Italian
Studies: Spanish, Arabic (Written), Swahili, Indonesian, Japanese, Modern Hebrew, Portuguese

 
 Message 2 of 10
02 January 2011 at 7:57pm | IP Logged 
Excerpting is not something that HTML can do. You will have to realize this function as a
plugin. Get someone with Python experience or ask Damien himself, he takes requests.
2 persons have voted this message useful



Arekkusu
Hexaglot
Senior Member
Canada
bit.ly/qc_10_lec
Joined 5373 days ago

3971 posts - 7747 votes 
Speaks: English, French*, GermanC1, Spanish, Japanese, Esperanto
Studies: Italian, Norwegian, Mandarin, Romanian, Estonian

 
 Message 3 of 10
03 January 2011 at 8:52pm | IP Logged 
Said request was turned down. Am now looking for ways to generate the info in the txt file before importing
the deck.
3 persons have voted this message useful



davidhowell
Newbie
United States
Joined 5081 days ago

13 posts - 28 votes
Speaks: German

 
 Message 4 of 10
04 January 2011 at 11:12am | IP Logged 
If you give me a little more information on what you mean and/or more example pages, I
can try to write a quick program for you.
2 persons have voted this message useful



davidhowell
Newbie
United States
Joined 5081 days ago

13 posts - 28 votes
Speaks: German

 
 Message 5 of 10
04 January 2011 at 11:51am | IP Logged 
@Arekkusu I wrote a program that I believe suits your needs...check your PMs :)
3 persons have voted this message useful



Arekkusu
Hexaglot
Senior Member
Canada
bit.ly/qc_10_lec
Joined 5373 days ago

3971 posts - 7747 votes 
Speaks: English, French*, GermanC1, Spanish, Japanese, Esperanto
Studies: Italian, Norwegian, Mandarin, Romanian, Estonian

 
 Message 6 of 10
04 January 2011 at 1:42pm | IP Logged 
davidhowell wrote:
If you give me a little more information on what you mean and/or more example
pages, I
can try to write a quick program for you.


If I go to this link

http://dic.yahoo.co.jp/dsearch?enc=UTF-8&p=海&dtype=0&dname =0ss&stype=1

the H1 line includes a number in subscript. That number is the pitch accent. Right now, I have a link on
each of my cards that searches the Front fact and takes me to the page that contains the pitch, but I have
to insert it manually in each card.

2 persons have voted this message useful



davidhowell
Newbie
United States
Joined 5081 days ago

13 posts - 28 votes
Speaks: German

 
 Message 7 of 10
04 January 2011 at 8:09pm | IP Logged 
Well the thing I gave you spaces out each result with a tab in a .txt file which SHOULD allow you to import
it into anki.
2 persons have voted this message useful



Arekkusu
Hexaglot
Senior Member
Canada
bit.ly/qc_10_lec
Joined 5373 days ago

3971 posts - 7747 votes 
Speaks: English, French*, GermanC1, Spanish, Japanese, Esperanto
Studies: Italian, Norwegian, Mandarin, Romanian, Estonian

 
 Message 8 of 10
04 January 2011 at 9:12pm | IP Logged 
davidhowell wrote:
Well the thing I gave you spaces out each result with a tab in a .txt file which SHOULD allow you to import
it into anki.

First of all, thank you for your help, David!

Either my programming knowledge is too non-existent for me to envision the possibilities created by your site, or I wasn't clear enough.

Let's say I have a card that says "tomodachi" on the front and "friend" on the back. On the back, I also added a link that takes me to the page I've linked previously in this thread and which indicates pitch. In this case, it would be number 0. My dream would be to have that 0 inserted automatically next to "tomodachi" on the card. Now, I need to insert it manually. If I understand what your site does -- and it's quite possible I don't -- it creates a .txt with that information, but I STILL need to insert into the card. It's even more complicated than before!

Unless I could input many links at once in your site, thus generating a list of H1 lines I could append to a file before making a deck out of it.


2 persons have voted this message useful



This discussion contains 10 messages over 2 pages: 2  Next >>


Post ReplyPost New Topic Printable version Printable version

You cannot post new topics in this forum - You cannot reply to topics in this forum - You cannot delete your posts in this forum
You cannot edit your posts in this forum - You cannot create polls in this forum - You cannot vote in polls in this forum


This page was generated in 0.2813 seconds.


DHTML Menu By Milonic JavaScript
Copyright 2024 FX Micheloud - All rights reserved
No part of this website may be copied by any means without my written authorization.