Metadata-Version: 2.3
Name: thai-python-translator
Version: 0.1.2
Summary: A tool to write Python code using Thai syntax
Project-URL: Homepage, https://github.com/yourusername/thai-python-translator
Project-URL: Repository, https://github.com/yourusername/thai-python-translator
Project-URL: Issues, https://github.com/yourusername/thai-python-translator/issues
Author-email: Tobias Andraschko <inquiries@ta-software-solutions.de>
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
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Education
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.6
Description-Content-Type: text/markdown

# 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