Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.

Commit

Permalink
batch file processing/load
Browse files Browse the repository at this point in the history
  • Loading branch information
ryankicks committed May 27, 2015
1 parent ea7c21c commit bf62ba3
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,21 @@ def gunzip(file):

return file[:-3]

@staticmethod
def cat_all(path, file):

call_cat = "find %s -type f -exec cat {} + > " % (path, file)
print call_cat
os.system(call_cat)

return file

def reset_file(file, output=None):

# ignore archive files
if ".archive" in file:
if "json.gz" in file:

file_gz = file[:-8]
Utils.rename(file, file_gz)
Utils.gunzip(file)

if output:
output.put(file)
Expand Down

0 comments on commit bf62ba3

Please sign in to comment.