diff --git a/radiobot.py b/radiobot.py index 80298f5c6ae387068393aaadd337789c956fbd78..e3701bccb8e02e5d70cd9886007ffb714141e004 100755 --- a/radiobot.py +++ b/radiobot.py @@ -18,16 +18,24 @@ posting_delay=1 # Solar image solar_pics=["http://www.hamqsl.com/solarmap.php", "http://www.hamqsl.com/solar101vhfper.php", "https://www.sws.bom.gov.au/Images/HF%20Systems/Global%20HF/HAP%20Charts/New%20York%20LDOCF.gif"] -toot_body="Solar data from http://www.hamqsl.com https://www.sws.bom.gov.au/" +toot_body="Solar data from http://www.hamqsl.com https://www.sws.bom.gov.au" +hashtags="#SolarData #Propagation #AmateurRadio #CBradio" # Program logic below this line -if len(sys.argv) < 2: - print("Usage: radiobot.py [config file]") +if len(sys.argv) < 3: + print("Usage: radiobot.py [config file] [--with-hashtags OR --without-hashtags]") + print("All arguments are mandatory") sys.exit(1) auth_file=sys.argv[1] auth_session=auth_file+'.secret' +wiwo_hashtags=sys.argv[2] + +# Will we mark this toot with hashtages or not ? +# Hastag are usefull for search results in current (3.X) Mastodon +if wiwo_hashtags == "--with-hashtags": + toot_body = toot_body + " " + hashtags # Returns the parameter from the specified file def get_config(parameter, file_path):