From 9ec1f81bd57002732a18b57a3c2db49ba861f96d Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Sun, 10 Jun 2018 22:02:33 -0400 Subject: [PATCH] add author and version --- archiver/archive.py | 3 +++ archiver/config.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/archiver/archive.py b/archiver/archive.py index fa48b497..5da9325f 100755 --- a/archiver/archive.py +++ b/archiver/archive.py @@ -22,6 +22,7 @@ from config import ( OUTPUT_DIR, ANSI, TIMEOUT, + GIT_SHA, ) from util import ( download_url, @@ -30,6 +31,8 @@ from util import ( pretty_path, ) +__AUTHOR__ = 'Nick Sweeting ' +__VERSION__ = GIT_SHA __DESCRIPTION__ = 'Bookmark Archiver: Create a browsable html archive of a list of links.' __DOCUMENTATION__ = 'https://github.com/pirate/bookmark-archiver' diff --git a/archiver/config.py b/archiver/config.py index 0a49e2b3..56b6b393 100644 --- a/archiver/config.py +++ b/archiver/config.py @@ -67,7 +67,7 @@ if not USE_COLOR: try: GIT_SHA = run(["git", "rev-list", "-1", "HEAD", "./"], stdout=PIPE, cwd=REPO_DIR).stdout.strip().decode() except Exception: - GIT_SHA = None + GIT_SHA = 'unknown' print('[!] Warning, you need git installed for some archiving features to save correct version numbers!') if sys.stdout.encoding.upper() != 'UTF-8':