Skip to main content

A command line tool that helps you learn Swedish

Project description

Swedishelf

Installation

Linux

First, install ffplay (part of the FFmpeg package). The following example uses Ubuntu:

sudo apt update
sudo apt install ffmpeg -y

Verify that ffplay is installed correctly:

ffplay -version

Install swedishelf:

pip install swedishelf

Windows

Configure UTF-8 Support

Before installing swedishelf, you need to enable UTF-8 support on Windows:

  1. Open Control PanelClock and RegionRegion
  2. Click the Administrative tab → Change system locale
  3. Check the box for "Beta: Use Unicode UTF-8 for worldwide language support"
  4. Restart your system

Install swedishelf

After restarting your system, install swedishelf:

pip install swedishelf

Usage

To use swedishelf, simply run the command swedishelf in your terminal. This will start an interactive session where you can practice your Swedish language skills.

Options

You can customize your experience with the following options:

  • -d or --dic: Specify dict file, will use default dict if not specified.
  • -n or --num: Number of questions for this round.
  • -m or --mute: If mute, will not play audio.
  • -c or --choices: Number of choices for each question, the bigger, the harder.
  • -v or --version: Show version and exit.
  • --help: Show CLI help and exit.

Example

Here's an example of how to use swedishelf with the default settings, open a terminal and run:

$ swedishelf

This will start a session with 20 questions, using the default dictionary file.

FAQs

Q: Why does the program take a long time on first start?

A: When you run swedishelf for the first time, it may take 10 seconds or more to start. This is because the program is downloading the dictionary file. This download only occurs on the first run.

You can download the JSON dictionary from here. Then run the program with

$ swedishelf -d <your_local_path_to_json_dictionary>

Q: Why doesn't the program show the next question immediately after I have answered one?

A: The audio of the question you just answered is playing, and swedishelf is downloading the audio for the next question at this time without blocking. The downloading duration depends on the network conditions. If you run the program with the -m or --mute option, this delay will not occur.

Contributing

If you'd like to contribute to swedishelf, please fork the repository and submit a pull request with your changes. You can also report issues or suggest new features on the issue tracker.

Licensing

swedishelf is licensed under the MIT License. See the LICENSE file for more information.

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

swedishelf-0.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

swedishelf-0.1.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file swedishelf-0.1.0.tar.gz.

File metadata

  • Download URL: swedishelf-0.1.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for swedishelf-0.1.0.tar.gz
Algorithm Hash digest
SHA256 43d7be2da9aaeeaea508760037ded0d5db417de0bb67a473723b2b288cd2c37e
MD5 0e910ed27a677ff31fa6a2b94e6ce722
BLAKE2b-256 b46007ea922f4aefab4d9291769b309f5c8b993056ac8f1b72a52717a3f27f25

See more details on using hashes here.

File details

Details for the file swedishelf-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: swedishelf-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for swedishelf-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cfc2fbe04d83c0d677a9eec3782695160a65600ee935d109fb9624ce88def177
MD5 04e9364975ee6a1b50054ab4ead47b13
BLAKE2b-256 078839c8abe58ad49971529b8a1410b9dce165a6b37f23402c7036deda431cb6

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