quasimurdock / ielts-anki-cards-generator Goto Github PK
View Code? Open in Web Editor NEWA script for fetching camb dict IELTS words and generate Anki card notes.
License: Other
A script for fetching camb dict IELTS words and generate Anki card notes.
License: Other
wierd thing i can not figure out, after i run pnpm start
, there are many html files and a common.css file. pnpm note
will import html to anki, but there is no css style. I must copy the common.css content to Note types -> cards -> styling, then they look like your original deck cards.
Actually I run pnpm start
in nodejs v16.17, and run pnpm note
with nodejs v18.13 because there is no buildin fetch function under version 18, Maybe this is the reason?
Any way, amazing product of studing english.
In the end of #2 @serifold mentioned the unsteady issue about generating cards from html process:
So, the problem now is that I can't get the whole words transformed into cards, and the pnpm note process seems unsteady, I tried 2 times, it gave me different amount of cards, and there is no info which words were not included.
I'd like to take a look into this in my spare time next week maybe. But if anyone give a hand out that'd be great too.
First of all, thank you very much for your contribution. After downloading and importing the file into the Anki program, I opened it and found that the words have both British and American pronunciations, which is excellent. However, I noticed that the example sentences do not have real human pronunciations in either British or American accents, which is not conducive to learning. Therefore, I hope that the example sentences can also be accompanied by real human pronunciations in both British and American accents. From my impression, I remember that the example sentences in the Longman Dictionary of Contemporary English come with real human pronunciations, so you might consider extracting them from there.
I'm not sure if you are aware of the dictionary community at https://forum.freemdict.com/. You can also download the Oxford Advanced Learner's Dictionary 9th Edition (version 3.1.3) extracted from the official app from this community (link here: https://forum.freemdict.com/t/topic/25820/32?u=argue). The example sentence pronunciations in this version are also quite good.
So far it demands users to manually create one. I will checkout the doc of AnkiConnect to see what I can find on this.
some suggestions, when i failed to fetch a word explaination, there are 2 reasons, http 302, means there is no explaination. http 502, means server error. You should split these errors in two different files. Someone should try 502 again, but should not try 302 again.
I know nodejs does not have multi threading features, but it has multi workers, it's great to fetch parallelly.
Thanks man, this is very cool, this is what I've been looking for for so long! I generated 8000 cards for myself, but the deck takes up 200 MB of text when anki has a limit of 100 MB. Obviously, this is no good. Then, I realized that I would be satisfied with just plain text (but structured) without formatting. Can you add a card generation function without html and css?
Hello, Quasimurdock. Thanks for your effort and sharing. I want to learn from this project, so I tried to build the project locally. Everything seems normal until the last step:
I run the command pnpm note
, then the console keeps outputing Current word: [some word]
..., with no error info;
Then I go to Anki, found the IELTS-CamDict-Words deck was auto-generated, but without any cards;
I checked the html
folder, these files was created normally indeed;
Then I think maybe it's the Anki's new card daily limits that cause the problem, so I adjusted it to 3600, but still can't generate any cards;
And I checked the output/log
foleder, there is only missing_words.txt
, no log_html2notes.txt
file, it seems that the createNewDeck()
runs successfully, cause it created the deck indeed, but the processHtmlFiles()
can't work normally.
I don't understand why it can't work. Node modules were installed, html files were generated, Anki Connect worked normally, and NO error info can be seen from the console. Could you please share some experience or advice on this problem? Thank you.
My environment info:
OS: Windows 10 22H2
NodeJS version: 18.17.0
Pnpm version: 8.6.11
Anki version: 2.1.65
Anki Connect version: latest
Found mkanki
takes AGPLv3 as its license:
mkanki is licensed to everyone under the terms of the GNU Affero General Public License v3. If you'd like to use mkanki under different terms, I'm happy to accommodate you—just email me!
I asked GPT and it gave me info as follows:
If a project you depend on is licensed under the GNU Affero General Public License v3 (AGPLv3), there are specific steps you should take to ensure your GitHub project complies with the terms of this license:
Clearly Identify Dependencies:
- Clearly indicate in your project that you are using components covered by the AGPLv3 license. This can be done through documentation, comments, or other appropriate means.
Provide Access to Source Code:
- If your project provides services over a network and uses AGPLv3-licensed components, ensure that users who interact with your service can access the modified source code. This usually involves providing a way to obtain the source code, such as through a link within your project.
Include License and Copyright Notices:
- Include the full text of the AGPLv3 license and the copyright notices for each AGPLv3-licensed component used in your project. This is typically done in the root directory or relevant files of your project.
Update README File:
- In your project's README file, explicitly mention that you are using AGPLv3-licensed components and provide a way for users to access the modified source code.
Comply with AGPLv3 Requirements:
- Adhere to the requirements of the AGPLv3 license, which state that even if you do not directly distribute the code, users accessing your project over a network have the right to access and request the modified source code.
Consider Legal Advice:
- As AGPLv3 is a copyleft license with legal implications, it's advisable to consult legal experts to ensure your project fully aligns with the terms of the license.
Keep in mind that these steps are general guidelines, and the specific actions you need to take might vary based on the nature of your project and legal regulations. When dealing with projects licensed under AGPLv3, it's important to have a comprehensive understanding of the license's requirements and ensure compliance
Found genanki-js just now. It's a JS implementation of genanki, which allows us to programatically generate decks for Anki.
For now html2notes.js
is actually to create a new deck and note type, then import HTML files fetched in the former step directly into users' Anki with anki-connect API. We actually encountered some problems in this way, which has been discussed in #3 . It looks like hard to solve, so I'm thinking about taking genanki-js for the process of converting and importing notes. In that case, we can simply generate .apkg
packages and leave the task of importing to users.
This repo is actually named Generater
instead of an importing tool. Moreover, the most important is the issue previously mentioned could be avoided since generating apkg
files and manually importing them is way more steady than the whole steps of taking anki-connect API to connect with your opening Anki program and invoking those importing related methods
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.