wslshot 0.0.11__py3-none-any.whl → 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wslshot/cli.py +2124 -293
- wslshot/exceptions.py +25 -0
- wslshot-0.1.0.dist-info/METADATA +282 -0
- wslshot-0.1.0.dist-info/RECORD +7 -0
- {wslshot-0.0.11.dist-info → wslshot-0.1.0.dist-info}/WHEEL +1 -2
- {wslshot-0.0.11.dist-info → wslshot-0.1.0.dist-info}/entry_points.txt +1 -0
- wslshot-0.0.11.dist-info/LICENSE +0 -201
- wslshot-0.0.11.dist-info/METADATA +0 -174
- wslshot-0.0.11.dist-info/RECORD +0 -8
- wslshot-0.0.11.dist-info/top_level.txt +0 -1
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: wslshot
|
|
3
|
-
Version: 0.0.11
|
|
4
|
-
Home-page: https://github.com/sderev/wslshot
|
|
5
|
-
Author: Sébastien De Revière
|
|
6
|
-
License: Apache Licence, Version 2.0
|
|
7
|
-
Project-URL: Documentation, https://github.com/sderev/wslshot
|
|
8
|
-
Project-URL: Issues, http://github.com/sderev/wslshot/issues
|
|
9
|
-
Project-URL: Changelog, https://github.com/sderev/wslshot/releases
|
|
10
|
-
Requires-Python: >=3.8
|
|
11
|
-
Description-Content-Type: text/markdown
|
|
12
|
-
License-File: LICENSE
|
|
13
|
-
Requires-Dist: click
|
|
14
|
-
|
|
15
|
-
# Windows Screenshot for Linux
|
|
16
|
-
|
|
17
|
-
`wslshot` is a CLI tool designed to fetch the latest screenshot(s) from a shared directory with a Windows host, copy them to a designated directory in a Linux VM, and output their new Markdown-formatted paths.
|
|
18
|
-
|
|
19
|
-
Simply take a screenshot using the Windows Snipping tool (`win + shift + S`), and then run `wslshot` in your terminal to effortlessly transfer the image.
|
|
20
|
-
|
|
21
|
-

