Convert AutoKey phrase entries to Espanso YAML format
Project description
autokey2espanso
Convert AutoKey phrase entries into Espanso YAML configuration.
Why?
If you are migrating from AutoKey to Espanso, this tool converts your existing phrase entries automatically.
It reads matching .json and .txt pairs and generates a valid Espanso matches: configuration.
Requirements
- Python 3.8+
Installation
Clone the repository:
git clone https://github.com/johannjdk/autokey2espanso.git
cd autokey2espanso
pip install .
Or run directly:
python3 autokey2espanso/cli.py <directory>
Usage
Basic usage (prints YAML to stdout):
autokey2espanso /path/to/autokey/phrases
Write output to file:
autokey2espanso /path/to/autokey/phrases -o espanso.yml
Verbose mode:
autokey2espanso /path/to/autokey/phrases -o espanso.yml -v
Word mode (-w / --wordmode):
autokey2espanso /path/to/autokey/phrases -o espanso.yml -w
Custom prefix (-p / --prefix):
autokey2espanso /path/to/autokey/phrases -p ":" -o espanso.yml
When enabled, the prefix will be added before each trigger. If omitted, triggers are taken 1:1 from AutoKey.
When word mode is enabled, each entry will include:
word: true
This is useful for triggers that should only match entire words in Espanso.
How it works
For each entry, both files must exist:
Example.json
Example.txt
The first abbreviation inside the JSON file becomes the Espanso trigger. With optional prefix:
"abbreviations": ["hello"]
Becomes with -p ":":
matches:
- trigger: ":hello"
replace: |
Hello World!
Or 1:1 (no prefix):
matches:
- trigger: "hello"
replace: |
Hello World!
If word mode is enabled:
matches:
- trigger: ":hello"
word: true
replace: |
Hello World!
License
MIT
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autokey2espanso-1.0.2.tar.gz.
File metadata
- Download URL: autokey2espanso-1.0.2.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6229b84c267e5c4b7d6e0b2318a1e11e1ba581d7cfed52076fd58de83c949cef
|
|
| MD5 |
df19c4f40f476a421fd2ecd3996a9997
|
|
| BLAKE2b-256 |
fad890274728ba2b09bb57778856493b1849e429264d6dd32ad94c7fedc18d68
|
Provenance
The following attestation bundles were made for autokey2espanso-1.0.2.tar.gz:
Publisher:
python-publish.yml on johannjdk/autokey2espanso
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autokey2espanso-1.0.2.tar.gz -
Subject digest:
6229b84c267e5c4b7d6e0b2318a1e11e1ba581d7cfed52076fd58de83c949cef - Sigstore transparency entry: 1065656125
- Sigstore integration time:
-
Permalink:
johannjdk/autokey2espanso@045e2a417c676a3de77a709cc599c75043ef46b6 -
Branch / Tag:
refs/tags/1.0.2 - Owner: https://github.com/johannjdk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@045e2a417c676a3de77a709cc599c75043ef46b6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file autokey2espanso-1.0.2-py3-none-any.whl.
File metadata
- Download URL: autokey2espanso-1.0.2-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c65c334d446c846078c397da4e358b0565ddcdccb72b1695ee000fe8d4f8388
|
|
| MD5 |
f08596f7243acf34fe2c45b660dd694c
|
|
| BLAKE2b-256 |
811e290bbbd7886c28ef131c01917222dd5c7c4a7e62e93dc3da337bb88ddea8
|
Provenance
The following attestation bundles were made for autokey2espanso-1.0.2-py3-none-any.whl:
Publisher:
python-publish.yml on johannjdk/autokey2espanso
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autokey2espanso-1.0.2-py3-none-any.whl -
Subject digest:
7c65c334d446c846078c397da4e358b0565ddcdccb72b1695ee000fe8d4f8388 - Sigstore transparency entry: 1065656126
- Sigstore integration time:
-
Permalink:
johannjdk/autokey2espanso@045e2a417c676a3de77a709cc599c75043ef46b6 -
Branch / Tag:
refs/tags/1.0.2 - Owner: https://github.com/johannjdk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@045e2a417c676a3de77a709cc599c75043ef46b6 -
Trigger Event:
release
-
Statement type: