GithubHelp home page GithubHelp logo

quasimurdock / ielts-anki-cards-generator Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 2.0 1.34 MB

A script for fetching camb dict IELTS words and generate Anki card notes.

License: Other

JavaScript 16.50% CSS 83.50%
anki anki-cards cambridge dictionary english english-learning ielts vocabulary

ielts-anki-cards-generator's Introduction

GitHub Streak

trophy

ielts-anki-cards-generator's People

Contributors

quasimurdock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

serifold nubeeid

ielts-anki-cards-generator's Issues

No css style by default. must import by myself

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.

[Bug] Unsteadiness of generating notes from html files

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.

If example sentences could be accompanied by both American and British real human pronunciations, it would be even better.

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.

great program, save me a lot of time.

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.

The cards take up too much space

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?

Can't create cards in deck by 'pnpm note'

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;

image

Then I go to Anki, found the IELTS-CamDict-Words deck was auto-generated, but without any cards;

image

I checked the html folder, these files was created normally indeed;

image

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;

image

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

[License] license needed

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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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

[Roadmap] ideas about taking another dependency for generating notes

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.