Merge lp:~mvo/archive-index/mvo into lp:archive-index

Proposed by Michael Vogt
Status: Merged
Merged at revision: 3
Proposed branch: lp:~mvo/archive-index/mvo
Merge into: lp:archive-index
Diff against target: 41 lines (+12/-2)
2 files modified
extract-app-metadata (+11/-1)
src/ArchiveCache/__init__.py (+1/-1)
To merge this branch: bzr merge lp:~mvo/archive-index/mvo
Reviewer Review Type Date Requested Status
Jjed Approve
Review via email: mp+70121@code.launchpad.net

Description of the change

Minor tweaks:
- add --verbose to the commandline
- add ARCHIVE_INDEX_CACHE_DIR environment (for people like me with a small ~/ but lots of space on /space :)

Thanks,
 Michael

To post a comment you must log in.
lp:~mvo/archive-index/mvo updated
3. By Jacob Johan Edwards

Merged cache and logging options from lp:~mvo/archive-index/mvo. Thanks!

Revision history for this message
Jjed (jjed) wrote :

Useful options. I've merged to the app-install branch too.

Thanks,
Jacob

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'extract-app-metadata'
--- extract-app-metadata 2011-06-24 19:56:58 +0000
+++ extract-app-metadata 2011-08-02 07:56:24 +0000
@@ -17,7 +17,10 @@
17 Option("-o", "--out-dir", dest="out_dir", default="output/",17 Option("-o", "--out-dir", dest="out_dir", default="output/",
18 help="directory where extracted metadata will output"),18 help="directory where extracted metadata will output"),
19 Option("-m", "--memory", type="int", dest="memory", default=500,19 Option("-m", "--memory", type="int", dest="memory", default=500,
20 help="how many megabytes of data to load into memory"))20 help="how many megabytes of data to load into memory"),
21 Option("-v", "--verbose", default=False, action="store_true",
22 help="show more output to stdout"),
23 )
2124
2225
23if __name__ == "__main__":26if __name__ == "__main__":
@@ -39,5 +42,12 @@
39 logging.basicConfig(level=logging.DEBUG, filename=out_log, filemode="w",42 logging.basicConfig(level=logging.DEBUG, filename=out_log, filemode="w",
40 format="%(asctime)s %(levelname)s %(message)s")43 format="%(asctime)s %(levelname)s %(message)s")
4144
45 # create output on stdout
46 if opts.verbose:
47 log = logging.getLogger()
48 handler = logging.StreamHandler()
49 log.addHandler(handler)
50 del kwargs["verbose"]
51
42 # extract52 # extract
43 extract_metadata(**kwargs)53 extract_metadata(**kwargs)
4454
=== modified file 'src/ArchiveCache/__init__.py'
--- src/ArchiveCache/__init__.py 2011-07-29 01:35:15 +0000
+++ src/ArchiveCache/__init__.py 2011-08-02 07:56:24 +0000
@@ -11,7 +11,7 @@
11from ..utils import md5sum, file_type11from ..utils import md5sum, file_type
1212
13# TODO: Use xdg.BaseDirectory when ready for python313# TODO: Use xdg.BaseDirectory when ready for python3
14CACHE_DIR = os.path.expandvars("$HOME/.cache/archive-cache")14CACHE_DIR = os.environ.get("ARCHIVE_INDEX_CACHE_DIR") or os.path.expandvars("$HOME/.cache/archive-cache")
1515
1616
17class ArchiveCache:17class ArchiveCache:

Subscribers

People subscribed via source and target branches

to all changes: