Created
July 2, 2020 13:18
-
-
Save mickeypash/be89e4d745d25b3db29a448c8ea7e41f to your computer and use it in GitHub Desktop.
Add this program to your path; Sign up for these sites; When you find a few spare minutes just run it.
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/env python | |
import random | |
import webbrowser | |
import argparse | |
urls = { | |
"keybr": "http://keybr.com/", | |
"pocket": "https://getpocket.com/random", | |
"worldindata": "https://ourworldindata.org/", | |
"memoryleague": "https://memoryleague.com/#!/train", | |
"readwise": "https://readwise.io/dailyreview", | |
} | |
def main(args): | |
if args.selection == "all": | |
webbrowser.open(random.choice([u for u in urls.values()])) | |
else: | |
webbrowser.open(urls[args.selection]) | |
def setup(): | |
parser = argparse.ArgumentParser(description="📝 Have a few spare minutes? Get productive!") | |
parser.add_argument("-s", "--selection", | |
choices=["keybr", "pocket", "readwise", "all"], default="all", | |
help="Select a specific thing you want to work on.") | |
args = parser.parse_args() | |
return args | |
if __name__ == '__main__': | |
args = setup() | |
main(args) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment