From c1e33e96cfffd1a34a4048c4a656a1226d4d902c Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Tue, 14 Apr 2020 03:37:33 +0200 Subject: [PATCH] add logo --- spiderrss.py | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/spiderrss.py b/spiderrss.py index 997f079..2b1a69c 100644 --- a/spiderrss.py +++ b/spiderrss.py @@ -11,16 +11,39 @@ from config import base_directory, update_interval, max_age, verbose, feeds import logging import sys, getopt + +''' +Output functions +''' + def log(text): if verbose: #logging.info(text) print('{} - {}'.format(datetime.now().strftime('%d.%m %H:%M'), text)) + def error(text): #logging.error(text) print('{} - ERROR: {}'.format(datetime.now().strftime('%d.%m %H:%M'), text)) +def print_logo(): + logo = ''' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +###### ###### ## ##### ###### ###### ###### ###### ###### +## ## ## ## ## ## ## ## ## ## ## ## ## +###### ###### ## ## ## ##### ###### ###### ###### ###### + ## ## ## ## ## ## ## ## ## ## ## ## +###### ## ## ##### ###### ## ## ## ## ###### ###### +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + ''' + + print(logo) + +''' +Utility functions +''' + # Get content of a webpage def get_html_content(url): response = requests.get(url) @@ -124,15 +147,18 @@ def get_help_message(): def main(argv): - # Get arguments - try: - opts, args = getopt,getopt(argv, 'h', ['ifile=', 'ofile=']) - except: - print('spiderrss.py [ run | create_config ]') + print_logo() - for opt, arg in opts: - if opt == '-h' + ## Get arguments + #try: + # opts, args = getopt,getopt(argv, 'h', ['ifile=', 'ofile=']) + #except: + # print('spiderrss.py [ run | create_config ]') + #for opt, arg in opts: + # if opt == '-h': + # print('spiderrss.py [ run | create_config ]') + #initialize() #crawl()