colinta / StrangeCase

It's yet another static site generator. Have you seen jekyll? hyde? Yup. Like those.
http://colinta.com/projects/StrangeCase.html
Other
49 stars 7 forks source link

Use of python dotted names is not intuitive for users. #14

Closed wichert closed 12 years ago

wichert commented 12 years ago

The configuration for configurators, extensions and filters uses the dotted name of python functions. This is not very userfriendly: it requires long names that are not very intuitive. As a user I would prefer something like this:

filters:
- date
- markdown

over the current:

filters:
  date: strange_case.extensions.date
  markdown: strange_case.extensions.markdown

It might be interesting to look at using egg entry-points for control this; that would allow other packages to extend strangecase.

colinta commented 12 years ago

I looked at this again over the weekend, but it looks like a lot of work for something that would need to somehow support importing from strange_case.extensions AND from site_packages/python itself. For instance, I am using json: json.dumps as a "json" filter.

It is not necessary to write an extension for it, because json.dumps can already accept any python value and output it, like a filter would do.

This is a "one-time cost" in learning strangecase, and the benefit of leaving it is that it really is just a plain-ol' python import, no magic glue (aka "eggs") necessary. What do you think?