fotetizar


Namefotetizar JSON
Version 0.1.52 PyPI version JSON
download
home_pageNone
SummaryTurn your code into stylish images faster than you can say 'syntax error!' 🖼️✨
upload_time2024-08-27 23:51:19
maintainerNone
docs_urlNone
authorTorrez, Milton
requires_python<4.0,>=3.8
licenseMIT
keywords code share_code images
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# 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.



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "fotetizar",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "code, share_code, images",
    "author": "Torrez, Milton",
    "author_email": "torrez.mn@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/07/2b/9d83680501fe6bdec13e00e1d8fa49a017fdf3605fa5103ef6d52cdbd468/fotetizar-0.1.52.tar.gz",
    "platform": null,
    "description": "\n# Because Your Code Deserves Art!\n\nEver wondered why your code looks so dull on a plain text editor? It\u2019s 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\u2019s got you covered.\n\n## Installation\n\nYou can easily install `fotetizar` from PyPI using pip:\n\n```bash\npip install fotetizar\n```\n\n## Usage\n\n`fotetizar` can be used both in code and from the command line.\n\n### In Code\n\nHere\u2019s a quick example of how to use `fotetizar` programmatically:\n\n```python\nfrom fotetizar import render_image\n\ninput_file = 'example_script.py'\ntheme = 'dracula'\nfont_path = 'path/to/custom/font.ttf'\nmode = 'editor'\n\nrender_image(input_file, theme, font_path, mode)\n```\n\nThis will generate an image of the code in `example_script.py` using the \"dracula\" theme and the specified font, in \"editor\" mode.\n\n### In Console\n\nTo use `fotetizar` from the command line, you can run the following command:\n\n```bash\nfotetizar example_script.py dracula --mode editor\n```\n\nThis command generates an image of `example_script.py` using the \"dracula\" theme in \"editor\" mode.\n\n\n## Options / Arguments\n\nHere are the available options and arguments for `fotetizar`:\n\n- ***`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.\n  - Example: `example_script.py`\n\n- ***`theme`*** (required): The color theme to use for rendering.\n  - Available themes:\n    - `monokai`\n    - `blackandwhite`\n    - `solarized`\n    - `gruvbox`\n    - `nord`\n    - `dracula`\n    - `github`\n    - `one_dark`\n    - `atom`\n    - `vscode`\n    - `commodore64`\n  - Example: `dracula`\n\n- ***`--font`*** (optional): Path to a custom font file to use for rendering.\n  - Example: `path/to/custom/font.ttf`\n\n- ***`--mode`*** (optional): The rendering mode, either \"editor\" or \"console\".\n  - Example: `editor`\n\n### Example Outputs\n\nHere are some examples of what `fotetizar` can do:\n\n1. ***Generate an image with the \"dracula\" theme and \"editor\" mode***:\n\n   ```bash\n   fotetizar example_script.py dracula --mode editor\n   ```\n\n2. ***Generate an image with a custom font and \"console\" mode***:\n\n   ```bash\n   fotetizar example_script.py nord --font path/to/custom/font.ttf --mode console\n   ```\n\n3. ***Use the \"commodore64\" theme with default settings***:\n\n   ```bash\n   fotetizar example_script.py commodore64\n   ```\n\n## **Example Image Outputs**   \n\nHere are some examples of the images generated by `fotetizar`:\n\n\n### ***atom*** theme in editor mode.\n![atom Theme in  editor Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_atom.png) \n\n### ***console*** mode. \n![Console Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_atom_console.png)   \n\n### ***blackandwhite*** theme in editor mode.\n![ Theme in  Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_blackandwhite.png) \n\n### ***dracula*** theme in editor mode.\n![ Theme in  Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_dracula.png)    \n\n### ***github*** theme in editor mode.\n![ Theme in  Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_github.png)      \n\n### ***gruvbox*** theme in editor mode.\n![ Theme in  Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_gruvbox.png)       \n\n### ***monokai*** theme in editor mode.\n![ Theme in  Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_monokai.png)    \n\n### ***nord*** theme in editor mode.\n![ Theme in  Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_nord.png)          \n\n### ***one_dark*** theme in editor mode.\n![ Theme in  Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_one_dark.png)        \n\n### ***solarized*** theme in editor mode.\n![ Theme in  Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_solarized.png)      \n\n### ***vscode*** theme in editor mode.\n![ Theme in  Mode](https://raw.githubusercontent.com/TorrezMN/Code2Image/dev/docs/examples/test_file_vscode.png)            \n\n\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Turn your code into stylish images faster than you can say 'syntax error!' \ud83d\uddbc\ufe0f\u2728",
    "version": "0.1.52",
    "project_urls": null,
    "split_keywords": [
        "code",
        " share_code",
        " images"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "58e0b5fc20d0c6560dfa29402bb53acaf5a093ac834f8b5609b390cc1722ffd4",
                "md5": "95ca4a023c0702ea2db89c17d23a98b9",
                "sha256": "4698d75fead5f169cc8c4374f75cb7fed3ccde8c925f2c60dfe50f6475de8d8c"
            },
            "downloads": -1,
            "filename": "fotetizar-0.1.52-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "95ca4a023c0702ea2db89c17d23a98b9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 4954,
            "upload_time": "2024-08-27T23:51:17",
            "upload_time_iso_8601": "2024-08-27T23:51:17.996238Z",
            "url": "https://files.pythonhosted.org/packages/58/e0/b5fc20d0c6560dfa29402bb53acaf5a093ac834f8b5609b390cc1722ffd4/fotetizar-0.1.52-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "072b9d83680501fe6bdec13e00e1d8fa49a017fdf3605fa5103ef6d52cdbd468",
                "md5": "f370ac73dffe9f52881e1d73c8d76ccb",
                "sha256": "333c142b17d6f0de5e4474268a5b433b2867191ee9dcc98b90185bdcf1395d50"
            },
            "downloads": -1,
            "filename": "fotetizar-0.1.52.tar.gz",
            "has_sig": false,
            "md5_digest": "f370ac73dffe9f52881e1d73c8d76ccb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 4247,
            "upload_time": "2024-08-27T23:51:19",
            "upload_time_iso_8601": "2024-08-27T23:51:19.447975Z",
            "url": "https://files.pythonhosted.org/packages/07/2b/9d83680501fe6bdec13e00e1d8fa49a017fdf3605fa5103ef6d52cdbd468/fotetizar-0.1.52.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-27 23:51:19",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "fotetizar"
}
        
Elapsed time: 0.30006s