edsu / feediverse

Send RSS/Atom feeds to Mastodon
MIT License
116 stars 25 forks source link

Please add minimal argparse-support #5

Closed htgoebel closed 4 years ago

htgoebel commented 5 years ago

feediverse should support --help``. THis can be simply done by adding code like this tomain()`

DEFAULT_CONFIG_FILE = os.path.join("~", ".feediverse")

parser = argparse.ArgumentParser()
parser.add_argument("config_file", nargs="?", metavar="CONFIG-FILE",
                    help="config file to use, default: %s" % DEFAULT_CONFIG_FILE,
                    default=os.path.expanduser(DEFAULT_CONFIG_FILE))
args = parser.parse_args()
config_file = args.config_file