diff options
author | David Luevano Alvarado <david@luevano.xyz> | 2022-04-23 20:47:19 -0600 |
---|---|---|
committer | David Luevano Alvarado <david@luevano.xyz> | 2022-04-23 20:47:19 -0600 |
commit | dfc3e6db921815416b8edc5892b2a7adfc677a25 (patch) | |
tree | 545c66fa2102c10d3b85c5318e76e446aee30ef6 /src/pyssg/pyssg.py | |
parent | 7ecd3c9501a16da6c1872ed7521f93df9a8da7f5 (diff) |
add checksum checking for mod files instead of timestampv0.7.0
Diffstat (limited to 'src/pyssg/pyssg.py')
-rw-r--r-- | src/pyssg/pyssg.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/pyssg/pyssg.py b/src/pyssg/pyssg.py index af7b166..598bf41 100644 --- a/src/pyssg/pyssg.py +++ b/src/pyssg/pyssg.py @@ -56,6 +56,7 @@ def main() -> None: sys.exit(1) config: ConfigParser = get_parsed_config(config_path) + config.set('info', 'debug', str(args['debug'])) if args['init']: log.info('initializing the directory structure and copying over templates') @@ -74,8 +75,18 @@ def main() -> None: copy_file(p, plt_file) sys.exit(0) + if args['add_checksum_to_db']: + log.info('adding checksum column to existing db') + db_path: str = os.path.join(config.get('path', 'src'), '.files') + db: Database = Database(db_path, config) + # needs to be read_old instead of read + db.read_old() + db.write() + + sys.exit(0) + if args['build']: - log.debug('building the html files') + log.info('building the html files') db_path: str = os.path.join(config.get('path', 'src'), '.files') db: Database = Database(db_path, config) db.read() |