Index: sample_scripts/import_signals.py
===================================================================
--- sample_scripts/import_signals.py	(revision 27e3114d9d00f5aa2af4e8f6ce955e7c7557eeef)
+++ sample_scripts/import_signals.py	(revision 47ea86d5f3c6fc6f9be9813ea3d00fad628fdf97)
@@ -1,2 +1,4 @@
+"""I import .ppdw files from multiple subdirectories into a mongodb."""
+
 import sys
 import re
@@ -15,6 +17,4 @@
 
 source = args.source.upper()
-# code = args.code.upper()
-# signal_number = args.signal_number
 input_dir = Path(args.input_dir)
 
@@ -25,11 +25,11 @@
 code = input_dir.name
 
-#if not re.match('[A-Z][0-9]{3}[A-Z]', code):
+# FIXME: Directory structure differs
+# FIXME: get julian date, source identifier, signal number and ELINT-Code from input_dir path
+
+# if not re.match('[A-Z][0-9]{3}[A-Z]', code):
 #    print("ELINT-Code incorrect")
 #    sys.exit(1)
 
-#if not re.match('[0-9]{4}', signal_number):
-#    print("Signal number incorrect")
-#    sys.exit(1)
 
 if not input_dir.is_dir():
@@ -43,10 +43,15 @@
 for each_dir in subdirs:
 
-    print("Each dir", each_dir)
+    # print("Each dir", each_dir)
     dir_name = each_dir.name
 
-    files_inside = [each for each in (each_dir.iterdir()) if (each.suffix in ['.idx', '.iqdw', '.ppdw'] and each_dir.stem == dir_name)]
+    # if not re.match('[0-9]{5}', dir_name):
+    #    print("Signal number incorrect")
+    #    sys.exit(1)
 
-    print("Files inside", files_inside)
+    files_inside = [each for each in (each_dir.iterdir()) if (each.suffix in ['.idx', '.iqdw', '.ppdw'] and
+                                                              each_dir.stem == dir_name)]
+
+    # print("Files inside", files_inside)
     if len(files_inside) != 3:
         print(".idx, .iqdw or .ppdw file missing in", each_dir)
@@ -55,5 +60,5 @@
     iqdw_file = (input_dir / each_dir / each_dir.stem).with_suffix('.iqdw')
     ppdw_file = (input_dir / each_dir / each_dir.stem).with_suffix('.ppdw')
-    print("PPDW file", ppdw_file)
+    # print("PPDW file", ppdw_file)
     idx_file = (input_dir / each_dir / each_dir.stem).with_suffix('.idx')
 
@@ -65,4 +70,5 @@
     time_tuple = datetime.utcfromtimestamp(ts).timetuple()
     julian_date_string = str(time_tuple.tm_year)[2:] + str(time_tuple.tm_yday).zfill(3)
+    print("Julian", julian_date_string, str(ppdw_file))
     code_collection = database[input_dir.name]
     year_collection = code_collection[str(time_tuple.tm_year)]
