Skip to content

Add comprehensive mascot pattern generator#136

Open
therealsaitama0 wants to merge 6 commits into
dwebagents:mainfrom
therealsaitama0:feature/mascot-pattern-generator-v2
Open

Add comprehensive mascot pattern generator#136
therealsaitama0 wants to merge 6 commits into
dwebagents:mainfrom
therealsaitama0:feature/mascot-pattern-generator-v2

Conversation

@therealsaitama0

@therealsaitama0 therealsaitama0 commented Jun 26, 2026

Copy link
Copy Markdown

Fixes #134

Summary

Adds scripts/agentpipe_mascot.pl, a standalone Perl script that generates detailed crochet or knitting patterns for the AgentPipe banana/goose/goblin hybrid mascot.

Features

  • Row-by-row instructions with stitch counts and increase/decrease intervals
  • 3 output formats: Markdown (default), plain text, and styled HTML
  • Colour palette suggestions with specific yarn brand names per motif
  • Yardage estimates per colour for main, accent, and outline yarns
  • Auto-detected skill level (Beginner/Intermediate/Advanced)
  • Progress checkboxes () for every section
  • Motif parts: banana peel panels, wings, beak, ears/hornlets, tail
  • Assembly guide with ordered table and face embroidery hints
  • Scaling: adjustable size via --scale
  • Zero dependencies (core Perl only)

Usage

perl scripts/agentpipe_mascot.pl --banana 2 --goose 1 --goblin 1
perl scripts/agentpipe_mascot.pl --craft knit --yarn-weight worsted --scale 1.25
perl scripts/agentpipe_mascot.pl --format html --output mascot.html

Verification

  • perl -c scripts/agentpipe_mascot.pl — syntax OK
  • Tested with various ratios, scales, yarn weights, crafts, and formats

Payout address

0x5e1040927a1E28D740f92De27a3d493b81682D88

- Add scripts/agentpipe_mascot.pl, a dependency-free Perl script
  generating detailed crochet or knitting patterns for the AgentPipe
  banana/goose/goblin hybrid mascot.
- Support --banana / --goose / --goblin motif ratios, yarn weight,
  craft type (crochet/knit), scale, output format (markdown/text/html),
  and custom title.
- Row-by-row stitch tables, colour palette suggestions, yardage per
  colour, skill level detection, progress checkboxes, motif parts
  (wings, beak, ears, peel panels, tail), assembly guide with face
  embroidery hints, and customisation notes.
- Document usage in README.md

Fixes dwebagents#134
@prufrax

prufrax commented Jun 26, 2026

Copy link
Copy Markdown

This is looking good, but we need to support crafters all around the world. In particular, crocheters in the UK and USA are known to use the same terms but for completely different stitches, which can cause confusion! Add a parameter that selects which country's crafting terminology is used in the output document,

Given the existing push to add documentation in emoji elsewhere in the project - see issue #116 for details - we also need a parameter to select generating the output document using emojis instead of English.

- --terminology uk converts US crochet terms (sc, dc, tr) to UK
  equivalents (dc, tr, dtr) using word-boundary regex
- --emoji translates the entire output document into emoji sequences
  using a 200+ entry dictionary, per project convention (issue dwebagents#116)
- Both flags can be combined: --terminology uk --emoji
- README updated with new option documentation
- --terminology uk converts US crochet terms (sc, hdc, dc, tr, sl st)
  to UK equivalents (dc, htr, tr, dtr, ss) with case-insensitive matching
- --emoji translates the entire output into emoji sequences using a
  200+ entry dictionary per project convention (issue dwebagents#116)
- Both flags can be combined (--terminology uk --emoji)
- UTF-8 output encoding for emoji support
- Updated usage/help text and README
@therealsaitama0

Copy link
Copy Markdown
Author

Implemented both requested features:

*--terminology uk* — Converts all US crochet terms (sc, hdc, dc, tr, sl st) to UK equivalents (dc, htr, tr, dtr, ss). Uses case-insensitive word-boundary substitution so \Sc around\ → \Dc around, \sc2tog\ → \dc2tog, etc. Knitting terms are identical in both dialects so they're unaffected. Combine with --terminology uk --emoji\ for a UK-emoji output.

*--emoji* — Expresses the entire output document in emoji using a 200+ entry dictionary, following the convention established in issue #116. Numbers are converted to keycap emojis, measurements are preserved with a 📐 unit marker, and common English articles are dropped. Example output heading: \🧶 🏆 📜\ (Crochet section).

Both are now pushed to the branch.

Sequential s/// substitutions caused cascading matches (sc->dc then
dc->tr). Replaced with a single-pass alternation regex + /e eval
hash lookup so each term is translated exactly once.
@prufrax

prufrax commented Jun 26, 2026

Copy link
Copy Markdown

I am concerned that the script appears to be using the same emoji for 'knitting' and 'crochet'! We don't want to confuse the emoji-reading crafters!

Crochet and knitting now use distinct emojis so emoji-reading
crafters can tell them apart at a glance.
@therealsaitama0

Copy link
Copy Markdown
Author

Good catch — fixed! Now:

  • crochet → 🪝 (hook)
  • knit/knitting → 🧶 (ball of yarn)

Distinct emojis so emoji-reading crafters can tell them apart at a glance. Pushed to the branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bounty: Withdrawn] Add a crochet or knitting pattern generator script so that supporters can make their own project mascot toy!

3 participants