sggts04 / dankcli Goto Github PK
View Code? Open in Web Editor NEWCLI Image Captioning Tool or Meme Generator which automatically adds whitespace and text to top
Home Page: https://pypi.org/project/dankcli/
License: MIT License
CLI Image Captioning Tool or Meme Generator which automatically adds whitespace and text to top
Home Page: https://pypi.org/project/dankcli/
License: MIT License
Describe the bug
Tried to use this and ran into the error below:
python -m dankcli flower.jpg "When I make a function"
Traceback (most recent call last):
File "/usr/local/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/anaconda3/lib/python3.7/site-packages/dankcli/__main__.py", line 31, in <module>
font = ImageFont.truetype('fonts/arial.ttf', size=getFontSize(img))
File "/usr/local/anaconda3/lib/python3.7/site-packages/PIL/ImageFont.py", line 280, in truetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "/usr/local/anaconda3/lib/python3.7/site-packages/PIL/ImageFont.py", line 145, in __init__
layout_engine=layout_engine)
OSError: cannot open resource
To Reproduce
Exact stuff you did:
I'm in the Downloads folder where the image is stored (flower.jpg)
2. Exact command typed
python -m dankcli flower.jpg "When I make a function"
python -m dankcli "~/Downloads/flower.jpg" "When I make a function"
Expected behavior
I expected to get an image with text on top
Setup in which bug happened:
Describe the bug
When trying to use dankcli with different images and image-types I get the error TypeError: cannot unpack non-iterable Png/Jpg/JpegImageFile object
. It happens with jpg, png and jpeg.
To Reproduce
Exact stuff you did:
Used command (with jpg as example) was:
python3 -m dankcli "/home/user/pictures/dankpic.jpg" "When you make a meme" -f "dankcreation"
Expected behavior
Expected a "completed"/working output
Setup in which bug happened:
Additional context
No further context as probably not useful. If additional steps/information is needed feel free to ask me.
Sometimes font size is too big in long height but small width photos and is too small in very small height but long width photos and
Is your feature request related to a problem? Please describe.
I am frustrated by the names of pictures saved. Also, an option to have black background with white or colorful text would be cool.
Describe the solution you'd like
A better way of naming would be original name of file + " meme". If multiple memes of the same template are made, then (1),(2) and so on can be added. For the second one, the option to switch colors of text could be a option you add like -black
Describe alternatives you've considered
To make dark text, Doing python -m dankcli "image.png" " "
and then coloring the white part and adding text with paint.net or anything really. For the naming I haven't been able to come up with something. The names are so bizarre.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.