From 042059024474fd160fceb048cf03e94a80ee0575 Mon Sep 17 00:00:00 2001 From: Thomas Gideon Date: Mon, 1 Apr 2013 21:19:29 -0400 Subject: [PATCH] Quick fix for using arbitrary identifiers to Archive items. --- append.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/append.py b/append.py index f7c7e03..09d2eac 100755 --- a/append.py +++ b/append.py @@ -233,6 +233,8 @@ def __archive_slug(title): specific way. This is my reverse engineering of their algorithm based on their description and empirical data from dozens of uploads. """ + if identifier is not None: + return identifier slug = re.sub('\([^0-9]\)-\([^0-9]\)', '\1\2', title) slug = re.sub(u'\u2013', '-', slug) slug = re.sub(u'\xd7', 'x', slug) @@ -280,6 +282,10 @@ def __main(feed_file): # TODO add flac +identifier = None + if __name__ == "__main__": + if len(sys.argv) > 2: + identifier = sys.argv[2] __main(sys.argv[1])