Name | thai-python-translator JSON |
Version |
0.1.2
JSON |
| download |
home_page | None |
Summary | A tool to write Python code using Thai syntax |
upload_time | 2024-12-08 17:00:18 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.6 |
license | MIT License Copyright (c) 2024 Tobias Andraschko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
education
language
python
thai
translator
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Thai Python Translator
A tool that allows you to write Python code using Thai syntax. Write Python programs in Thai while maintaining full Python compatibility!
Published to [pypi.org](https://pypi.org/project/thai-python-translator/)
## Features
- Write Python code using Thai keywords and syntax
- Built-in support for common Python functions in Thai
- Automatic translation to standard Python
- Thai error messages for better debugging
- Support for:
- Functions (ฟังก์ชัน)
- Control flow (ถ้า, ทำอีก, หรือถ้า)
- Error handling (พยายาม, จับข้อผิดพลาด)
- Basic operators (บวก, ลบ, คูณ, หาร)
- Built-in functions (พิมพ์, ตัวเลข, ข้อความ, etc.)
## Installation
```bash
pip install thai-python-translator
```
## Usage
1. Create a Thai Python file (e.g., `hello.py`):
```python
ฟังก์ชัน ทักทาย():
พิมพ์("สวัสดี โลก!")
ทักทาย()
```
2. Run it using the CLI:
```bash
thai-python hello.py
```
## Examples
### Hello World
```python
ฟังก์ชัน ทักทาย():
ถ้า จริง:
พิมพ์("สวัสดี โลก!")
ทักทาย()
```
### Grade Calculator
```python
ฟังก์ชัน คำนวณเกรด(คะแนน):
ถ้า คะแนน มากกว่าเท่ากับ 80:
ส่งคืน "A"
หรือถ้า คะแนน มากกว่าเท่ากับ 70:
ส่งคืน "B"
หรือถ้า คะแนน มากกว่าเท่ากับ 60:
ส่งคืน "C"
ทำอีก:
ส่งคืน "F"
พยายาม:
คะแนน = ตัวเลข(input("ใส่คะแนนของคุณ: "))
เกรด = คำนวณเกรด(คะแนน)
พิมพ์(f"เกรดของคุณคือ: {เกรด}")
จับข้อผิดพลาด:
พิมพ์("กรุณาใส่ตัวเลขที่ถูกต้อง")
```
## Publishing to PyPI
To publish this to PyPI:
1. Install build tools:
```bash
pip install build twine
```
2. Build the package:
```bash
python -m build
```
3. Upload to PyPI:
```bash
twine upload dist/*
```
## Development
To contribute to this project:
1. Clone the repository
2. Install in development mode:
```bash
pip install -e .
```
## TODO
Future enhancements could include:
- More Thai keywords and built-in functions
- Better error messages and debugging tools
- Support for more Python features (classes, decorators, etc.)
- Documentation in Thai
- Interactive REPL in Thai
## License
MIT
Raw data
{
"_id": null,
"home_page": null,
"name": "thai-python-translator",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "education, language, python, thai, translator",
"author": null,
"author_email": "Tobias Andraschko <inquiries@ta-software-solutions.de>",
"download_url": "https://files.pythonhosted.org/packages/6b/53/2068969c9639d70634af14a17f0ec53f5c85cff2e97423d249598c93022a/thai_python_translator-0.1.2.tar.gz",
"platform": null,
"description": "# Thai Python Translator\n\nA tool that allows you to write Python code using Thai syntax. Write Python programs in Thai while maintaining full Python compatibility!\nPublished to [pypi.org](https://pypi.org/project/thai-python-translator/)\n\n## Features\n\n- Write Python code using Thai keywords and syntax\n- Built-in support for common Python functions in Thai\n- Automatic translation to standard Python\n- Thai error messages for better debugging\n\n- Support for:\n - Functions (\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e19)\n - Control flow (\u0e16\u0e49\u0e32, \u0e17\u0e33\u0e2d\u0e35\u0e01, \u0e2b\u0e23\u0e37\u0e2d\u0e16\u0e49\u0e32)\n - Error handling (\u0e1e\u0e22\u0e32\u0e22\u0e32\u0e21, \u0e08\u0e31\u0e1a\u0e02\u0e49\u0e2d\u0e1c\u0e34\u0e14\u0e1e\u0e25\u0e32\u0e14)\n - Basic operators (\u0e1a\u0e27\u0e01, \u0e25\u0e1a, \u0e04\u0e39\u0e13, \u0e2b\u0e32\u0e23)\n - Built-in functions (\u0e1e\u0e34\u0e21\u0e1e\u0e4c, \u0e15\u0e31\u0e27\u0e40\u0e25\u0e02, \u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21, etc.)\n\n## Installation\n\n```bash\npip install thai-python-translator\n```\n\n## Usage\n\n1. Create a Thai Python file (e.g., `hello.py`):\n```python\n\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e19 \u0e17\u0e31\u0e01\u0e17\u0e32\u0e22():\n \u0e1e\u0e34\u0e21\u0e1e\u0e4c(\"\u0e2a\u0e27\u0e31\u0e2a\u0e14\u0e35 \u0e42\u0e25\u0e01!\")\n\n\u0e17\u0e31\u0e01\u0e17\u0e32\u0e22()\n```\n\n2. Run it using the CLI:\n```bash\nthai-python hello.py\n```\n\n## Examples\n\n### Hello World\n```python\n\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e19 \u0e17\u0e31\u0e01\u0e17\u0e32\u0e22():\n \u0e16\u0e49\u0e32 \u0e08\u0e23\u0e34\u0e07:\n \u0e1e\u0e34\u0e21\u0e1e\u0e4c(\"\u0e2a\u0e27\u0e31\u0e2a\u0e14\u0e35 \u0e42\u0e25\u0e01!\")\n\n\u0e17\u0e31\u0e01\u0e17\u0e32\u0e22()\n```\n\n### Grade Calculator\n```python\n\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e19 \u0e04\u0e33\u0e19\u0e27\u0e13\u0e40\u0e01\u0e23\u0e14(\u0e04\u0e30\u0e41\u0e19\u0e19):\n \u0e16\u0e49\u0e32 \u0e04\u0e30\u0e41\u0e19\u0e19 \u0e21\u0e32\u0e01\u0e01\u0e27\u0e48\u0e32\u0e40\u0e17\u0e48\u0e32\u0e01\u0e31\u0e1a 80:\n \u0e2a\u0e48\u0e07\u0e04\u0e37\u0e19 \"A\"\n \u0e2b\u0e23\u0e37\u0e2d\u0e16\u0e49\u0e32 \u0e04\u0e30\u0e41\u0e19\u0e19 \u0e21\u0e32\u0e01\u0e01\u0e27\u0e48\u0e32\u0e40\u0e17\u0e48\u0e32\u0e01\u0e31\u0e1a 70:\n \u0e2a\u0e48\u0e07\u0e04\u0e37\u0e19 \"B\"\n \u0e2b\u0e23\u0e37\u0e2d\u0e16\u0e49\u0e32 \u0e04\u0e30\u0e41\u0e19\u0e19 \u0e21\u0e32\u0e01\u0e01\u0e27\u0e48\u0e32\u0e40\u0e17\u0e48\u0e32\u0e01\u0e31\u0e1a 60:\n \u0e2a\u0e48\u0e07\u0e04\u0e37\u0e19 \"C\"\n \u0e17\u0e33\u0e2d\u0e35\u0e01:\n \u0e2a\u0e48\u0e07\u0e04\u0e37\u0e19 \"F\"\n\n\u0e1e\u0e22\u0e32\u0e22\u0e32\u0e21:\n \u0e04\u0e30\u0e41\u0e19\u0e19 = \u0e15\u0e31\u0e27\u0e40\u0e25\u0e02(input(\"\u0e43\u0e2a\u0e48\u0e04\u0e30\u0e41\u0e19\u0e19\u0e02\u0e2d\u0e07\u0e04\u0e38\u0e13: \"))\n \u0e40\u0e01\u0e23\u0e14 = \u0e04\u0e33\u0e19\u0e27\u0e13\u0e40\u0e01\u0e23\u0e14(\u0e04\u0e30\u0e41\u0e19\u0e19)\n \u0e1e\u0e34\u0e21\u0e1e\u0e4c(f\"\u0e40\u0e01\u0e23\u0e14\u0e02\u0e2d\u0e07\u0e04\u0e38\u0e13\u0e04\u0e37\u0e2d: {\u0e40\u0e01\u0e23\u0e14}\")\n\u0e08\u0e31\u0e1a\u0e02\u0e49\u0e2d\u0e1c\u0e34\u0e14\u0e1e\u0e25\u0e32\u0e14:\n \u0e1e\u0e34\u0e21\u0e1e\u0e4c(\"\u0e01\u0e23\u0e38\u0e13\u0e32\u0e43\u0e2a\u0e48\u0e15\u0e31\u0e27\u0e40\u0e25\u0e02\u0e17\u0e35\u0e48\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07\")\n```\n\n## Publishing to PyPI\n\nTo publish this to PyPI:\n\n1. Install build tools:\n```bash\npip install build twine\n```\n\n2. Build the package:\n```bash\npython -m build\n```\n\n3. Upload to PyPI:\n```bash\ntwine upload dist/*\n```\n\n## Development\n\nTo contribute to this project:\n\n1. Clone the repository\n2. Install in development mode:\n```bash\npip install -e .\n```\n\n## TODO\n\nFuture enhancements could include:\n\n- More Thai keywords and built-in functions\n- Better error messages and debugging tools\n- Support for more Python features (classes, decorators, etc.)\n- Documentation in Thai\n- Interactive REPL in Thai\n\n## License\n\nMIT",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Tobias Andraschko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "A tool to write Python code using Thai syntax",
"version": "0.1.2",
"project_urls": {
"Homepage": "https://github.com/yourusername/thai-python-translator",
"Issues": "https://github.com/yourusername/thai-python-translator/issues",
"Repository": "https://github.com/yourusername/thai-python-translator"
},
"split_keywords": [
"education",
" language",
" python",
" thai",
" translator"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "17707a012cac8a8ee27e7dc36f30b901198c55bd57bdd5f650a5825146cb30bc",
"md5": "c01a216d7548c9c6a0d133c1987cb395",
"sha256": "d8bbd8c86c1ac3351df19f15a8eec24a641e8593daf431927044d1a3922b8610"
},
"downloads": -1,
"filename": "thai_python_translator-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c01a216d7548c9c6a0d133c1987cb395",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 10398,
"upload_time": "2024-12-08T17:00:17",
"upload_time_iso_8601": "2024-12-08T17:00:17.393068Z",
"url": "https://files.pythonhosted.org/packages/17/70/7a012cac8a8ee27e7dc36f30b901198c55bd57bdd5f650a5825146cb30bc/thai_python_translator-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6b532068969c9639d70634af14a17f0ec53f5c85cff2e97423d249598c93022a",
"md5": "c14f2472cb7187873587fca347775cae",
"sha256": "4d6a4c10351bbcd163a6d776990d049fe482978d5fd5130a969f737a5040fb58"
},
"downloads": -1,
"filename": "thai_python_translator-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "c14f2472cb7187873587fca347775cae",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 8751,
"upload_time": "2024-12-08T17:00:18",
"upload_time_iso_8601": "2024-12-08T17:00:18.939934Z",
"url": "https://files.pythonhosted.org/packages/6b/53/2068969c9639d70634af14a17f0ec53f5c85cff2e97423d249598c93022a/thai_python_translator-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-08 17:00:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yourusername",
"github_project": "thai-python-translator",
"github_not_found": true,
"lcname": "thai-python-translator"
}