Expose framework management functions and scripts in .zim/tools.
zim_update - update zimzim_reset - reset zim to latest git commitzim_remove - remove zim from systemzim_clean_cache - delete cacheszim_build_cache - force rebuild of cacheszim_debug - enable/disables debug modezim_info - produce zim and system infozim_issue - (cool, but low priority) autofill template, open in editor, copy output to clipboardAny other functionality worth exposing?
I'm working on this in the management branch.
Will .zim/tools/ be in $PATH? I personally think it would be cleaner if a zim command is added, from which you call update/reset/remove/etc. as arguments to manage the installation.
@Tmplt Yep, that is the plan, however I will not use the zim command to avoid clobbering the Zim wiki binary name. Probably will use something more along the lines of zmanage or similar.
I think the scripts committed to the management branch are already useful. Maybe you could ff the branch and then merge it into master already?
sure, though I'd like to finish up the zim_debug function, as well as doing some additional testing before I merge these. If anyone wants to pull this branch and test for some edge-cases, like what happens when you have an uncommitted but staged change in your .zim folder and then run zim_update, that would be helpful. I just threw these together and was going to deal with bugs later. Hopefully I can fix these up this evening and get them merged into master.
Also, I will probably make a meta module that provides a wrapper function that runs these tool scripts. I don't want to put the whole tools directory into the ${PATH}. I would much rather make a single zmanage function that in turn calls these scripts (where the zmanage script is a module in ${PATH}). Autoloading that single wrapper script would be better than loading all the miscellaneous scripts.
I've pushed the meta module onto the master branch. You can test this by adding meta to your .zimrc and executing:
zmanage or zmanage usage
See the options and documentation here: https://github.com/Eriner/zim/tree/master/modules/meta
I will keep this issue open until I add zim_debug and zim_issue
I've added zim_issue. Only zim_debug remains.
All done! :)