PachaMalayalam 0.2.0
A transpiler for writing Python code using Malayalam keywords
Requires Python: >=3.7

# PachaMalayalam

**PachaMalayalam** is a Python-based transpiler that allows you to write Python code using Malayalam keywords. It transforms Malayalam-based Python-like scripts (`.pymal`) into executable Python code, enabling developers to code in a language close to their heart and culture.

## Features

- **Write Python code in Malayalam:** Use Malayalam keywords to write scripts (`.pymal` files).
- **Transpile to Python:** Automatically convert Malayalam scripts into standard Python code.
- **Execute Transpiled Code:** Run the transpiled Python code seamlessly.
- **Easy-to-Use CLI:** A command-line interface for transpiling and executing `.pymal` scripts.
- **Customizable Keyword Map:** Modify the `keyword_map.json` to add or change the mappings.

---

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [Project Structure](#project-structure)
- [Examples](#examples)
- [Testing](#testing)
- [Contributing](#contributing)
- [License](#license)

---

## Installation

1. Clone this repository:
   ```bash
   git clone https://github.com/yourusername/PachaMalayalam.git
   cd PachaMalayalam
   ```

2. Create and activate a virtual environment:
   ```bash
   python3 -m venv venv
   source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
   ```

3. Install the package and dependencies:
   ```bash
   pip install .
   ```

4. (Optional) Run tests to verify everything is working:
   ```bash
   pytest
   ```

---

## Usage

1. **Write your Malayalam script:** Create a `.pymal` file using Malayalam keywords.
   Example (`hai_bosse.pymal`):
   ```python
   ചെജ്ജ് പ്രധാന():
       പരഞ്ഞോളി("ഹലോ ബോസ്!")
   പ്രധാന()
   ```

2. **Transpile and Execute:**
   Run the `pachalang` CLI to transpile and execute:
   ```bash
   pachalang hai_bosse.pymal
   ```

3. **Output:**
   ```
   ഹലോ ബോസ്!
   ```

---

## Project Structure

```
.
├── LICENSE               # License file
├── README.md             # Documentation
├── hai_bosse.pymal       # Example script in Malayalam
├── pachamalayalam/       # Core package
│   ├── __init__.py
│   ├── keyword_map.json  # JSON file mapping Malayalam keywords to Python
│   └── transpiler.py     # Core transpiler logic
├── setup.py              # Packaging and installation script
└── tests/                # Unit tests for the transpiler
    └── test_transpiler.py
```

---

## Examples

Here's an example to demonstrate a basic **if-else** logic in PachaMalayalam:

```python
അത് ചെജ്ജ് age_check(age):
    അതിപ്പോ age > 18:
        പരഞ്ഞോളി("നിങ്ങൾ成年മാണ്!")
    അല്ലെങ്കിൽ:
        പരഞ്ഞാളി("നിങ്ങൾ成年 ആകുന്നില്ല!")
```

Save this script in `example.pymal` and run:
```bash
pachalang example.pymal
```

---

## Testing

To run tests and verify the functionality of the transpiler, execute:
```bash
pytest tests/
```

---

## Contributing

We welcome contributions to PachaMalayalam! To contribute:
1. Fork the repository.
2. Create a new branch for your feature or bugfix.
3. Submit a pull request explaining your changes.

---

## License

This project is licensed under the [MIT License](LICENSE). Feel free to use, modify, and distribute this software as per the terms of the license.

---

## Acknowledgements

Special thanks to the Malayalam developer community for inspiring the creation of PachaMalayalam. Let's bring coding closer to our native language!