Metadata-Version: 2.4
Name: dankcli_lib
Version: 0.5.9
Summary: Patched CLI Meme Generator/Caption Maker to automatically add whitespace and text to top and bottom
Home-page: https://github.com/TheMrRedSlime/dankcli
Author: TheMrRedSlime
License: MIT
Keywords: dankcli dank meme memegenerator memes generator pillow dankmemes dankcli-lib caption maker make
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pillow
Dynamic: author
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary

dankcli-lib is a CLI Image Captioning Tool, Meme Generator and Library which automatically adds white space and text to the top of your image.

## Installation

```bash
$ pip install dankcli-lib
```

## Usage

```bash
$ python -m dankcli_lib "path/to/image" "Meme text you want to add" [-f "final_image_name_without_extension"]
```

#### Python:

```python
from dankcli_lib.caption import Caption

caption = Caption("/path/to/image", "Text here", bottom_text="Bottom text here", bottom_font_color="#000000", bottom_text_box=False, font_path="arial.ttf", separator_line=True, separator_line_color="#000000", top_font_color="#ffffff", top_background_color="#000000", bottom_background_color="#000000")
caption.save('file.jpg')
```

```python
from dankcli_lib.caption import Caption

with Caption("image.jpg", "Your text") as caption:
    buffer = caption.to_buffer()
    await ctx.send(file=discord.File(buffer, "image.jpg"))
```

```python
from dankcli_lib.caption import Caption
import discord

caption = Caption("image.jpg", "Your text")
buffer = caption.to_buffer()
await ctx.send(file=discord.File(buffer, "image.jpg"))
caption.close()
```


The text gets automatically wrapped according to width of image but you can also have intentional \n in your text.
The image is saved in the current folder with the name as the current date and time, the name can be changed with the optional `-f` or `--filename` argument, specifying a file name without the file extension. 

## Example

#### Example 1 (showing \n functionality)
```bash
$ python -m dankcli_lib "templates/yesbutno.jpg" "Mom at 2am: Are you awake?\n\nMe:"
```
turns this

![](https://i.imgur.com/nW3XPkF.jpg)

to this

![](https://i.imgur.com/h6qgp9m.png)

#### Example 2 (showing auto textwrap)
```bash
$ python -m dankcli_lib "mymemes/helpmeme.jpg" "When you make a meme generator but now you can't stop making memes"
```
turns this

![](https://i.imgur.com/6CDBFwF.jpg)

to this

![](https://i.imgur.com/lSBUfNb.png)

