duckduckgo / p5-app-duckpan

DuckDuckHack OpenSource Development Application
http://metacpan.org/module/App::DuckPAN
Other
53 stars 47 forks source link

Underscores in new cheat sheets #353

Closed zachthompson closed 8 years ago

zachthompson commented 8 years ago

When creating a skeleton cheat sheet with --cheatsheet it separates terms with an underscore in the name of the JSON file. That's almost always wrong except in the rare cases when the underscore is part of the "thing" the cheat sheet is about.

cc @GuiltyDolphin

GuiltyDolphin commented 8 years ago

@zachthompson Yup (I think I mentioned this briefly in https://github.com/duckduckgo/p5-app-duckpan/issues/347).

It's a combination of DuckPAN not providing enough information, and the template using the ID - I think we'd want to provide a dashed version of the ID for use in filenames (then you could use <:$id_dash:>.json instead. That, or we provide access to replacements in the templates so you could do <:subst($ia_id, '_', '-'):>.json (or similar).

Thoughts?

By the way, what's with having dashes instead of underscores? It'd make more sense to be using the 'ID' (or part of) (at least initially) for the filename...?

zachthompson commented 8 years ago

Yeah, it's just another exception somewhere for cheat sheets s/_/-/.