makememe 0.1.7__tar.gz → 0.1.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: makememe
3
- Version: 0.1.7
3
+ Version: 0.1.8
4
4
  Summary: A tiny zero-dependency CLI for generating memes via the free memegen.link API. Agent-friendly.
5
5
  Project-URL: Homepage, https://pypi.org/project/makememe/
6
6
  Project-URL: memegen.link API, https://api.memegen.link
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "makememe"
7
- version = "0.1.7"
7
+ version = "0.1.8"
8
8
  description = "A tiny zero-dependency CLI for generating memes via the free memegen.link API. Agent-friendly."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -0,0 +1,165 @@
1
+ ---
2
+ name: meme
3
+ description: Generate meme images from a template and caption text using the `meme` CLI (a wrapper over the free memegen.link API). Use whenever the user asks to make/create/generate a meme, add a caption to a meme template, or wants a funny image with top/bottom text. Handles popular templates (drake, distracted boyfriend, two buttons, etc.) and custom background images.
4
+ ---
5
+
6
+ # meme
7
+
8
+ Generate memes from the command line. The `meme` command wraps the free
9
+ [memegen.link](https://api.memegen.link) API — no API key needed.
10
+
11
+ ## Prerequisite
12
+
13
+ The `meme` command must be installed. Check with `meme --list`. If it's missing,
14
+ install it:
15
+
16
+ ```bash
17
+ uv tool install makememe
18
+ # or: pipx install makememe
19
+ ```
20
+
21
+ ## Workflow
22
+
23
+ 1. **Choose the most apt template — match the joke's *shape*, not a default.**
24
+
25
+ The single most important step. Don't reach for `drake` every time — it only
26
+ fits "rejecting A, preferring B." First work out the *rhetorical structure*
27
+ of the user's idea, then pick the template whose format matches it. The
28
+ catalog has ~200 templates; here is the high-value map by structure:
29
+
30
+ | The idea is… | Template id | Lines |
31
+ |-------------------------------------------------------|---------------|-------|
32
+ | Rejecting A, preferring B | `drake` | 2 |
33
+ | Tempted away from the current thing by a shinier one | `db` | 3 |
34
+ | Agonizing between two conflicting options | `ds` | 3 |
35
+ | Swerving last-second to pick B over the obvious A | `exit` | 3 |
36
+ | A multi-step plan whose last step backfires | `gru` | 4 |
37
+ | Stating a hot take, daring you to argue | `cmm` | 1 |
38
+ | Pretending all is fine amid disaster | `fine` | 2 |
39
+ | A small, satisfying win / "nailed it" | `success` | 2 |
40
+ | Galaxy-brain "can't have the problem if you avoid it" | `rollsafe` | 2 |
41
+ | Escalating "increasingly enlightened" (often ironic) | `gb` | 4 |
42
+ | Two things claimed different but actually identical | `same` | 3 |
43
+ | Immediate regret right after a choice | `regret` | 2 |
44
+ | Mocking a statement by repeating it sarcastically | `spongebob` | 2 |
45
+ | An accusation vs. a smug, dismissive reply | `woman-cat` | 2 |
46
+ | "One does not simply X" | `mordor` | 2 |
47
+ | "Not sure if X… or just Y" (suspicion) | `fry` | 2 |
48
+ | "False." + a blunt correction | `dwight` | 2 |
49
+ | A forced smile hiding inner pain | `harold` | 2 |
50
+ | Absurd gains from a dumb move | `stonks` | 2 |
51
+ | "X, X everywhere" | `buzz` | 2 |
52
+ | "I'm not saying it's X… but it's X" | `aag` | 2 |
53
+ | Smug delight at chaos you caused | `disastergirl`| 2 |
54
+ | Crude version vs. fancy/refined version of same thing | `pooh` | 2 |
55
+ | An escalating back-and-forth argument | `chair` | 6 |
56
+ | "Y U NO [do thing]" | `yuno` | 2 |
57
+
58
+ If none of these fit the joke, **browse the full catalog** instead of forcing
59
+ a bad fit:
60
+
61
+ ```bash
62
+ meme --list --json # ~200 templates; scan the titles for a better match
63
+ ```
64
+
65
+ **Always verify the chosen id with `meme --list --json` before using it** —
66
+ guessing ids (e.g. `buttons`, `twobuttons`) leads to 404s. The map above is
67
+ accurate, but confirm anything you pull from memory.
68
+
69
+ 2. **Write the funniest version — reason before you render.** Don't ship the
70
+ first phrasing that comes to mind. Briefly draft 2–3 caption options in your
71
+ head and pick the funniest, then render only that one. What makes it land:
72
+
73
+ - **Specificity beats generic.** "the `useEffect` that runs twice" is funnier
74
+ than "a bug." Reach for the concrete, in-context detail.
75
+ - **Punchy and short.** Meme text is read in a second — trim filler words,
76
+ keep each line tight, favor a sharp last word.
77
+ - **Match the template's voice.** Lean into the format's built-in attitude
78
+ (smug `rollsafe`, deadpan `fine`, escalating `gru`, mocking `spongebob`).
79
+ - **Respect the structure.** The funny comes from the *contrast* the template
80
+ sets up — make line A and line B actually play off each other.
81
+ - **Use the user's name/specifics verbatim.** If the user named a person,
82
+ team, tool, or thing ("make a meme about *Raj* and code reviews"), put that
83
+ exact name **into the caption text** — don't genericize it to "my coworker."
84
+ Names and inside-references are what make a meme land for its audience.
85
+
86
+ 3. **Get the URL (default).** Pass the chosen template id with `-t` (as a flag,
87
+ not the leading word) then the caption lines in the template's natural order,
88
+ and use `--print-url`. This returns a public, permanent memegen.link URL — no
89
+ file is downloaded:
90
+
91
+ ```bash
92
+ meme -t ds "ship it Friday" "wait till Monday" --print-url
93
+ ```
94
+
95
+ Output (just the URL):
96
+
97
+ ```
98
+ https://api.memegen.link/images/ds/ship_it_Friday/wait_till_Monday.png
99
+ ```
100
+
101
+ Mind the line order for the template you picked — e.g. `db` reads
102
+ *new temptation / you / current thing*; `exit` reads *straight road / exit
103
+ ramp / the car*; `fine` is *top speech / bottom "this is fine"*. If a render
104
+ looks off, it's usually line order or count — re-check against `--list`.
105
+
106
+ Using `-t` matters: every call starts with the same `meme -t ...` prefix, so
107
+ the user only has to approve the command **once** — not once per template.
108
+
109
+ 4. **Give the user the URL** as a clickable link — they can open it in a browser
110
+ or paste it into Slack/GitHub (it renders inline with `![meme](url)`). Don't
111
+ download a file unless they ask for one (see "Saving a local file" below).
112
+
113
+ ## Saving a local file
114
+
115
+ Only when the user explicitly wants a file (to attach it, edit it, or see it pop
116
+ open) — drop `--print-url` and instead:
117
+
118
+ ```bash
119
+ meme -t drake "a" "b" --open # saves to a temp folder AND opens it in the viewer
120
+ meme -t drake "a" "b" -o ~/meme.png # save to a specific path
121
+ ```
122
+
123
+ By default (without `-o`) a downloaded file goes to a temp folder
124
+ (`<tmp>/makememe/`) with a unique name, so it never clutters the user's working
125
+ directory.
126
+
127
+ ## Key flags
128
+
129
+ - `--print-url` — return the public URL instead of downloading (the default
130
+ choice; prefer this).
131
+ - `--open` — download and open the image in the user's default viewer.
132
+ - `-o path.png` — save the download to a specific path.
133
+ - `--bg <image-url>` — use a custom background image instead of a template;
134
+ pass caption lines as usual.
135
+ - `--ext png|jpg|webp|gif` — output format.
136
+ - `--json` — machine-readable output (use when you need to parse it in a script).
137
+
138
+ ## Tips
139
+
140
+ - Number of caption lines depends on the template (`--list` shows each
141
+ template's `lines` count). Most use 2 (top/bottom).
142
+ - For an empty line, pass `"_"` (memegen renders it blank).
143
+ - Text escaping (spaces, `?`, `/`, `%`, emoji, etc.) is handled automatically —
144
+ just pass natural text in quotes.
145
+ - If a caption line starts with `-` (e.g. `"-26%"`), insert `--` before the
146
+ lines so it isn't read as a flag: `meme regret --json -- "-26%" "WHY"`.
147
+ (Flags like `--json`/`-o` go before the `--`.)
148
+ - If a download fails, the JSON output includes the `url` and `error` — inspect
149
+ the URL to debug the template id or line count.
150
+
151
+ ## Examples
152
+
153
+ Each picks the template that fits the joke's shape — not all drake:
154
+
155
+ ```bash
156
+ meme -t drake "old way" "new way" --print-url # reject A, prefer B
157
+ meme -t ds "merge to main" "open another PR" --print-url # agonizing between two options
158
+ meme -t fine "prod is down" "this is fine" --print-url # disaster, pretending it's ok
159
+ meme -t gru "write the tests" "tests fail" "fix the code" "tests still fail" --print-url # plan backfires
160
+ meme -t same "staging" "prod" "they're the same picture" --print-url # claimed different, identical
161
+ meme -t cmm "tabs are better than spaces" --print-url # one-line hot take
162
+ meme -t mordor "one does not simply" "deploy on Friday" --print-url # "one does not simply X"
163
+ meme --bg https://example.com/cat.png "_" "DEPLOY ON FRIDAY" --print-url # custom background
164
+ meme -t success "fixed the bug" "on the first try" --open # only when the user wants a file
165
+ ```
@@ -1,104 +0,0 @@
1
- ---
2
- name: meme
3
- description: Generate meme images from a template and caption text using the `meme` CLI (a wrapper over the free memegen.link API). Use whenever the user asks to make/create/generate a meme, add a caption to a meme template, or wants a funny image with top/bottom text. Handles popular templates (drake, distracted boyfriend, two buttons, etc.) and custom background images.
4
- ---
5
-
6
- # meme
7
-
8
- Generate memes from the command line. The `meme` command wraps the free
9
- [memegen.link](https://api.memegen.link) API — no API key needed.
10
-
11
- ## Prerequisite
12
-
13
- The `meme` command must be installed. Check with `meme --list`. If it's missing,
14
- install it:
15
-
16
- ```bash
17
- uv tool install makememe
18
- # or: pipx install makememe
19
- ```
20
-
21
- ## Workflow
22
-
23
- 1. **Pick a template.** If you don't already know a valid template id, list them:
24
-
25
- ```bash
26
- meme --list --json
27
- ```
28
-
29
- Common ids: `drake`, `db` (distracted boyfriend), `ds` (daily struggle /
30
- "two buttons"), `gru` (gru's plan), `cmm` (change my mind),
31
- `fine` (this is fine), `success` (success kid), `rollsafe`,
32
- `same` (same picture), `regret`.
33
-
34
- **Always verify an id with `meme --list --json` before using it** — guessing
35
- ids (e.g. `buttons`, `twobuttons`) leads to 404s. When unsure, list first.
36
-
37
- 2. **Get the URL (default).** Pass the template id with `-t` (as a flag, not the
38
- leading word) then the caption lines, and use `--print-url`. This returns a
39
- public, permanent memegen.link URL — no file is downloaded:
40
-
41
- ```bash
42
- meme -t drake "writing code by hand" "asking the meme cli" --print-url
43
- ```
44
-
45
- Output (just the URL):
46
-
47
- ```
48
- https://api.memegen.link/images/drake/writing_code_by_hand/asking_the_meme_cli.png
49
- ```
50
-
51
- Using `-t` matters: every call starts with the same `meme -t ...` prefix, so
52
- the user only has to approve the command **once** — not once per template.
53
-
54
- 3. **Give the user the URL** as a clickable link — they can open it in a browser
55
- or paste it into Slack/GitHub (it renders inline with `![meme](url)`). Don't
56
- download a file unless they ask for one (see "Saving a local file" below).
57
-
58
- ## Saving a local file
59
-
60
- Only when the user explicitly wants a file (to attach it, edit it, or see it pop
61
- open) — drop `--print-url` and instead:
62
-
63
- ```bash
64
- meme -t drake "a" "b" --open # saves to a temp folder AND opens it in the viewer
65
- meme -t drake "a" "b" -o ~/meme.png # save to a specific path
66
- ```
67
-
68
- By default (without `-o`) a downloaded file goes to a temp folder
69
- (`<tmp>/makememe/`) with a unique name, so it never clutters the user's working
70
- directory.
71
-
72
- ## Key flags
73
-
74
- - `--print-url` — return the public URL instead of downloading (the default
75
- choice; prefer this).
76
- - `--open` — download and open the image in the user's default viewer.
77
- - `-o path.png` — save the download to a specific path.
78
- - `--bg <image-url>` — use a custom background image instead of a template;
79
- pass caption lines as usual.
80
- - `--ext png|jpg|webp|gif` — output format.
81
- - `--json` — machine-readable output (use when you need to parse it in a script).
82
-
83
- ## Tips
84
-
85
- - Number of caption lines depends on the template (`--list` shows each
86
- template's `lines` count). Most use 2 (top/bottom).
87
- - For an empty line, pass `"_"` (memegen renders it blank).
88
- - Text escaping (spaces, `?`, `/`, `%`, emoji, etc.) is handled automatically —
89
- just pass natural text in quotes.
90
- - If a caption line starts with `-` (e.g. `"-26%"`), insert `--` before the
91
- lines so it isn't read as a flag: `meme regret --json -- "-26%" "WHY"`.
92
- (Flags like `--json`/`-o` go before the `--`.)
93
- - If a download fails, the JSON output includes the `url` and `error` — inspect
94
- the URL to debug the template id or line count.
95
-
96
- ## Examples
97
-
98
- ```bash
99
- meme -t drake "old way" "new way" --print-url
100
- meme -t same "after I sold" "if I held" "same picture" --print-url
101
- meme -t cmm "tabs are better than spaces" --print-url
102
- meme --bg https://example.com/cat.png "_" "DEPLOY ON FRIDAY" --print-url
103
- meme -t drake "save me" "to a file" --open # only when the user wants a file
104
- ```
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes