# py-fumen
Python implementation of knewjade's fumen
# 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))
```
# Installation
In command prompt or terminal or equivalent, run
```
pip install py-fumen
```
# 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()).
Raw data
{
"_id": null,
"home_page": "https://github.com/hsohliyt105/py-fumen",
"name": "py-fumen",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "fumen",
"author": "hsohliyt105",
"author_email": "hsohliyt105 <hsohliyt105@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/30/dc/fb827e26cd3019b79fa4d581385438a57e9c3ad07ec468e9b187e57693dd/py_fumen-0.1.5.tar.gz",
"platform": null,
"description": "# py-fumen\r\nPython implementation of knewjade's fumen\r\n\r\n# Uses\r\nThe usage of this package is very similar to the original fumen package.\r\n\r\n## Decode\r\n```\r\nfrom py_fumen.decoder import decode\r\n\r\ndecode_pages = decode(\"v115@vhHJEJWPJyKJz/I1QJUNJvIJAgH\")\r\n\r\nfor page in decode_pages:\r\n print(page.get_field().string())\r\n```\r\n\r\n## Encode\r\n```\r\nfrom py_fumen.encoder import encode\r\nfrom py_fumen.field import Field, create_inner_field\r\nfrom py_fumen.page import Page\r\n\r\npages = []\r\npages.append(\r\n Page(field=create_inner_field(Field.create(\r\n 'LLL_____SS' +\r\n 'LOO____SST' +\r\n 'JOO___ZZTT' +\r\n 'JJJ____ZZT',\r\n '__________',\r\n )),\r\n comment='Perfect Clear Opener'))\r\n\r\nprint(encode(pages))\r\n```\r\n\r\n# Installation\r\nIn command prompt or terminal or equivalent, run \r\n```\r\npip install py-fumen\r\n```\r\n\r\n# Difference between the knewjade's fumen\r\nSome of functions and variables are non-private because of the disparity between python and typescript (e.g. quiz variable in the Quiz class).\r\n\r\nFunction and varibale names are changed with python naming convention.\r\n\r\ncreate_inner_field function and create_new_inner_field are moved to field.py because of cross importing issue.\r\n\r\npage.py is created for better OOP.\r\n\r\njs_escape.py is added to imitate javascript's escape/unescape.\r\n\r\nbuffer.ts is renamed to fumen_buffer.py and Buffer object to FumenBuffer.\r\n\r\ngetters and setters are changed into methods (e.g. Page.get_field()). \r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python implementation of knewjade's fumen",
"version": "0.1.5",
"project_urls": {
"Homepage": "https://github.com/hsohliyt105/py-fumen"
},
"split_keywords": [
"fumen"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "30dcfb827e26cd3019b79fa4d581385438a57e9c3ad07ec468e9b187e57693dd",
"md5": "f4d4e63ad9e3cce4b9648e003716e6b1",
"sha256": "f0d7bbecad26af671ee96f6d29ee4392205c315b8a0d6f0c19eb44a7f55f8dd6"
},
"downloads": -1,
"filename": "py_fumen-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "f4d4e63ad9e3cce4b9648e003716e6b1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 15523,
"upload_time": "2023-08-18T18:24:58",
"upload_time_iso_8601": "2023-08-18T18:24:58.454448Z",
"url": "https://files.pythonhosted.org/packages/30/dc/fb827e26cd3019b79fa4d581385438a57e9c3ad07ec468e9b187e57693dd/py_fumen-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-18 18:24:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hsohliyt105",
"github_project": "py-fumen",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "py-fumen"
}