Skip to main content

No project description provided

Project description

LingQ

Command line utilities and scripts for interacting with LingQ's API.

You will need a LingQ API key. You can get it from here.

Installation

(Optional) Create a virtual environment: python3 -m venv venv and activate it.

Then either directly:

pip install git+https://github.com/daxida/lingq

Or clone the repository:

git clone https://github.com/daxida/lingq
cd lingq
pip install .

Finally, run:

lingq setup yourLingqApiKey

This will create an .env file in the root directory with your API key.

How to use

Some examples:

# Upload a playlist to a greek course.
lingq postyt el 129129 "https://www.youtube.com/@awesomeyoutuber"

# Bulk upload a book split by chapters.
lingq post el 129139 "example/texts" -a "example/audios" --pairing-strategy zip

# Timestamp an entire german course.
lingq timestamp de 129129

The full set of commands can be found with lingq --help. Per command information uses again the help flag: lingq timestamp --help.

A command tree made with this:

cli - Lingq command line scripts.
├── get - Get commands.
│   ├── courses - Get every course from a list of languages.
│   ├── lessons - Get every lesson from a course id.
│   ├── images - Get images.
│   └── words - Get words (LingQs).
├── markdown - Generate markdown files for the given language codes.
├── overview - Library overview.
├── patch - Patch commands.
│   ├── audios - Patch a course audio.
│   └── texts - Not implemented.
├── post - Upload a lesson.
├── postyt - Post youtube playlist.
├── resplit - Resplit a course (only for japanese).
├── setup - Creates or updates an .env file with your LingQ API key.
├── show - Show commands.
│   └── my - Show a list with my collections in the given language.
├── sort - Sort all lessons from a course.
├── timestamp - Generate timestamps for a course.
└── yomitan - Make a Yomitan dictionary from a dump generated by 'get_words'.

Etc.

Mainly undocumented scripts to scrape, process text and audio, and to manually use whisper.

If you want to use some of it:

git clone https://github.com/daxida/lingq
cd lingq
pip install .[etc]
# And for example
python3 etc/scrape/japanese/sc_itazura.py

Links

  • Forced alignment for LingQ.
  • Legacy (v1.0 and v2.0) LingQ's API documentation.
  • A miniminalist script to upload content to LingQ. May not be up to date.
  • A script to upload youtube playlists to LingQ with Whisper generated subtitles.
  • For splitting downloaded audio from youtube.
  • Another API wrapper in ruby

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

lingq-1.0.0.tar.gz (39.4 kB view details)

Uploaded Source

Built Distribution

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

lingq-1.0.0-py3-none-any.whl (46.3 kB view details)

Uploaded Python 3

File details

Details for the file lingq-1.0.0.tar.gz.

File metadata

  • Download URL: lingq-1.0.0.tar.gz
  • Upload date:
  • Size: 39.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.2

File hashes

Hashes for lingq-1.0.0.tar.gz
Algorithm Hash digest
SHA256 173267f242c9cb73b4d9211260e0889bdf1cdc11a44bd009224875a4e4c84085
MD5 bfc4ff7f6fa213b25e9584189b624dd3
BLAKE2b-256 08160e3fccc31d43b0e3a95d12c36abde7df49aa661c828afb15ba49437da7f8

See more details on using hashes here.

File details

Details for the file lingq-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: lingq-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 46.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.2

File hashes

Hashes for lingq-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce785abc7da0062297fa27fdd0fefe33a9673446e7b24a217bb3421ffd31a555
MD5 c97db1bb3b4b5b1e9902dc2773d98568
BLAKE2b-256 61f08b92e0e29703b156646ebedf15b5342a14cded01178d78bd6544ddb9b04a

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