deduplicate-0.1.0a1
توضیحات
Duplicate line removal plug-in for vpype
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | deduplicate-0.1.0a1 |
| نام | deduplicate |
| نسخه کتابخانه | 0.1.0a1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Loïc Goulefert |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/LoicGoulefert/deduplicate |
| آدرس اینترنتی | https://pypi.org/project/deduplicate/ |
| مجوز | MIT License Copyright (c) 2021 L. Goulefert Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
# deduplicate
[`vpype`](https://github.com/abey79/vpype) plug-in to remove overlapping lines in SVG files.
## Usage
```
Usage: vpype deduplicate [OPTIONS]
Remove duplicate lines.
Options:
-t, --tolerance LENGTH Max distance between points to consider them equal
(default: 0.01mm)
-p, --progress-bar (flag) Display a progress bar
-l, --layer LAYERS Target layer(s) (defaul: 'all')
-k, --keep-duplicates (flag) Keep removed duplicates in a separate layer
--help Show this message and exit.
```
## Examples
Basic usage : `vpype read file.svg deduplicate write output.svg`
You can keep removed lines in a separate layer with `-k` flag:
```
vpype read squares.svg deduplicate -k write squares_dedup.svg
```
<img src="img/squares_dedup_output.png">
The `-t` option controls the tolerance, which is the maximum distance 2 points are considered equal.
Here is what `vpype read tangent_circles.svg deduplicate -k -t 0.2mm show` outputs with different tolerances:
<img src="img/tangent_circles_tol.png">
## Installation
See the [installation instructions](https://vpype.readthedocs.io/en/latest/install.html) for information on how
to install `vpype`.
### Existing `vpype` installation
If *vpype* was installed using pipx, use the following command:
```bash
$ pipx inject vpype deduplicate
```
If *vpype* was installed using pip in a virtual environment, activate the virtual environment and use the following command:
```bash
$ pip install deduplicate
```
Check that your install is successful:
```
$ vpype --help
Usage: vpype [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...
Options:
-v, --verbose
-I, --include PATH Load commands from a command file.
--help Show this message and exit.
Commands:
[...]
Plugins:
deduplicate
[...]
```
### Stand-alone installation
Use this method if you need to edit this project. First, clone the project:
```bash
$ git clone https://github.com/LoicGoulefert/deduplicate.git
$ cd deduplicate
```
Create a virtual environment:
```bash
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install --upgrade pip
```
Install `deduplicate` and its dependencies (including `vpype`):
```bash
$ pip install -e .
```
Check that your install is successful:
```
$ vpype --help
Usage: vpype [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...
Options:
-v, --verbose
-I, --include PATH Load commands from a command file.
--help Show this message and exit.
Commands:
[...]
Plugins:
deduplicate
[...]
```
## License
See the [LICENSE](LICENSE) file for details.
نیازمندی
| مقدار | نام |
|---|---|
| - | click |
| - | numpy |
| >=1.8.0 | shapely |
| <2.0,>=1.9 | vpype |
| >=4.61.1 | tqdm |
نحوه نصب
نصب پکیج whl deduplicate-0.1.0a1:
pip install deduplicate-0.1.0a1.whl
نصب پکیج tar.gz deduplicate-0.1.0a1:
pip install deduplicate-0.1.0a1.tar.gz