{"action":"created","issue":{"url":"https://api.github.com/repos/relsqui/doily/issues/11","repository_url":"https://api.github.com/repos/relsqui/doily","labels_url":"https://api.github.com/repos/relsqui/doily/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/relsqui/doily/issues/11/comments","events_url":"https://api.github.com/repos/relsqui/doily/issues/11/events","html_url":"https://github.com/relsqui/doily/issues/11","id":207248132,"number":11,"title":"Organize optional pieces.","user":{"login":"relsqui","id":1859500,"avatar_url":"https://avatars.githubusercontent.com/u/1859500?v=3","gravatar_id":"","url":"https://api.github.com/users/relsqui","html_url":"https://github.com/relsqui","followers_url":"https://api.github.com/users/relsqui/followers","following_url":"https://api.github.com/users/relsqui/following{/other_user}","gists_url":"https://api.github.com/users/relsqui/gists{/gist_id}","starred_url":"https://api.github.com/users/relsqui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/relsqui/subscriptions","organizations_url":"https://api.github.com/users/relsqui/orgs","repos_url":"https://api.github.com/users/relsqui/repos","events_url":"https://api.github.com/users/relsqui/events{/privacy}","received_events_url":"https://api.github.com/users/relsqui/received_events","type":"User","site_admin":false},"labels":[{"id":538099646,"url":"https://api.github.com/repos/relsqui/doily/labels/structure","name":"structure","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/relsqui/doily/milestones/1","html_url":"https://github.com/relsqui/doily/milestone/1","labels_url":"https://api.github.com/repos/relsqui/doily/milestones/1/labels","id":2319999,"number":1,"title":"0.1.0","description":"This is intended to be a fairly minimal but coherent release, having the structure that I intend to use going forward (even if it doesn't turn out that way).\r\n\r\nThe timestamp feature is included only because, of the enhancements, it's the main one I intend to actually use much myself, so I'd rather get it in earlier than later!","creator":{"login":"relsqui","id":1859500,"avatar_url":"https://avatars.githubusercontent.com/u/1859500?v=3","gravatar_id":"","url":"https://api.github.com/users/relsqui","html_url":"https://github.com/relsqui","followers_url":"https://api.github.com/users/relsqui/followers","following_url":"https://api.github.com/users/relsqui/following{/other_user}","gists_url":"https://api.github.com/users/relsqui/gists{/gist_id}","starred_url":"https://api.github.com/users/relsqui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/relsqui/subscriptions","organizations_url":"https://api.github.com/users/relsqui/orgs","repos_url":"https://api.github.com/users/relsqui/repos","events_url":"https://api.github.com/users/relsqui/events{/privacy}","received_events_url":"https://api.github.com/users/relsqui/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":0,"state":"open","created_at":"2017-02-13T20:33:09Z","updated_at":"2017-02-14T05:12:34Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2017-02-13T15:21:09Z","updated_at":"2017-02-15T23:46:24Z","closed_at":null,"body":"Let's nip some spaghetti in the bud. Stuff like the git repository and the streak counter aren't part of the main function of doily, so they can very reasonably live in their own files. This is true of most of the other enhancements in the issue tracker, too. So how should we organize them? Questions:\r\n\r\n* How to turn on/off these extra pieces. Right now this information lives in top-level booleans in the config directory; if we're going to add arbitrary ones, it might make more sense to have instead a list of options to turn on. This keeps the config file readable and makes it way easier to maintain.\r\n* How to call them from the main script. No good having a nice generalized opt-in list in the config file if we have to manually test for and call each one by name from the main script. We can use the list of options to choose what to source and what functions to call, but we still need to know when to call them. \r\n  * So far it looks like most of them are no more complicated than \"do this before writing\" (prompt (#9), timestamp (#8)) or \"do this after writing\" (git, streak counting).\r\n  * One exception is the word counter (#5), which is really wants to be its own command. See notes in that issue.\r\n* Where to put configuration for the options! git, for example, can automate commit messages or not, and the writing prompts will have lots of choices. Asking the user to go fiddle with a million files by hand seems excessive.\r\n\r\nHere's one way this could look:\r\n\r\n* Add a /plugins directory and put files with extra options in there.\r\n* Add a section to the config where you can list the plugins you want to turn on, by name. (Probably just a space-separated list, there's no reason to allow spaces in plugin names.)\r\n* Standardize the interface for those plugins so that we can automatically call them at predetermined hook points (e.g. `my_plugin::pre_write()`).\r\n  * Have one of the hooks be defining a command-line option, so that the word counter can implement `doily --word-count` or whatever.\r\n* Use an option to drop the user into doily config file automatically (in the same way that it already drops them into daily files). This has a couple of benefits:\r\n  * We can store the config files in a standard place without making the user type out the weird path.\r\n  * We can easily have separate config files for particular plugins.\r\n\r\nNormally this would be the point at which I decide that this is getting out of hand for a bash script, but most of it is still just filesystem manipulation and calling external commands ..."},"comment":{"url":"https://api.github.com/repos/relsqui/doily/issues/comments/280179786","html_url":"https://github.com/relsqui/doily/issues/11#issuecomment-280179786","issue_url":"https://api.github.com/repos/relsqui/doily/issues/11","id":280179786,"user":{"login":"relsqui","id":1859500,"avatar_url":"https://avatars.githubusercontent.com/u/1859500?v=3","gravatar_id":"","url":"https://api.github.com/users/relsqui","html_url":"https://github.com/relsqui","followers_url":"https://api.github.com/users/relsqui/followers","following_url":"https://api.github.com/users/relsqui/following{/other_user}","gists_url":"https://api.github.com/users/relsqui/gists{/gist_id}","starred_url":"https://api.github.com/users/relsqui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/relsqui/subscriptions","organizations_url":"https://api.github.com/users/relsqui/orgs","repos_url":"https://api.github.com/users/relsqui/repos","events_url":"https://api.github.com/users/relsqui/events{/privacy}","received_events_url":"https://api.github.com/users/relsqui/received_events","type":"User","site_admin":false},"created_at":"2017-02-15T23:46:24Z","updated_at":"2017-02-15T23:46:24Z","body":"This issue is now encompassing several things, not all of which belong in the milestone, so let me split them up. The parts seem to be:\r\n\r\n* Change the directory structure (to what will hopefully be final)\r\n  * This belongs in the milestone since it's good groundwork to have early\r\n  * It makes installing tricky, so it brings the install script into the milestone too\r\n* Finding and running plugins automatically\r\n  * This doesn't need to be in the milestone\r\n  * So instead, the code calls can stay manual, like they are right now\r\n* Build-in commands\r\n  * Nope nope nope\r\n  * Stick with the current interface for now\r\n* Plugin-specific configuration (including requirements)\r\n  * Nope\r\n* Plugin installation\r\n  * Still nope\r\n\r\nI'll split these out into their own issues and come back and add numbers."}}
{"actor":{"display_login":"relsqui"}}