copy all tab URLs from a browser window
Project description
Tabshot
Tabshot is a script that fetches all URLs from a browser window by iterating over the open tabs. This is achieved in an ineloquent way, but one which should work for most browsers (see How the script works for more).
Requirements
- pyautogui
- pyperclip
- pynput
Usage and Commands
- prints the list of URLs to the terminal
- usage:
tabshot printortabshot p
save
- saves the list of URLs to a json file (see Output file schema)
- usage:
tabshot save <outfile>ortabshot s <outfile> - add a description:
tabshot s "div centre" -d "useful links for how to centre a div" outfileis saved to the/outputdirectory
load
- opens URLs from a saved file in a new (default) browser window
- usage:
tabshot load <infile>ortabshot l <infile>
Notes
How the script works
Tabshot uses pyautogui to execute keyboard shortcuts to iterate over the browser tabs and copy the URL of each tab.
Iterating over the browser tabs is performed by using the ctrl-tab keyboard shortcut. Ensure that the browser settings are enabled to allow this behaviour.
When two duplicate tab URLs have been encountered, the iteration over browser tabs will cease.
Terminating the script
To terminate the script whilst the browser tabs are being iterated over:
- Provide mouse or keyboard input other than the following keys:
'ctrl','tab','c','v','t','l','enter', or - Move the mouse to any corner of the screen (this is the default behaviour of
pyautogui)
Output file schema
- the
savecommand outputs ajsonfile to/outputwith the following schema:
{
"title": "",
"description": "",
"datetime_created": "",
"num_urls": "",
"urls": []
}
titlecorresponds to the argument passed asoutfileto thesavecommand- input files passed to the
loadcommand must adhere to this schema in order to be valid
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tabshot-1.0.0.tar.gz.
File metadata
- Download URL: tabshot-1.0.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbd381465e7d6006699043b9e462d9b4d76d20f50082c0fe4964c23fb4ddb8e6
|
|
| MD5 |
4b0a6fb3e5d65b3d346bf49a549c14b8
|
|
| BLAKE2b-256 |
c001467ab35c61d2158f8f4b8deaa37ce6bde2cb9dc2fd2f9540889c80d7714b
|
File details
Details for the file tabshot-1.0.0-py3-none-any.whl.
File metadata
- Download URL: tabshot-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8ac2d3da1d6a61447ce1c5f92c61c664b70d504a320dfceaafef9bc3386e9bf
|
|
| MD5 |
836fcc6540f2ecda95e702fca13c73cb
|
|
| BLAKE2b-256 |
18da1729785c990360d43c10b256a430b0971a83e2bc5b9c3ea9a98df6dc1e9c
|