Zimfw: [RFC] Zim framework management

Created on 29 Apr 2016  路  9Comments  路  Source: zimfw/zimfw

Expose framework management functions and scripts in .zim/tools.

  • [x] zim_update - update zim
  • [x] zim_reset - reset zim to latest git commit
  • [x] zim_remove - remove zim from system
  • [x] zim_clean_cache - delete caches
  • [x] zim_build_cache - force rebuild of caches
  • [x] zim_debug - enable/disables debug mode
  • [x] zim_info - produce zim and system info
  • [x] zim_issue - (cool, but low priority) autofill template, open in editor, copy output to clipboard

Any other functionality worth exposing?

question

All 9 comments

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! :)

Was this page helpful?
0 / 5 - 0 ratings