Metadata-Version: 2.1
Name: fotetizar
Version: 0.1.52
Summary: Turn your code into stylish images faster than you can say 'syntax error!' 🖼️✨
License: MIT
Keywords: code,share_code,images
Author: Torrez, Milton
Author-email: torrez.mn@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
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
Requires-Dist: pillow (>=10.4.0,<11.0.0)
Description-Content-Type: text/markdown


# Because Your Code Deserves Art!

Ever wondered why your code looks so dull on a plain text editor? It’s time to bring some pizzazz to your programming! With `fotetizar`, you can transform your code into beautiful, themed images. Whether you want to share your code with flair or just need a cool screenshot for your portfolio, this tool’s got you covered.

## Installation

You can easily install `fotetizar` from PyPI using pip:

```bash
pip install fotetizar
```

## Usage

`fotetizar` can be used both in code and from the command line.

### In Code

Here’s a quick example of how to use `fotetizar` programmatically:

```python
from fotetizar import render_image

input_file = 'example_script.py'
theme = 'dracula'
font_path = 'path/to/custom/font.ttf'
mode = 'editor'

render_image(input_file, theme, font_path, mode)
```

This will generate an image of the code in `example_script.py` using the "dracula" theme and the specified font, in "editor" mode.

### In Console

To use `fotetizar` from the command line, you can run the following command:

```bash
fotetizar example_script.py dracula --mode editor
```

This command generates an image of `example_script.py` using the "dracula" theme in "editor" mode.


## Options / Arguments

Here are the available options and arguments for `fotetizar`:

- ***`input_file`*** (required): The path to the input file you want to render. This should be a Python script or any text file containing code.
  - Example: `example_script.py`

- ***`theme`*** (required): The color theme to use for rendering.
  - Available themes:
    - `monokai`
    - `blackandwhite`
    - `solarized`
    - `gruvbox`
    - `nord`
    - `dracula`
    - `github`
    - `one_dark`
    - `atom`
    - `vscode`
    - `commodore64`
  - Example: `dracula`

- ***`--font`*** (optional): Path to a custom font file to use for rendering.
  - Example: `path/to/custom/font.ttf`

- ***`--mode`*** (optional): The rendering mode, either "editor" or "console".
  - Example: `editor`

### Example Outputs

Here are some examples of what `fotetizar` can do:

1. ***Generate an image with the "dracula" theme and "editor" mode***:

   ```bash
   fotetizar example_script.py dracula --mode editor
   ```

2. ***Generate an image with a custom font and "console" mode***:

   ```bash
   fotetizar example_script.py nord --font path/to/custom/font.ttf --mode console
   ```

3. ***Use the "commodore64" theme with default settings***:

   ```bash
   fotetizar example_script.py commodore64
   ```

## **Example Image Outputs**   

Here are some examples of the images generated by `fotetizar`:


### ***atom*** theme in editor mode.
![atom Theme in  editor Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_atom.png) 

### ***console*** mode. 
![Console Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_atom_console.png)   

### ***blackandwhite*** theme in editor mode.
![ Theme in  Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_blackandwhite.png) 

### ***dracula*** theme in editor mode.
![ Theme in  Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_dracula.png)    

### ***github*** theme in editor mode.
![ Theme in  Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_github.png)      

### ***gruvbox*** theme in editor mode.
![ Theme in  Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_gruvbox.png)       

### ***monokai*** theme in editor mode.
![ Theme in  Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_monokai.png)    

### ***nord*** theme in editor mode.
![ Theme in  Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_nord.png)          

### ***one_dark*** theme in editor mode.
![ Theme in  Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_one_dark.png)        

### ***solarized*** theme in editor mode.
![ Theme in  Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_solarized.png)      

### ***vscode*** theme in editor mode.
![ Theme in  Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_vscode.png)            



## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.



