]> code.communitydata.science - cdsc_reddit.git/blobdiff - helper.py
Update reddit comments data with daily dumps.
[cdsc_reddit.git] / helper.py
index b401cada8a3ec394c5c0f6985f7954d2d39af1b7..af87f71d265501f1f3ca25ecb64882f4ff9997da 100644 (file)
--- a/helper.py
+++ b/helper.py
@@ -40,6 +40,8 @@ def open_input_file(input_filename):
         cmd = ["xzcat",'-dk', '-T 20',input_filename]
     elif re.match(r'.*\.zst',input_filename):
         cmd = ['zstd','-dck', input_filename]
         cmd = ["xzcat",'-dk', '-T 20',input_filename]
     elif re.match(r'.*\.zst',input_filename):
         cmd = ['zstd','-dck', input_filename]
+    elif re.match(r'.*\.gz',input_filename):
+        cmd = ['gzip','-dc', input_filename]
     try:
         input_file = Popen(cmd, stdout=PIPE).stdout
     except NameError as e:
     try:
         input_file = Popen(cmd, stdout=PIPE).stdout
     except NameError as e:

Community Data Science Collective || Want to submit a patch?