|
|
22
|
-
|
|
23
|
-
<!-- TOC -->
|
|
24
|
-
## Table of Contents
|
|
25
|
-
|
|
26
|
-
1. [Features](#features)
|
|
27
|
-
1. [Installation](#installation)
|
|
28
|
-
1. [Install with `pip`](#install-with-pip)
|
|
29
|
-
1. [Install with `pipx` (Recommended)](#install-with-pipx-recommended)
|
|
30
|
-
1. [Windows Configuration](#windows-configuration)
|
|
31
|
-
1. [Shared Folder Configuration](#shared-folder-configuration)
|
|
32
|
-
1. [For WSL Users](#for-wsl-users)
|
|
33
|
-
1. [For Virtual Machine Users](#for-virtual-machine-users)
|
|
34
|
-
1. [Configuration of `wslshot`](#configuration-of-wslshot)
|
|
35
|
-
1. [Fetching Screenshots](#fetching-screenshots)
|
|
36
|
-
1. [Specifying an Image Path Instead of a Directory](#specifying-an-image-path-instead-of-a-directory)
|
|
37
|
-
1. [Output](#output)
|
|
38
|
-
1. [File Copy Behavior](#file-copy-behavior)
|
|
39
|
-
1. [Integration in Vim](#integration-in-vim)
|
|
40
|
-
<!-- /TOC -->
|
|
41
|
-
|
|
42
|
-
## Features
|
|
43
|
-
|
|
44
|
-
* Set a default source directory for screenshots.
|
|
45
|
-
* Designate a custom source or destination directory per operation.
|
|
46
|
-
* Or automatically detect `/assets/images/` or other typical folders for this use case.
|
|
47
|
-
* Fetch the most recent screenshot or specify a number of recent screenshots to fetch.
|
|
48
|
-
* Control automatic staging of screenshots when copied to a git repository.
|
|
49
|
-
* Set a default output format (Markdown, HTML, plain text of the path) and specify a custom format per operation.
|
|
50
|
-
|
|
51
|
-
## Installation
|
|
52
|
-
|
|
53
|
-
Ensure you have Python 3.8 or later installed on your system.
|
|
54
|
-
|
|
55
|
-
### Install with `pip`
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
python3 -m pip install wslshot
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### Install with `pipx` (Recommended)
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
pipx install wslshot
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## Windows Configuration
|
|
68
|
-
|
|
69
|
-
Before using `wslshot`, it's essential to configure the Windows Snipping Tool to save screenshots automatically. It should be the default behavior; if it's not, here's how to enable automatic saving of screenshots in the Windows Snipping Tool:
|
|
70
|
-
|
|
71
|
-
1. Open the Snipping Tool.
|
|
72
|
-
1. Click on "Settings...".
|
|
73
|
-
1. Toggle the box that says "Automatically save screenshots".
|
|
74
|
-
|
|
75
|
-
## Shared Folder Configuration
|
|
76
|
-
|
|
77
|
-
For `wslshot` to fetch screenshots from your Windows host, you need to set up a shared directory between your Windows host and your Linux VM.
|
|
78
|
-
|
|
79
|
-
### For WSL Users
|
|
80
|
-
|
|
81
|
-
If you are using the Windows Subsystem for Linux (WSL), you can directly access your Windows file system from your WSL distro. The Windows `C:` drive, for example, can be found at `/mnt/c/` within your WSL environment. Therefore, you can directly use a folder on your Windows file system as the source directory for `wslshot`.
|
|
82
|
-
|
|
83
|
-
### For Virtual Machine Users
|
|
84
|
-
|
|
85
|
-
If you are using a traditional virtual machine managed by a hypervisor (e.g., VirtualBox, VMware, Hyper-V), you'll need to set up a shared folder your Windows host and the Linux VM. The process varies depending on your VM provider, but here are general steps:
|
|
86
|
-
|
|
87
|
-
1. Choose a folder on your Windows host to use as your screenshot folder. This should be the same folder where you configured your Snipping Tool to automatically save screenshots.
|
|
88
|
-
1. Go into your VM settings and locate the shared folders option. Add the chosen screenshot folder as a shared folder.
|
|
89
|
-
1. Depending on your VM settings, this folder will now be available at a certain path in your Linux environment. Use this path as your source directory for `wslshot`.
|
|
90
|
-
|
|
91
|
-
Remember to consult your VM provider's documentation for specific instructions on how to set up shared folders.
|
|
92
|
-
|
|
93
|
-
## Configuration of `wslshot`
|
|
94
|
-
|
|
95
|
-
Before using `wslshot`, you may want to configure it to suit your needs. You can do this using the `configure` command:
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
wslshot configure --source /path/to/source --auto-stage-enabled True --output-format HTML
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
This command allows you to set various options:
|
|
102
|
-
|
|
103
|
-
- **`--source` or `-s`**: This option lets you specify the default source directory where `wslshot` will look for screenshots.
|
|
104
|
-
|
|
105
|
-
- **`--auto-stage-enabled`**: This option lets you control whether screenshots are automatically staged when copied to a git repository. By default, this option is set to `False`. If this option is set to `True`, any screenshot copied to a git repo will automatically be staged for commit.
|
|
106
|
-
|
|
107
|
-
- **`--output-format` or `-f`**: This option lets you set the default output format for the links to the screenshots that `wslshot` creates. The available formats are Markdown, HTML, and the plain text of the path (`plain_text`). If you do not set this option, `wslshot` will output links in Markdown format by default.
|
|
108
|
-
|
|
109
|
-
Remember, these are just the default settings. You can override these settings on a per-operation basis by providing the corresponding options when running the `wslshot` command.
|
|
110
|
-
|
|
111
|
-
## Fetching Screenshots
|
|
112
|
-
|
|
113
|
-
**Fetch screenshots with the `wslshot` command**:
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
wslshot
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
This will fetch the most recent screenshots from the source directory. If this command is run inside a git repository, it will create the folder `/assets/images` (if it doesn't exist) and copy the screenshot to it.
|
|
120
|
-
|
|
121
|
-
**These are the folders automatically detected for the copy**:
|
|
122
|
-
|
|
123
|
-
- `/assets/img/`
|
|
124
|
-
- `/assets/images/`
|
|
125
|
-
- `/img/`
|
|
126
|
-
- `/images/`
|
|
127
|
-
|
|
128
|
-
**You can also choose a specific number of screenshots**:
|
|
129
|
-
|
|
130
|
-
```bash
|
|
131
|
-
wslshot -n 3
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
This will fetch the three most recent screenshots.
|
|
135
|
-
|
|
136
|
-
**These are all the possible options**:
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
wslshot [--source /custom/source] [--destination /custom/destination] [--count 3] [--output-format HTML]
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
## Specifying an Image Path Instead of a Directory
|
|
143
|
-
|
|
144
|
-
To utilize this feature, provide the path to the image you'd like to copy as an argument when running the `wslshot` command:
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
wslshot /mnt/c/user/my_name/Images/magic.gif
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
Note that you can _drag and drop_ a file into the Windows Terminal to automatically populate its path.
|
|
151
|
-
|
|
152
|
-
### Output
|
|
153
|
-
|
|
154
|
-
Upon successful execution, the command will output the new path of the image in Markdown format:
|
|
155
|
-
|
|
156
|
-
```bash
|
|
157
|
-

|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### File Copy Behavior
|
|
161
|
-
|
|
162
|
-
As with the standard usage of `wslshot`, the specified image will be copied to your designated folder on the Linux VM.
|
|
163
|
-
|
|
164
|
-
## Integration in Vim
|
|
165
|
-
|
|
166
|
-
If `wslshot` is in your PATH (this is by default if you installed it with `pipx`), you can easily call it with a shebang command.
|
|
167
|
-
|
|
168
|
-
```vim
|
|
169
|
-
:.!wslshot
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
174
|
-
<https://github.com/sderev/wslshot>
|
wslshot-0.0.11.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
wslshot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
wslshot/cli.py,sha256=QfcI6bY0ea7GuCPvDeGgk255nO_srDvYKUpiopJe6ak,17997
|
|
3
|
-
wslshot-0.0.11.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
4
|
-
wslshot-0.0.11.dist-info/METADATA,sha256=Do7oBkov8zPgUc0q50kBbO_SmD8Id2RLIwmZttKKJSU,7068
|
|
5
|
-
wslshot-0.0.11.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
6
|
-
wslshot-0.0.11.dist-info/entry_points.txt,sha256=SoRqxnUYd6iG2XqUEXWy8LGMQcO2wd4f3LYmiMQLGzI,48
|
|
7
|
-
wslshot-0.0.11.dist-info/top_level.txt,sha256=m3kSpN3aTbfg9dKJmpHI222jB5PBn2lQja7Uf77xjtA,8
|
|
8
|
-
wslshot-0.0.11.dist-info/RECORD,,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wslshot
|