Giter VIP home page Giter VIP logo

ankigenbot's Introduction

ankigenbot

@ankigen_bot, Telegram bot to automatically generate and upload anki cards to ankisrs.net.

Anki is a very effective program to learn vocabulary, but anki does not have any way to generate cards automatically. Given a word in English, Spanish or French this bot will send you definitions with sentence examples and with a tap you can add them to your anki deck.

Anki + @ankigen_bot is the best way to learn vocabulary: Send the bot every word you do not understand when you are reading, studying or interacting with people, it will not take you time and anki will make sure you do not ever forget all those words.

Features

  • Generate flashcards with definitions and examples for English, Spanish and French.

    • The word from the example is removed. In English, regular derivatives of the words are removed.
  • Automatically upload the cards to the deck of your anki account you select.

  • Generate the cards with the front/back fields swapped with /swap. Definition is front by default.

  • Include the pronunciation of the word in the flashcard with /ipa. Disabled by default.


If you want @ankigen_bot to support another language, you can open an issue and point me to a hopefully nice, free and simple dictionary for that language.

image3

Write a word and select the definitions you want


Installation

For executing this code, you will need to have:

  • The following python libraries: sqlite3, selenium, the telegram-bot libraries and pronouncing. For instance, with pip it would be
pip3 install sqlite3 selenium python-telegram-bot pronouncing
  • translate shell, follow the instructions in the repository for installation.

  • Create a file called private_conf.py with a variable token_id initialized to the toked_id of your telegram bot. You also have to create in the root directory two folders called data and log. In commands:

git clone https://github.com/damaru2/ankigenbot
cd ankigenbot
mkdir data log
echo "token_id = '<your_bot_token_id>'" > ./src/private_config.py
  • Chrome (or Chromium). Open src/send_card.py and edit options.binary_location so it points to where your Chrome/Chromium binary file is.

Once everything is installed you can run the bot from the root directory:

python3 src/ankigen_bot.py

ankigenbot's People

Contributors

damaru2 avatar

Watchers

 avatar

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.