OrkoHunter / ping-me

A cross platform personalized Ping
Apache License 2.0
192 stars 21 forks source link

The message flag isn't working ! #19

Closed makalaaneesh closed 8 years ago

makalaaneesh commented 8 years ago
(dev)makala@aneesh:~/test/ping/ping-me$ ping-me -d December-16-2015 -t 15:20 Get up and eat!
Message is  
Time is  ['15:20', 'Get', 'up', 'and', 'eat!']
Traceback (most recent call last):
  File "/home/makala/test/ping/dev/bin/ping-me", line 9, in <module>
    load_entry_point('ping-me==0.2.1', 'console_scripts', 'ping-me')()
  File "/home/makala/test/ping/dev/local/lib/python2.7/site-packages/ping_me-0.2.1-py2.7.egg/ping_me/ping.py", line 48, in main
    date_time = parser.parse(' '.join(args.DATE) + ' ' + ' '.join(args.TIME))
  File "/home/makala/test/ping/dev/local/lib/python2.7/site-packages/dateutil/parser.py", line 1008, in parse
    return DEFAULTPARSER.parse(timestr, **kwargs)
  File "/home/makala/test/ping/dev/local/lib/python2.7/site-packages/dateutil/parser.py", line 395, in parse
    raise ValueError("Unknown string format")
ValueError: Unknown string format

I printed the args.message and args.TIME to the console to debug. I think the argparser argument for message has to be corrected. Cheers! Really like your project idea.

OrkoHunter commented 8 years ago

What about?

ping-me Get up and eat -d December-16-2015 -t 15:20

-d and -t are just optional arguments so, that's why the message needs to go just after ping-me to.

OrkoHunter commented 8 years ago

Also, while using exclamation mark, you'll have to ignore it because shell interprets it for something else. \!. You can skip the - between the dates.

makalaaneesh commented 8 years ago

ping-me Get up and eat! -d December-16-2015 -t 15:20 works !

OrkoHunter commented 8 years ago

Cool !

makalaaneesh commented 8 years ago

@OrkoHunter Hey, i was testing the ping. I get a 200 OK but i don't get a notification. (I'm running on linux). I checked the inia.txt file on your server which is supposed to contain the text but it's empty.

OrkoHunter commented 8 years ago

You have to keep the GET.py script file running in your linux. The file is supposed to be empty because the message appears there just for few seconds and then it disappears. The script catches that message for you.

Edit, $ nohup ./GET.py &

OrkoHunter commented 8 years ago

I am trying to make a chrome extension for the app so that it would be more easy to receive the ping. :)

makalaaneesh commented 8 years ago

Oh, nice :) Good luck!