photofloat/scanner/main.py

26 lines
504 B
Python
Raw Normal View History

#!./venv/bin/python
2011-05-06 00:43:25 +02:00
from TreeWalker import TreeWalker
2011-05-23 11:25:45 +02:00
from CachePath import message
2012-08-22 17:10:56 +02:00
import sys
import os
2011-05-06 00:43:25 +02:00
2011-05-06 00:43:25 +02:00
def main():
reload(sys)
sys.setdefaultencoding("UTF-8")
if len(sys.argv) != 3:
print("usage: %s ALBUM_PATH CACHE_PATH" % sys.argv[0])
return
try:
os.umask(0o22)
TreeWalker(sys.argv[1], sys.argv[2])
except KeyboardInterrupt:
message("keyboard", "CTRL+C pressed, quitting.")
sys.exit(-97)
2012-08-22 17:10:56 +02:00
2011-05-06 00:43:25 +02:00
if __name__ == "__main__":
main()