# 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](#how-the-script-works) for more).
## Requirements
- pyautogui
- pyperclip
- pynput
## Usage and Commands
### print
- prints the list of URLs to the terminal
- usage: `tabshot print` or `tabshot p`
### save
- saves the list of URLs to a json file (see [Output file schema](#output-file-schema))
- usage: `tabshot save <outfile>` or `tabshot s <outfile>`
- add a description: `tabshot s "div centre" -d "useful links for how to centre a div"`
- `outfile` is saved to the `/output` directory
### load
- opens URLs from a saved file in a new (default) browser window
- usage: `tabshot load <infile>` or `tabshot 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:
1. Provide mouse or keyboard input other than the following keys: `'ctrl'`, `'tab'`, `'c'`, `'v'`, `'t'`, `'l'`, `'enter'`, or
2. Move the mouse to any corner of the screen (this is the default behaviour of `pyautogui`)
## Output file schema
- the `save` command outputs a `json` file to `/output` with the following schema:
```
{
"title": "",
"description": "",
"datetime_created": "",
"num_urls": "",
"urls": []
}
```
- `title` corresponds to the argument passed as `outfile` to the `save` command
- input files passed to the `load` command must adhere to this schema in order to be valid
Raw data
{
"_id": null,
"home_page": null,
"name": "tabshot",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "browser, url",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/c0/01/467ab35c61d2158f8f4b8deaa37ce6bde2cb9dc2fd2f9540889c80d7714b/tabshot-1.0.0.tar.gz",
"platform": null,
"description": "# Tabshot\n\nTabshot 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](#how-the-script-works) for more).\n\n## Requirements\n\n- pyautogui\n- pyperclip\n- pynput\n\n## Usage and Commands\n\n### print\n- prints the list of URLs to the terminal\n- usage: `tabshot print` or `tabshot p`\n\n### save\n- saves the list of URLs to a json file (see [Output file schema](#output-file-schema))\n- usage: `tabshot save <outfile>` or `tabshot s <outfile>`\n- add a description: `tabshot s \"div centre\" -d \"useful links for how to centre a div\"`\n- `outfile` is saved to the `/output` directory\n\n### load\n- opens URLs from a saved file in a new (default) browser window\n- usage: `tabshot load <infile>` or `tabshot l <infile>`\n\n## Notes\n\n### How the script works\n\nTabshot uses `pyautogui` to execute keyboard shortcuts to iterate over the browser tabs and copy the URL of each tab. \n\nIterating over the browser tabs is performed by using the `ctrl-tab` keyboard shortcut. **Ensure that the browser settings are enabled to allow this behaviour.** \n\nWhen two duplicate tab URLs have been encountered, the iteration over browser tabs will cease. \n\n### Terminating the script\n\nTo terminate the script whilst the browser tabs are being iterated over:\n\n1. Provide mouse or keyboard input other than the following keys: `'ctrl'`, `'tab'`, `'c'`, `'v'`, `'t'`, `'l'`, `'enter'`, or\n2. Move the mouse to any corner of the screen (this is the default behaviour of `pyautogui`)\n\n## Output file schema\n- the `save` command outputs a `json` file to `/output` with the following schema:\n```\n{\n \"title\": \"\",\n \"description\": \"\",\n \"datetime_created\": \"\",\n \"num_urls\": \"\",\n \"urls\": []\n}\n```\n- `title` corresponds to the argument passed as `outfile` to the `save` command\n- input files passed to the `load` command must adhere to this schema in order to be valid\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "copy all tab URLs from a browser window",
"version": "1.0.0",
"project_urls": {
"Repository": "https://github.com/iso1048/tabshot"
},
"split_keywords": [
"browser",
" url"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "18da1729785c990360d43c10b256a430b0971a83e2bc5b9c3ea9a98df6dc1e9c",
"md5": "836fcc6540f2ecda95e702fca13c73cb",
"sha256": "b8ac2d3da1d6a61447ce1c5f92c61c664b70d504a320dfceaafef9bc3386e9bf"
},
"downloads": -1,
"filename": "tabshot-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "836fcc6540f2ecda95e702fca13c73cb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 5996,
"upload_time": "2024-08-29T03:37:34",
"upload_time_iso_8601": "2024-08-29T03:37:34.836168Z",
"url": "https://files.pythonhosted.org/packages/18/da/1729785c990360d43c10b256a430b0971a83e2bc5b9c3ea9a98df6dc1e9c/tabshot-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c001467ab35c61d2158f8f4b8deaa37ce6bde2cb9dc2fd2f9540889c80d7714b",
"md5": "4b0a6fb3e5d65b3d346bf49a549c14b8",
"sha256": "fbd381465e7d6006699043b9e462d9b4d76d20f50082c0fe4964c23fb4ddb8e6"
},
"downloads": -1,
"filename": "tabshot-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "4b0a6fb3e5d65b3d346bf49a549c14b8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 4183,
"upload_time": "2024-08-29T03:37:35",
"upload_time_iso_8601": "2024-08-29T03:37:35.999291Z",
"url": "https://files.pythonhosted.org/packages/c0/01/467ab35c61d2158f8f4b8deaa37ce6bde2cb9dc2fd2f9540889c80d7714b/tabshot-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-29 03:37:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "iso1048",
"github_project": "tabshot",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "pyautogui",
"specs": [
[
"==",
"0.9.54"
]
]
},
{
"name": "pynput",
"specs": [
[
"==",
"1.7.7"
]
]
},
{
"name": "pyperclip",
"specs": [
[
"==",
"1.9.0"
]
]
}
],
"lcname": "tabshot"
}