-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automation: Step 1, or Cake, anyone? #68
Conversation
Then I'm gonna leave this open and let the discussion progress. Should loop in the crew from #61 for the discussion. My two cents on the vegetarian tagging question though is that that is important. Mainly because vegetarians keep going through and adding the (v). What about--and I am positive there is a smarter solution for this--instead of overly structuring the recipes (something I've said pretty regularly I'm against), there is a structured field in them. Literally just a "tags" line that would allow you to designate various things, of which right now this system really would only care about vegetarian, but which could be used later for other automated process. EXAMPLE: tags: vegetarian, tex-mex, cabbage |
👍 for tags line. Simple to parse leaves things as clean and simple as possible. |
Alright, so the table of contents now has a lil template, and recipes tagged as vegetarian. I've updated all the vegetarian recipes to include a "tags:" line with comma separated values. The TOC generator currently just notes whether recipes are tagged with vegetarian. I'm happy either way if we decide to add more ceremony/structure to the tag line or not. So the TOC looks like this now: https://github.com/knowtheory/tacofancy/blob/taco_cake/table_of_contents.md If we wanna keep going down the tagging route there are a couple next steps:
|
Yep, so it all happens through a coffeescript Cakefile. So if you have node.js installed, and coffeescript installed globally, all you have to do is type I'm trying to winnow the installation dependencies down though. I can get it down to just node.js (install node, then use `npm bin`/cake build:toc The steps past that will be either asking someone to run the script and commit it (either those adding the recipes, if they have node/coffeescript installed, or editors who can run the script after accepting a pull request), or by creating a little web service which generates the TOC & commits it when notified by Github (via a webhook) that there are new commits. |
@raed667 and yep, so folks can add whatever tags they want to recipes, but the build scripts don't do anything with them (yet). Building a little mapping for how tags should show up in the TOC would be neat. We could even stick icons/emoticons into the TOC if we want. We could just use a JSON config file structured like this: {
"vegetarian": {
"icon": "http://github.com/sinker/tacofancy/images/vegetarian_icon.png",
"abbreviation": "v"
}
} or if we wanted to be even simpler just: {
"vegetarian": "v"
} |
+1 to a webservice that triggers via webhook. |
If you don't already have a webhook for the index build trigger I'm fairly sure we can base it on the tacobot script. |
Ted, pinging you back about this auto-index generation because jesus h christ, "please update index.md" is 80% of the feedback I have to give PRs. |
Conflicts: full_tacos/asian_style_tacos.md
Okay, i've got the Once merged, i'll flip my tacobot over to committing to the main repository. At that point, any time a push is made to the repository the tacobot automatically generate/update a table_of_contents by scanning through all the files in the repo . If the tacobot's updated ToC is different from the one in the repo, it'll commit it and push. This'll double the # of commits/pushes to the repo likely (unless folks run the script themselves). |
OK, so this is 100% ready to merge then? |
Yep. The additional changes are adding tags and a little reformatting. On Sunday, March 16, 2014, sinker [email protected] wrote:
|
Automation: Step 1, or Cake, anyone?
This is really more of an "inb4" pull request. Also an attempt to start some discussion as to what people want.
I've hacked up the dumbest, quickest, most straightforward scripts to do two things:
There are two todos for the table of contents (TOC hence). Alternative sorting for the TOC (rather than alphanumeric) so as to preserve the current order of the index. The other is some way of tagging or otherwise indicating facts about recipes (like whether they're vegetarian friendly) so that info can be communicated through the TOC.
I'm particularly interested in opinions on the last point. Any suggestions? :D