Skip to main content

A simple script to convert TextBlaze snippets to Espanso matches.

Oriented for the conversion of the whole TextBlaze repository at once using the "Export all folders" button in the settings. Will work just as fine with a single folder.

I use \ as a shortcut initiator because I think it is more convenient to access the shortcuts in a single button no matter the keyboard layout.

Prerequisites

  • Python 3.12
  • pip

Installation

  • pip install textblaze-to-espanso

Environment variables

  • TEXTBLAZE_EXPORT_JSON_PATH: path to TextBlaze export json
  • ESPANSO_MATCHES_PATH: espanso/match directory path
  • SNIPPETS_DIRECTORY_NAME="test_version": Name of the directory where new matches will be stored
  • REPLACER_CHARACTER="\\": The character that will replace the original /. I prefer backslash
  • FOLDERS_KEY="folders": TextBlaze json key containing folders with snippets
  • FOLDER_NAME_KEY="name": TextBlaze Folder name json key
  • SNIPPETS_KEY="snippets": TextBlaze snippets json key
  • SNIPPET_SHORTCUT_KEY="shortcut": TextBlaze shortcut json key
  • SNIPPET_TEXT_KEY="text" : TextBlaze text snippet json key
  • ESPANSO_FILE_EXTENSION=".yml": Espanso configuration file extension

Usage

  1. Configure paths in environment
  2. Execute the package: python -m textblaze_to_espanso --env-file=$ENV_FILE_PATH
  3. Locate the matches inside the configured directory
  4. Try to use your snippets. They should work in all environments from the get-go. You may need to reload Espanso

Metadata

Release files for textblaze-to-espanso 0.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for textblaze-to-espanso 0.1.10
File Size Uploaded
textblaze_to_espanso-0.1.10.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for textblaze-to-espanso 0.1.10
File Interpreter ABI Platform
textblaze_to_espanso-0.1.10-py3-none-any.whl Python 3 none any Details

Total release size: 9.4 kB

Release files / textblaze_to_espanso-0.1.10.tar.gz

Download URL textblaze_to_espanso-0.1.10.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f172d115af3ef82b244407be7524bea39970bf639c89ede257142eef9fcc31b4
BLAKE2b-256 checksum
How to use checksums
2d2b800b76de798754bbbdfe99c6d5c6d19622b23bda4c94e34bdea3b17c1d0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Release files / textblaze_to_espanso-0.1.10-py3-none-any.whl

Download URL textblaze_to_espanso-0.1.10-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd0b8ff4df25c4c7916692c70b925151ed16c22b6924e910b5d974bddabba95d
BLAKE2b-256 checksum
How to use checksums
5becfd6a589ab101d9e76be89f3595e1eb479afd448db00ae89ab8c94756c6f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Release history Release notifications | RSS feed

This release

0.1.10 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page