{"id":17988122,"url":"https://github.com/lujun9972/anki-vocabulary.el","last_synced_at":"2025-04-04T03:24:36.134Z","repository":{"id":47414532,"uuid":"179450468","full_name":"lujun9972/anki-vocabulary.el","owner":"lujun9972","description":"Help you to create vocabulary card in Anki","archived":false,"fork":false,"pushed_at":"2021-09-01T08:47:17.000Z","size":214,"stargazers_count":11,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T15:12:32.460Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lujun9972.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-04T08:01:13.000Z","updated_at":"2024-10-13T13:37:25.000Z","dependencies_parsed_at":"2022-08-23T01:20:23.921Z","dependency_job_id":null,"html_url":"https://github.com/lujun9972/anki-vocabulary.el","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lujun9972%2Fanki-vocabulary.el","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lujun9972%2Fanki-vocabulary.el/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lujun9972%2Fanki-vocabulary.el/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lujun9972%2Fanki-vocabulary.el/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lujun9972","download_url":"https://codeload.github.com/lujun9972/anki-vocabulary.el/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247114433,"owners_count":20885934,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T19:10:43.751Z","updated_at":"2025-04-04T03:24:36.116Z","avatar_url":"https://github.com/lujun9972.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+TITLE: README\n#+AUTHOR: lujun9972\n#+TAGS: anki-vocabulary.el\n#+DATE: [2019-04-05 五 22:55]\n#+LANGUAGE:  zh-CN\n#+STARTUP:  inlineimages\n#+OPTIONS:  H:6 num:nil toc:t \\n:nil ::t |:t ^:nil -:nil f:t *:t \u003c:nil\n\n* Customization\n+ anki-vocabulary-deck-name :: Specify the Deck used to store the vocabulary card\n+ anki-vocabulary-model-name :: Specify the model of vocabulary card\n+ anki-vocabulary-field-alist :: Specify the meaning of fields in the model\n   + expression :: the vocabulary\n   + sentence :: the context of vocabulary\n   + sentence_bold :: the context with vocabulary bold\n   + translation :: translated context\n   + glossary :: meaning of vocabulary\n   + phonetic :: the phonetic symbol\n+ M-x anki-vocabulary-set-ankiconnect :: Help you settle arguments above\n* Usage\n1. Select the sentence in which the word is in as the context.\n\n   + If the buffer mode is =pdf-view-mode=, you have to mark the context manually.\n\n   + In other modes, It gets context by =sentence-at-point= and =(thing-at-point 'line)=.\n\n2. =M-x anki-vocabulary=\n\n3. Pick the vocabulary\n   \n   It will display the =translation of context(if avaible)= and shows you =vocabulary meanings=\n\n4. Pick the correct meaning in the context\n\n   It will create the card automatically\n* Specify the original language and target language\n** Using Youdao Service\nThis package use Youdao API (thanks to [[https://github.com/xuchunyang/youdao-dictionary.el][youdao-dictionary.el]]) to do the translation.\n\nAccording to the [[http://ai.youdao.com/DOCSIRMA/html/%E8%87%AA%E7%84%B6%E8%AF%AD%E8%A8%80%E7%BF%BB%E8%AF%91/API%E6%96%87%E6%A1%A3/%E6%96%87%E6%9C%AC%E7%BF%BB%E8%AF%91%E6%9C%8D%E5%8A%A1/%E6%96%87%E6%9C%AC%E7%BF%BB%E8%AF%91%E6%9C%8D%E5%8A%A1-API%E6%96%87%E6%A1%A3.html#section-9][API Documentation]],It will identify Chinese, English, Japanese, Korean, French, Spanish, Portuguese, Russian, Vietnamese, German, Arabic, Indonesian and Italian automatically.\n\nBut you can also Specify the original language and target language with following steps.\n\n1. you should [[https://ai.youdao.com/register.s][register a Youdao account]] and create an application to get an =appKey= and a =secret-key= (see [[https://ai.youdao.com/doc.s#guide][the guide(in Chinese)]]).\n2. set the =youdao-dictionary-app-key= to the value of =appKey=\n3. set the =youdao-dictionary-secret-key= to the value of =secret-key=\n4. set the =youdao-dictionary-from= to the code of original language\n5. set the =youdao-dictionary-to= to the code of target language\n\n| The language             | code      |\n| Chinese                  | zh-CHS    |\n| English                  | en        |\n| Japanese                 | ja        |\n| Korean                   | ko        |\n| French                   | fr        |\n| Spanish                  | Es        |\n| Portuguese               | pt        |\n| Italian                  | it        |\n| Russian                  | ru        |\n| Vietnamese               | vi        |\n| German                   | DE        |\n| Arabic                   | ar        |\n| Indonesian               | id        |\n| Afrikaans                | af        |\n| Bosnian                  | bs        |\n| Bulgarian                | bg        |\n| Cantonese                | make      |\n| Catalan                  | ca        |\n| Croatian                 | hr        |\n| Czech                    | cs        |\n| Danish                   | da        |\n| Dutch                    | nl        |\n| Estonian                 | et        |\n| Fijian                   | fj        |\n| Finnish                  | fi        |\n| Greek                    | el        |\n| Haitian                  | Creole ht |\n| Hebrew                   | he        |\n| Hindi                    | hi        |\n| White hmong              | mwW       |\n| Hungarian                | hu        |\n| Swahili                  | sw        |\n| Klingon                  | tlh       |\n| Latvian                  | lv        |\n| Lithuanian               | lt        |\n| Malay                    | ms        |\n| Maltese                  | mt        |\n| Norwegian                | no        |\n| Persian                  | fa        |\n| Polish                   | pl        |\n| Queretaro                | otq       |\n| Romanian                 | ro        |\n| Serbian (Cyrillic)       | sr-Cyrl   |\n| Serbian (Latin)          | sr-Latn   |\n| Slovak                   | sk        |\n| Slovenian                | sl        |\n| Swedish                  | sv        |\n| Tahitian                 | ty        |\n| Thai                     | th        |\n| Tongan                   | to        |\n| Turkish                  | tr        |\n| Ukrainian                | uk        |\n| Urdu                     | ur        |\n| Welsh                    | cy        |\n| Yucatan Maya             | yua       |\n| Albanian                 | sq        |\n| Amharic                  | am        |\n| Armenian                 | hy        |\n| azeri                    | az        |\n| Bengali                  | bn        |\n| Basque                   | eu        |\n| Belarusian               | be        |\n| Cebu language            | ceb       |\n| Corsican                 | co        |\n| Esperanto                | eo        |\n| Filipino                 | tl        |\n| Frisian                  | fy        |\n| Galician                 | gl        |\n| Georgian                 | ka        |\n| Gujarat                  | gu        |\n| Hausa                    | ha        |\n| Hawaiian                 | haw       |\n| Icelandic                | is        |\n| Ibo                      | ig        |\n| Irish                    | ga        |\n| Javanese                 | jw        |\n| Kannada                  | kn        |\n| Kazakh                   | kk        |\n| Khmer                    | km        |\n| Kurdish                  | ku        |\n| Kirgiz                   | ky        |\n| Lao                      | lo        |\n| Latin                    | la        |\n| Luxembourg               | lb        |\n| Macedonian               | mk        |\n| Malgash                  | mg        |\n| Malayalam                | ml        |\n| Maori                    | mi        |\n| Marathi                  | mr        |\n| Mongolian                | mn        |\n| Burmese                  | my        |\n| Nepali                   | ne        |\n| Zichewa                  | ny        |\n| Pashto                   | ps        |\n| Punjabi                  | pa        |\n| Samoan                   | sm        |\n| Scottish Gaelic          | gd        |\n| The sesotho language     | st        |\n| Shona                    | sn        |\n| Sindhi                   | sd        |\n| Sinhala                  | si        |\n| Somali                   | so        |\n| The sunda                | su        |\n| Tajik                    | tg        |\n| Tamil                    | ta        |\n| telugu                   | Te        |\n| Uzbek                    | uz        |\n| Xhosa                    | xh        |\n| Yiddish                  | yi        |\n| yoruba                   | yo        |\n| South African zulu       | zu        |\n| Automatic identification | auto      |\n\nFor example, if you want to translate French to English, you can do the following customization:\n#+begin_src emacs-lisp\n  (setq youdao-dictionary-app-key \"xxxxxxxxxxxxxxx\")\n  (setq youdao-dictionary-secret-key \"yyyyyyyyyyyyyyy\")\n  (setq youdao-dictionary-from \"fr\")\n  (setq youdao-dictionary-to \"en\")\n  ;;. Bonjour, je m’appelle Geo et je viens de Chine.\n#+end_src\n\n[[file:demo1.gif]]\n\n** Using other translation services\nYou can define your own function to fetch the meanings of vocabulary and translation of the context.\n\nThe function used to get meanings of vocabulary should accept the vocabulary as the argument and return an alist like\n#+begin_src emacs-lisp\n  `((expression . ,vocabulary-string)\n    (glossary . ,meanings-of-vocabulary-list)\n    (phonetic . ,phonetic-string))\"\n#+end_src\n\nThe function used to translate the context should accept the context as the only argument and return the translation in a string.\n\nThen set the =anki-vocabulary-word-searcher= to the function that get meanings of vocabulary.\n\nSet the =anki-vocabulary-sentence-translator= to the function that get the translation of context.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flujun9972%2Fanki-vocabulary.el","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flujun9972%2Fanki-vocabulary.el","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flujun9972%2Fanki-vocabulary.el/lists"}