No project description provided
Project description
VocabMaster
Master new languages with this user-friendly CLI tool, designed to help you record vocabulary, access translations and examples, and seamlessly import them into Anki for an optimized language learning experience.
Table of Contents
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
You can install VocabMaster using pip. The package includes all the required dependencies. Simply run the following command:
pip install vocabmaster
Install via pipx (recommended)
pipx
is an alternative package manager for Python applications. It allows you to install and run Python applications in isolated environments, preventing conflicts between dependencies and ensuring that each application uses its own set of packages. I recommend using pipx
to install VocabMaster.
First, install pipx
if you haven't already:
-
On macOS and Linux:
python3 -m pip install --user pipx python3 -m pipx ensurepath
Alternatively, you can use your package manager (brew
, apt
, etc.).
-
On Windows:
py -m pip install --user pipx py -m pipx ensurepath
Once pipx
is installed, you can install VocabMaster using the following command:
pipx 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
Before using VocabMaster, you need to set up the OpenAI API key, which is required for the translations and usage examples.
Follow the instructions provided within the CLI tool to configure the API key:
vocabmaster config key
Below is an example of common commands and their usage:
Set up a new language pair
vocabmaster setup
Add words to your vocabulary list
vocabmaster add la casa
Generate an Anki deck from your vocabulary list
vocabmaster translate
For detailed help on each command, run
vocabmaster <command> --help
Licence
VocabMaster is released under the MIT Licence.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for vocabmaster-0.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 919f42c4bd0aa9fc0fff25936970d384d50ff9cd3ccc20c1dd780c10c7ff2f2b |
|
MD5 | 895bf96699cdecf4475aae8920bfd101 |
|
BLAKE2b-256 | 80ba5b5106a5717a8603836d2dc0849aae5c1fe5d8b8262193350f510084e8f9 |