Skip to main content

LoteCC

https://img.shields.io/pypi/v/lotecc.svg https://img.shields.io/travis/lonsty/lotecc.svg Documentation Status

LoteCC is a tool to convert files between Simplified Chinese and Traditional Chinese.

Features

  • File or whole project: can convert a single file or all files in your project.

  • Patterns to ignore: use .gitignore syntax to exclude unwanted files.

Usage

1. To use lotecc in terminal

$ lotecc

Above command is equal to $ lotecc -c s2t -i . --ignore .gitignore. Which convert all files in current directory and subdirectories from Simplified Chinese to Traditional Chinese, excluding files matching the pattern in .gitignore:

  • -c s2t: conversion is Simplified Chinese to Traditional Chinese

  • -i .: input is current directory

  • --ignore .gitignore: files excluding files matching the pattern in .gitignore

2. To use lotecc in a project

from lotecc import lote_chinese_conversion as lotecc

lotecc(conversion='s2t',
       input='.',
       output=None,
       in_enc='utf-8',
       out_enc='utf-8',
       suffix=None,
       ignore='.gitignore')

You can get helps by type $ lotecc --help in terminal:

Options:
  -c, --conversion TEXT  Conversion method between Simplified Chinese and
                         Traditional Chinese.  [default: s2t]
  -i, --input TEXT       Input file or directory. The default is current dir.
  -o, --output TEXT      Output file or directory. The default is the same as
                         the source file, which means that the source file
                         will be overwritten.
  -q, --quiet            Disable screen output.  [default: False]
  --ignore TEXT          Can be a .gitignore syntax file. Also can be one or
                         more patterns, separated by commas.  [default:
                         .gitignore]
  --suffix TEXT          Suffix of output filename, add this to keep both the
                         source file and converted file.
  --in-enc TEXT          Encoding for input.  [default: utf-8]
  --out-enc TEXT         Encoding for output.  [default: utf-8]
  --help                 Show this message and exit.

3. Supported conversions

  • hk2s: Traditional Chinese (Hong Kong standard) to Simplified Chinesen

  • s2hk: Simplified Chinese to Traditional Chinese (Hong Kong standard)n

  • s2t: Simplified Chinese to Traditional Chinesen

  • s2tw: Simplified Chinese to Traditional Chinese (Taiwan standard)n

  • s2twp: Simplified Chinese to Traditional Chinese (Taiwan standard, with phrases)n

  • t2hk: Traditional Chinese to Traditional Chinese (Hong Kong standard)n

  • t2s: Traditional Chinese to Simplified Chinesen

  • t2tw: Traditional Chinese to Traditional Chinese (Taiwan standard)n

  • tw2s: Traditional Chinese (Taiwan standard) to Simplified Chinesen

  • tw2sp: Traditional Chinese (Taiwan standard) to Simplified Chinese (with phrases)n

Credits

History

0.1.1 (2020-04-27)

Bug fixed:

  • Handle error of using incorrect encoding to open a file.

0.1.0 (2020-04-25)

First release on PyPI.

Features:

  • File or whole project: can convert a single file or all files in your project.

  • Patterns to ignore: use .gitignore syntax to exclude unwanted files.

Metadata

Release files for lotecc 0.1.1

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

Source distribution (sdist)

Source distribution for lotecc 0.1.1
File Size Uploaded Provenance Actions
lotecc-0.1.1.tar.gz 111.4 kB Without provenance Details for lotecc-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lotecc 0.1.1
File Interpreter ABI Platform Actions
lotecc-0.1.1-py2.py3-none-any.whl Python 2, Python 3 none any Details for lotecc-0.1.1-py2.py3-none-any.whl

Total release size: 118.4 kB

Release files / lotecc-0.1.1.tar.gz

Download URL lotecc-0.1.1.tar.gz
Size 111.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6d6feeb9128ab78e05b7414e7885878d5af38a9e8be8fff4168513ce03405447
BLAKE2b-256 checksum
How to use checksums
c80e6b63ad6dfde40f116c81d6b1ccd191cc188ff04d4e17bae3210db6ac10cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.0

Release files / lotecc-0.1.1-py2.py3-none-any.whl

Download URL lotecc-0.1.1-py2.py3-none-any.whl
Size 7.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
b6e2ea5a1a39e78a4c670001be5ca0544a4eae665a1c1038ccf8aaf2c8aec6a8
BLAKE2b-256 checksum
How to use checksums
1916bf1f7b0d65b99fbd003c6c6f5932542780efd6a1b42969d7ab8b08c3712c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.0

Security for lotecc 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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