Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kisom/zsearch
https://github.com/kisom/zsearch
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kisom/zsearch
- Owner: kisom
- License: isc
- Created: 2014-08-14T22:33:34.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-14T22:33:43.000Z (over 10 years ago)
- Last Synced: 2024-10-11T02:46:23.617Z (about 1 month ago)
- Language: Python
- Size: 105 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
- License: LICENSE
Awesome Lists containing this project
README
zsearch
This is a stupid little tool I wrote because I screwed up in Git, and
needed to recover a file. Turns out in a lot of cases, the object will
still exist in .git/objects, but those files are zlib compressed. The
original program was:$ cat ~/bin/zcat.py
#!/usr/bin/env pythonimport re
import sys
import zlibfor arg in sys.argv[2:]:
decompressed = zlib.decompress(open(arg).read())
if re.search(sys.argv[1], decompressed):
print decompressedThis is barely more than that, but it does a little better job with
error handling and parsing arguments. Presented in Go and Python.