Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🇷🇺 Документация на русском языке: README_RU

Roland SP-404MK2 shortcuts

Parse PDF manual to extract shortcut info, translate and edit manually.

Publish as Telegra.ph page. Example: https://telegra.ph/sp404-hotkeys-11-11 (Ru).

Publish as Markdown file. Example: https://sp404.ru/SP-404MK2/shortcuts (Ru).

How it works

Official Roland SP-404MK2 Manual PDF contains tables with all (?) keyboard shortcuts. Download fresh manual into the /pdf folder and verify the filename in main.py to match.

This script parses the PDF by jsvine/pdfplumber Python module and saves texts as a JSON file tables.json by default.

Saved texts can be translated via Deepl API to most of the languages. Source texts and the translations are saved to a new JSON file, bilingual.json by default. Register for DeepL free account to get an API key. You;ll need to attach a valid credit card once for verification. Free quota is more than enough to translate all the strings in the shortcut guide.

Please take some time to read through generated translations and manually edit some of the texts.

Finally, publish translated info from the edited JSON file (see translated.json) to a Telegra.ph page for a quick Instant View in Telegram. Script uses Telegra.ph API for the task.

Settings

Provided .env.example contains the keys expected to be in production .env file:

  • DEEPL_API_KEY - deepl.com API key to translate all strings (once).
  • PROXY - HTTP proxy settings to access DeepL API from locations where their service is not available.
  • TELEGRAPH_TOKEN - Telegra.ph account token to create and update the page
  • TELEGRAPH_PAGE_PATH - Telegra.ph page path to edit. Page needs to be created beforehead.

Development

DISCLAIMER. I pulled this off as a quick free evening project, so pardon the code quality. Also there was quite a time I last used Python, bare with me.

You are more than welcome to contribute to the project:

  • refactor
  • add support for multiple languages
  • translate and publish more language translations of the shortcuts.

Looking forward to see your pull requests!

About

Roland SP-404MK2 keyboard shortcuts parsed from manual PDF, translated with DeepL and published as Telegra.ph page

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages