Collect all browser URLs, output to terminal, and archive to todoist
Project description
Clean Workspace: Archive Web Browser Tabs
I've been experimenting with how to make my mornings more productive. One glitch I've found in my mind is I can easily get distracted by open tabs on my browser, especially if I'm trying to write or read something which I want to give my full attention to. I've found that if I close all my tabs (similar idea to shrinking context size), I can focus better on the task at hand. However, I don't want to lose any interesting tabs so I never actually do that.
This is simple utility to automate this process. It will close all your tabs (in both Safari & Chrome), and send them to todoist (and output) them to the terminal.
We'll see if this actually helps!
Installation
pip install clean-workspace
clean-workspace
Development
poetry install
poetry run clean-workspace
Usage
- Add your todoist token to
.envrc
anddirenv allow .
- Customize the url and domain blacklist
❯ clean-workspace --help
Usage: clean-workspace [OPTIONS]
Options:
--blacklist-domains PATH
--blacklist-urls PATH
--tab-description TEXT Description for tab
--help Show this message and exit.
Collecting Tab Description Via AppleScript
Here's a quick script you can use to collect a description of what you were working on via applescript:
dialogResult=$(
osascript <<EOT
set dialogResult to display dialog "What were you working on yesterday?" buttons {"OK"} default button "OK" giving up after 300 default answer ""
return text returned of dialogResult
EOT
)
Here's a full example of using this with hyper-focus.
Inspiration
- https://gist.github.com/aleks-mariusz/cc27b21f2c5b91fbd285
- https://github.com/tominsam/shelf-python/blob/f357d9b147fa651034b71501edabf65f59d5befa/extractors/ComAppleSafari.py#L11
TODO
- Indicate in python config that this is macOS only in poetry config?
- move blacklist files into example area of repo
- look at previous tasks and see if links are contained there before including them again
- support google chrome canary
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for clean_workspace-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a440e8f9290fbfd33df72a783767b6857854de34a5e1f91311c8d2f4cb3e96d |
|
MD5 | 0f3505f9068c689f9c3e8d9f6c3ebbfb |
|
BLAKE2b-256 | 423dfe7264ea19cbb5f79914515b1d8f9750730cff6e54162603f7186445b758 |