+def is_noextract (files):
+ # Type that needs no extraction.
+ # TODO: Add others ???
+ for f in files:
+ if has_extension (f, '.001'):
+ return True
+
+def find_deleteable_files (files):
+ # Deleteable types regex should come from the config
+ dfiles = []
+ dregex = re.compile ('^.*\.(par2|\d|\d\d\d|rar|r\d\d|zip)$', re.IGNORECASE)
+
+ return [f for f in files if dregex.match (f)]
+
+def extract (heads, todir):
+ # Try to extract each head
+ # NOTE: REQUIRES full paths to heads
+
+ PWD = os.getcwd()
+
+ # FIXME: Should come from the config
+ RCMD = 'unrar x -o+ -- '
+ ZCMD = 'unzip -- '
+
+ for h in heads:
+ # find type
+ # extract it
+
+ # NOTE: probably not able to clean up effectively...
+ pass
+
+