Skip to main content

No project description provided

Project description

VocabMaster

Master new languages with this CLI tool, designed to help you record vocabulary and create Anki flashcards without the need to manually input translations or example sentences.

vocabmaster_translate_japanese

Table of Contents

  1. Features
  2. Installation
    1. Prerequisites
    2. Install via pip
    3. Install via uv (recommended)
    4. OpenAI API key
    5. Shell Completion
  3. Usage
    1. Set up a new language pair
    2. Add words to your vocabulary list
    3. Generate an Anki deck from your vocabulary list
    4. For detailed help on each command, run
  4. Importing into Anki
  5. Licence

Features

  • Record vocabulary words with ease
  • Automatic translation and usage examples via OpenAI GPT
  • Anki integration for seamless language learning
  • Supports multiple languages

Installation

Prerequisites

  • Python 3.8 or higher
  • Compatible with Windows, Linux, and macOS

Install via pip

python3 -m pip install vocabmaster

Install via uv (recommended)

uv tool install vocabmaster

OpenAI API key

Vocabmaster requires an OpenAI API key to function. You can obtain a key by signing up for an account at OpenAI's website.

Once you have your API key, set it as an environment variable:

  • On macOS and Linux:

    export OPENAI_API_KEY="your-api-key-here"
    

    To avoid having to type it everyday, you can create a file with the key:

    echo "your-api-key" > ~/.openai-api-key.txt
    

    Note: Remember to replace "your-api-key" with your actual API key.

    And then, you can add this to your shell configuration file (.bashrc, .zshrc, etc.):

    export OPENAI_API_KEY="$(cat ~/.openai-api-key.txt)"
    
  • On Windows:

    setx OPENAI_API_KEY your_key
    

Shell Completion

To enable shell completion for bash or zsh, source the completion file (see the completion folder) related to your shell by adding the following line to your .bashrc or .zshrc file:

For bash

source /path/to/vocabmaster/completion/_complete_vocabmaster.bash

For zsh

source /path/to/vocabmaster/completion/_complete_vocabmaster.zsh

Remember to replace /path/to/vocabmaster with the actual path where the completion file is located.

Usage

Set up a new language pair

vocabmaster setup

vocabmaster_setup

Add words to your vocabulary list

vocabmaster add la casa

vocabmaster_add

Generate an Anki deck from your vocabulary list

vocabmaster translate

vocabmaster_translate

Choose where your files live

vocabmaster config dir ~/Documents/vocabmaster

Vocabulary CSV and Anki decks default to ~/.vocabmaster, but you can relocate them anywhere. The configuration file itself always stays under ~/.config/vocabmaster/config.json, and VocabMaster remembers your storage choice for future runs.

For detailed help on each command, run

vocabmaster <command> --help

Importing into Anki

To import the vocabulary deck into Anki, follow the steps below:

  1. Launch Anki.
  2. Click on the Import File button. This will open a file picker dialog.
  3. In the file picker, locate and select the anki_deck_language1-language2.csv file.
  4. Ensure the Existing notes field is set to Update. This will prevent the creation of duplicate cards if the same note already exists in your deck.

Licence

VocabMaster is released under the Apache Licence version 2.


https://github.com/sderev/vocabmaster

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vocabmaster-0.2.0.tar.gz (28.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vocabmaster-0.2.0-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

Details for the file vocabmaster-0.2.0.tar.gz.

File metadata

  • Download URL: vocabmaster-0.2.0.tar.gz
  • Upload date:
  • Size: 28.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.8

File hashes

Hashes for vocabmaster-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3a594d820bf9bb6af89fd42403521a4a27aa72ffa4c89bc0bbca51e493683132
MD5 233a1834204a3a90ce13902b89cdf04c
BLAKE2b-256 a99864584d4ee21ffed89350725df95d2f575a42ea79ae9e3d610b7e1a4afd4b

See more details on using hashes here.

File details

Details for the file vocabmaster-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: vocabmaster-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 23.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.8

File hashes

Hashes for vocabmaster-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 902d2d10394e46088bb5d4357340f330b3184157cc6fcf434171ae9bb84393b3
MD5 2cb5f8603cbfe48590df47073bd3a5b2
BLAKE2b-256 1d836ab1265e4255095cee6a3a8dcbc1a86f12d4ecb6e99ae5ead5a5b9aebb45

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page