py-long-s
This Python tool accurately inserts the historical long S character ( Å¿ ) back into the given text to make it appear as if it were written before the 20th century.
English, French, German, Spanish, and Italian are supported.
Installation
pip install long-s
The libraries used in this project can be installed separately by using:
pip install numpy python-docx odfpy unidecode
Online Converter
There's also a JavaScript version available that can be used online.
Example
import long_s
print(long_s.convert("The discussion was surprisingly insightful.", lang="en"))
print(long_s.convert("La discussion était étonnamment perspicace.", lang="fr"))
print(long_s.convert("Die Diskussion war überraschend aufschlussreich.", lang="de"))
print(long_s.convert("La discusión fue sorprendentemente perspicaz.", lang="es"))
print(long_s.convert("La discussione è stata sorprendentemente perspicace.", lang="it"))
The diſcuſſion was ſurpriſingly inſightful.
La diſcuſſion était étonnamment perſpicace.
Die Diskuſſion war überraſchend aufſchluſsreich.
La diſcuſión fue ſorprendentemente perſpicaz.
La diſcuſſione è ſtata ſorprendentemente perſpicace.
Converting Files
.txt files
long_s.convert_text_file(src_path="story.txt", dst_path=None, lang="en"))
Since dst_path is None, the program will save the converted text file as story-long-s.txt.
.odf files
long_s.convert_odf_file(src_path="story.odt", dst_path="old-story.odt", lang="en"))
.docx files
long_s.convert_docx_file(src_path="märschen.docx", lang="de"))
Special Thanks
Thank you Andrew West of the TeX Users Group for the documentation found under The Rules for Long S, which was fundamental in writing the conversion functions for English, French, Spanish, and Italian.
Metadata
Release files for long-s 1.0.33
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| long_s-1.0.33.tar.gz | 46.6 kB | Without provenance | Details for long_s-1.0.33.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| long_s-1.0.33-py3-none-any.whl | Python 3 | none | any | Details for long_s-1.0.33-py3-none-any.whl |
Total release size: 95.7 kB
Release files / long_s-1.0.33.tar.gz
| Download URL | long_s-1.0.33.tar.gz |
|---|---|
| Size | 46.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1fc07a2569812a7c58dce6cf2951e39094a2a99edec92ccf5a098bc0ee72153b
|
|
BLAKE2b-256 checksum How to use checksums |
d00b82dc0fa4c981e80143001ae6f99177d96677782e43ba3e9b4d766ff390fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.6
|
Release files / long_s-1.0.33-py3-none-any.whl
| Download URL | long_s-1.0.33-py3-none-any.whl |
|---|---|
| Size | 49.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c8d356df0d955f8f1325135d841d898d1413f6ac9beb10ed1d8a35bb128568f
|
|
BLAKE2b-256 checksum How to use checksums |
bad6c658cf0c1bd4b418e6baa610d6a3288cbc7857a41cacea21ed2cde7a8c2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.6
|
Security for long-s 1.0.33
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.