indexing
This commit is contained in:
parent
008ba6a9b5
commit
a6fa141bbd
@ -90,6 +90,7 @@ class Archive:
|
|||||||
|
|
||||||
def __init__(self, archive_name, config):
|
def __init__(self, archive_name, config):
|
||||||
|
|
||||||
|
# this is twisted................ two constructors... dumb
|
||||||
if isinstance(config, str):
|
if isinstance(config, str):
|
||||||
# need a filename or a dir name....
|
# need a filename or a dir name....
|
||||||
print("reading archive " + archive_name, end='')
|
print("reading archive " + archive_name, end='')
|
||||||
@ -180,8 +181,7 @@ class Archive:
|
|||||||
date_ = archive.util.format_date(m, self.archive_name)
|
date_ = archive.util.format_date(m, self.archive_name)
|
||||||
|
|
||||||
if date_ is None or from_ is None:
|
if date_ is None or from_ is None:
|
||||||
print("\nerrorororororo")
|
print("\nDATE ERROR: " + m['from'] + " - " + m['date'])
|
||||||
print(m['from'] + " -- " + m['date'])
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
6
index.py
6
index.py
@ -11,9 +11,9 @@ def list_archives(archives_dir):
|
|||||||
def run(lists, archives):
|
def run(lists, archives):
|
||||||
logging.debug("indexing: " + str(lists) + " from " + archives)
|
logging.debug("indexing: " + str(lists) + " from " + archives)
|
||||||
|
|
||||||
for a in archives:
|
for a in lists:
|
||||||
archive = archive.Archive(a, archive_dir=archives)
|
ar = archive.Archive(a, archives)
|
||||||
archive.insert_db(host=config.db['host'], database=config.db['database'], user=config.db['user'], password=config.db['password'])
|
ar.insert_db(config.db)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user