Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def init_argparser():
- parser = argparse.ArgumentParser(description=program_descripton, formatter_class=RawFormatter)
- parser.add_argument('-v', '--version', action='version', version=f'{parser.prog} {VERSION}')
- parser.add_argument('-dr', '--daily_report', action='store_true', help='Run the Daily Email Report and exit')
- parser.add_argument('-ct', '--check_temps', action='store_true', help='Return a list of drives and their temperatures and exit')
- parser.add_argument('-ud', '--update_daily', action='store_true', help=f'Updates 24 hour drive count. {red}USE WITH CAUTION, USE WITH CRONTAB{nc}')
- parser.add_argument('-off', '--offline_hdd', action='store_true', help=f'Offline a specific drive. Use drive number: {green}drive6{nc}')
- #parser.add_argument('-on', '--online_hdd', action='store_true', nargs=1, help=f'Online a specific drive. Use drive number: {green}drive6{nc}')
- return parser
- def main():
- parser = init_argparser()
- args = parser.parse_args()
- if args.daily_report:
- send_daily_email()
- elif args.plot_report:
- space_report()
- elif args.update_daily:
- update_daily_counts()
- elif args.check_temps:
- temperature_report()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement