Created
May 20, 2014 09:50
-
-
Save william20111/90c3329db84fe890b220 to your computer and use it in GitHub Desktop.
timemanage.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import click | |
import logging | |
import datetime | |
FORMAT='%(asctime)s %(message)s' | |
fmt='%m/%d/%Y %I:%M:%S %p' | |
logging.basicConfig(format=FORMAT, filename='/home/william/.timemanagement.log',level=logging.DEBUG, datefmt=fmt) | |
@click.command() | |
@click.option('--time', prompt='Time', required=True, help='Task Time', type=float) | |
@click.option('--task', prompt='Task', required=True, help='Task Name') | |
def add(task, time): | |
click.echo('Added %s' % task) | |
logger = logging.getLogger() | |
logger.info('| Task: %s | Time Estimated: %s hours', task, time) | |
if __name__ == '__main__': | |
add() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment