a2pcej, convert Alphabet to Phonetic Code in English and Japanese.
Project description
a2pcej
a2pcej, convert Alphabet to Phonetic Code in English and Japanese.
This module convert each alphabet letters to phonetic code, and also convert each alphabet letters to katakana.
Functions
conv_al(letters, delimiter='-', upper_sign='(CAPS)', num=False)
letters is string.
def conv_al(letters, delimiter='-', sign='(CAPS)', num=False):
return str
conv_ak(letters, delimiter='・', upper_sign='(大文字)', num=False)
letters is string.
def conv_ak(letters, delimiter='・', sign='(大文字)', num=False):
return str
Simple example of usage
First of all, import module.
>>> from a2pcej import *
Convert 'examples' to Phonetic code in English.
>>> conv_al('examples')
'Echo-Xray-Alfa-Mike-Papa-Lima-Echo-Sierra'
Convert 'examples' to Phonetic code in Japanese Katakana.
>>> conv_ak('examples')
'イー・エクス・エイ・エム・ピー・エル・イー・エス'
Non alphabet letters are not convert (default).
Upper case letters has (CAPS) or (大文字) sign (default).
>>> conv_al('Examples002')
'Echo(CAPS)-Xray-Alfa-Mike-Papa-Lima-Echo-Sierra-0-0-2'
>>> conv_ak('Examples002')
'イー(大文字)・エクス・エイ・エム・ピー・エル・イー・エス・0・0・2'
You can change delimiter and Upper case letters sign.
>>> conv_al('Examples003', delimiter=', ', sign='(CAPITAL)')
'Echo(CAPITAL), Xray, Alfa, Mike, Papa, Lima, Echo, Sierra, 0, 0, 3'
>>> conv_ak('Examples003', delimiter='/', sign='(大)')
'イー(大)/エクス/エイ/エム/ピー/エル/イー/エス/0/0/3'
If you would like to convert numbers to phonetic code, set num=True.
>>> conv_al('Examples004', num=True)
'Echo(CAPS)-Xray-Alfa-Mike-Papa-Lima-Echo-Sierra-zero-zero-four'
>>> conv_ak('Examples004', num=True)
'イー(大文字)・エクス・エイ・エム・ピー・エル・イー・エス・ゼロ・ゼロ・ヨン'
Development and Release
Setting up for development
# Clone the repository
git clone https://github.com/kacchan822/a2pcej.git
cd a2pcej
# Install in development mode
pip install -e .[dev]
# Run tests
pytest tests/ -v
# Format code
black .
isort .
# Lint code
flake8 .
Release Process
This project uses automated releases via GitHub Actions. To create a new release:
- Update the version information and commit your changes
- Create and push a tag:
git tag v1.0.0 # Replace with your version git push origin v1.0.0
- GitHub Actions will automatically:
- Run tests across multiple Python versions
- Build the package
- Publish to PyPI
GitHub Actions Setup
To enable automatic PyPI publishing, you need to set up authentication:
Option 1: PyPI API Token (Traditional)
- Create an API token on PyPI
- Add it as
PYPI_API_TOKENin GitHub repository secrets
Option 2: Trusted Publishing (Recommended)
- Configure Trusted Publishing on PyPI for this repository
- No secrets needed - uses OpenID Connect (OIDC)
For more details, see the PyPI documentation on Trusted Publishing.
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 a2pcej-0.2.4.tar.gz.
File metadata
- Download URL: a2pcej-0.2.4.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a895d48918f3c76a6db7768214cb7b95eaf8071d7af16d71478b27268f487f9c
|
|
| MD5 |
4644b367e1f1375103e06e0a996d3c27
|
|
| BLAKE2b-256 |
1751464613eb079211e9b0265b1d37ea7b0fd6274a47b8cd9bdea6c2f6f16ed9
|
Provenance
The following attestation bundles were made for a2pcej-0.2.4.tar.gz:
Publisher:
publish.yml on kacchan822/a2pcej
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
a2pcej-0.2.4.tar.gz -
Subject digest:
a895d48918f3c76a6db7768214cb7b95eaf8071d7af16d71478b27268f487f9c - Sigstore transparency entry: 412154966
- Sigstore integration time:
-
Permalink:
kacchan822/a2pcej@101cbe004761631945f38d18f49b5654773fd3fe -
Branch / Tag:
refs/tags/v0.2.4 - Owner: https://github.com/kacchan822
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@101cbe004761631945f38d18f49b5654773fd3fe -
Trigger Event:
push
-
Statement type:
File details
Details for the file a2pcej-0.2.4-py3-none-any.whl.
File metadata
- Download URL: a2pcej-0.2.4-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c3b4b93332765143eefc2b3d74e2edab4d20de0041d01f6372bd8850a014b4d
|
|
| MD5 |
6799143261ce8bbfa2e519f7973f6f78
|
|
| BLAKE2b-256 |
ae87736baddc057ff19867a34e1868679de15ae4cdd348b24a7585abfec8381a
|
Provenance
The following attestation bundles were made for a2pcej-0.2.4-py3-none-any.whl:
Publisher:
publish.yml on kacchan822/a2pcej
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
a2pcej-0.2.4-py3-none-any.whl -
Subject digest:
3c3b4b93332765143eefc2b3d74e2edab4d20de0041d01f6372bd8850a014b4d - Sigstore transparency entry: 412154969
- Sigstore integration time:
-
Permalink:
kacchan822/a2pcej@101cbe004761631945f38d18f49b5654773fd3fe -
Branch / Tag:
refs/tags/v0.2.4 - Owner: https://github.com/kacchan822
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@101cbe004761631945f38d18f49b5654773fd3fe -
Trigger Event:
push
-
Statement type: