A package that replicates js fumen in python. More description on 'https://github.com/hsohliyt105/py-fumen'
Project description
py-fumen
Python implementation of knewjade's fumen
Installation
Enter pip install py-fumen in terminal / cmd if you have python3 already.
Uses
The usage of this package is very similar to the original fumen package.
Decode
from py_fumen.decoder import decode
decode_pages = decode("v115@vhHJEJWPJyKJz/I1QJUNJvIJAgH")
for page in decode_pages:
print(page.get_field().string())
Encode
from py_fumen.encoder import encode
from py_fumen.field import Field, create_inner_field
from py_fumen.page import Page
pages = []
pages.append(
Page(field=create_inner_field(Field.create(
'LLL_____SS' +
'LOO____SST' +
'JOO___ZZTT' +
'JJJ____ZZT',
'__________',
)),
comment='Perfect Clear Opener'))
print(encode(pages))
Difference between the knewjade's fumen
Some of functions and variables are non-private because of the disparity between python and typescript (e.g. quiz variable in the Quiz class).
Function and varibale names are changed with python naming convention.
create_inner_field function and create_new_inner_field are moved to field.py because of cross importing issue.
page.py is created for better OOP.
js_escape.py is added to imitate javascript's escape/unescape.
buffer.ts is renamed to fumen_buffer.py and Buffer object to FumenBuffer.
getters and setters are changed into methods (e.g. Page.get_field()).
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 py_fumen-0.1.11.tar.gz.
File metadata
- Download URL: py_fumen-0.1.11.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33fdd4c24e032436ea7f78a019f78a8d3e6d0798074995b935ef24fa725cc363
|
|
| MD5 |
5aee680ec0df9d729d2126b995540165
|
|
| BLAKE2b-256 |
db8c9d553a6596e2a94039a3fed92faba74d09730234a6b8396605dea2397caa
|
File details
Details for the file py_fumen-0.1.11-py3-none-any.whl.
File metadata
- Download URL: py_fumen-0.1.11-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5c57022b8aec455d7f2760f57d57d5f71c00ee84701a43ce74000dc09ad0658
|
|
| MD5 |
210fbe2c86ce44f27f5e6365d5fb63b9
|
|
| BLAKE2b-256 |
40bc97d17c49fab86141b7beb3514b8a97de958762fbc11577f268987275e663
|