diff --git a/configs/memegen/templates/hotline-bling/config.json b/configs/memegen/templates/hotline-bling/config.json new file mode 100644 index 0000000..cded53e --- /dev/null +++ b/configs/memegen/templates/hotline-bling/config.json @@ -0,0 +1,34 @@ +{ + "font": "impact.ttf", + "fill_color": [ + 0, + 0, + 0 + ], + "stroke_color": [ + 0, + 0, + 0 + ], + "stroke_width": 0, + "zones": { + "top": { + "horizontal_align": "right", + "horizontal_offset": -5, + "vertical_align": "top", + "vertical_offset": 75, + "width": "45%", + "max_line_height": 50, + "line_spacing": 5 + }, + "bottom": { + "horizontal_align": "right", + "horizontal_offset": -5, + "vertical_align": "bottom", + "vertical_offset": -75, + "width": "45%", + "max_line_height": 50, + "line_spacing": 5 + } + } +} \ No newline at end of file diff --git a/configs/memegen/templates/hotline-bling/template.png b/configs/memegen/templates/hotline-bling/template.png new file mode 100644 index 0000000..7002060 Binary files /dev/null and b/configs/memegen/templates/hotline-bling/template.png differ diff --git a/configs/memegen/templates/megamind/config.json b/configs/memegen/templates/megamind/config.json new file mode 100644 index 0000000..7ca4dbc --- /dev/null +++ b/configs/memegen/templates/megamind/config.json @@ -0,0 +1,17 @@ +{ + "font": "impact.ttf", + "fill_color": [255, 255, 255], + "stroke_color": [0, 0, 0], + "stroke_width": 2, + "zones": { + "top": { + "horizontal_align": "center", + "horizontal_offset": 0, + "vertical_align": "top", + "vertical_offset": 5, + "width": "80%", + "max_line_height": 80, + "line_spacing": 5 + } + } +} \ No newline at end of file diff --git a/configs/memegen/templates/megamind/template.png b/configs/memegen/templates/megamind/template.png new file mode 100644 index 0000000..52bf5e5 Binary files /dev/null and b/configs/memegen/templates/megamind/template.png differ diff --git a/scripts/memegen b/scripts/memegen index 678bd81..ae77f67 100755 --- a/scripts/memegen +++ b/scripts/memegen @@ -151,7 +151,7 @@ def main() -> int: "--keep-case", help="Keep the case of the text", action="store_true" ) ap.add_argument("--output", "-o", help="Output file path") - ap.add_argument("--show", help="Show the image after creation", action="store_true") + ap.add_argument("--no-show", help="Don't show the image after creation", action="store_true") ap.add_argument( "-v", "--verbose", help="Enable verbose logging", action="store_true" ) @@ -207,7 +207,7 @@ def main() -> int: if args.output else ( DEFAULT_OUTPUT_DIR - / f"{args.template}-{datetime.now().strftime('%Y-%m-%d-%H-%M-%S')}.png" + / f"meme-{datetime.now().strftime('%Y-%m-%d-%H-%M-%S')}.{args.template}.png" ) ) output_path.parent.mkdir(parents=True, exist_ok=True) @@ -216,7 +216,7 @@ def main() -> int: image.save(output_path) # Show the image - if args.show: + if not args.no_show: subprocess.run(["xdg-open", str(output_path)]) return 0