Commit Graph

10 Commits

Author SHA1 Message Date
Samantha Baldwin
d1ed80d62a argparse & logging (#92)
* introduce logcommand.Lager, Whipper(); use argparse for whipper image commands, stub logging

* update Lager docstring to mention config.Config()

* make incorrect subcommand and --version work on toplevel command

* migrate accurip show, expand Lager, do not attempt to return from Lager.__init__.

* migrate offset find, add Lager.error

* correct offset find drive symlink handling

* migrate drive

* change Lager.__init__(prog) to arg from kwarg

* but actually

* remove Whipper.usage

* add and use Lager.device_option() context manager

* help I married an axe murderer

* use unified options namespace for entire command tree

* migrate whipper cd without comprehensive config loading

* switch to logging module

- use logging instead of flog for non-extern modules
- use WHIPPER_DEBUG and WHIPPER_LOGFILE env variables

* convert self.log calls to logger.debug

* convert self.error calls to logger.error

* remove log.Loggable, use logger not logging

* Logging conversion continues

- Convert log.* calls to logger.*
- Remove morituri.common.log imports

* remove morituri.common.log from tests

* remove extern/flog, bare minimum Debug conversion

* update README for logging changes

* update soxi to use logging

* refactor Lager for more declarative subcommands

* Refactor Lager.device_option:

- inline into __init__
- throw IOError instead of Exception for missing drives
- remove CommandError checking in rip/main

* rename rip to whipper in rip.main

* convert rip.debug commands

* Rename logcommand.Lager to command.BaseCommand

- remove command.CommandError occurrences
- remove python-command external module

* remove submodules from README, update rclog formatter

* update minor ambiguity in readme for command invocation

* update version number to match setup.py

* remove gitmodules

* update version number in tests as well (boo)

* convert logger.error to logger.critical

* Change morituri.rip to morituri.command

- mv common.command to command.basecommand
- move TEMPLATES used only by rip.cd out of rip.common
- update entry point for command to command.main

* update basecommand documentation

* go pyflaking: import fixing

* replace self.stdout with sys.stdout

* remove BaseCommand.config, alphabetise imports

* convert self.stdXXX leftovers

* convert last getRootCommand to config.Config

* convert last getExceptionMessage's to str

* change musicbrainz useragent to whipper
2016-12-20 23:11:30 +01:00
Samantha Baldwin
bccba71b42 refactor morituri.common.directory to shed Directory() and bulk 2016-11-02 17:52:14 -04:00
JoeLametta
746dc6599d Issue24 (#42)
* Address issue #24
* Remove getReadCaches() & replace it with getCache()

Now whipper always follows XDG specifications. All changes were documented into the README file.

The changes introduced here aren't backward compatible so, after updating whipper, you may need to configure it again (old config file are retained, though).
2016-10-09 17:26:06 +02:00
Thomas Vander Stichele
abc03e8e43 since the cached results have wrong (negative) relative for index > 01,
make sure we don't use the cache by upping the version
2013-08-24 02:41:21 +02:00
Thomas Vander Stichele
d4c81126d5 add a TableCache. 2013-02-03 22:19:11 +01:00
Thomas Vander Stichele
8b1eef1cf1 log persister 2013-02-03 20:57:32 +01:00
Thomas Vander Stichele
813a41badf whitespace and commenting 2013-01-06 15:25:51 +00:00
Thomas Vander Stichele
67540627fa * morituri/common/cache.py:
Disable the version-based persistence deleting.
	  Allow not creating a fresh ripresult when getting one.
2012-12-02 17:53:47 +00:00
Thomas Vander Stichele
306e6f2ad7 * morituri/common/cache.py:
* morituri/rip/debug.py:
	* morituri/test/test_common_cache.py:
	  Add rip debug resultcache list to list cached results.
2012-12-02 17:27:15 +00:00
Thomas Vander Stichele
c634dd0e92 * morituri/common/cache.py (added):
* morituri/test/cache (added):
	* morituri/test/cache/result (added):
	* morituri/test/cache/result/fe105a11.pickle (added):
	* morituri/test/test_common_cache.py (added):
	* morituri/common/Makefile.am:
	* morituri/common/program.py:
	* morituri/test/Makefile.am:
	  Extract ResultCache object into separate file.
2012-12-02 16:38:03 +00:00