Skip to main content

Duplicate line removal plug-in for vpype

Project description

deduplicate

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

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:

Installation

See the installation instructions for information on how to install vpype.

Existing vpype installation

If vpype was installed using pipx, use the following command:

$ pipx inject vpype deduplicate

If vpype was installed using pip in a virtual environment, activate the virtual environment and use the following command:

$ 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:

$ git clone https://github.com/LoicGoulefert/deduplicate.git
$ cd deduplicate

Create a virtual environment:

$ python3 -m venv venv
$ source venv/bin/activate
$ pip install --upgrade pip

Install deduplicate and its dependencies (including vpype):

$ 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 file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deduplicate-0.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

deduplicate-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file deduplicate-0.1.0.tar.gz.

File metadata

  • Download URL: deduplicate-0.1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for deduplicate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 acf1c6464f3ba86781f1d0c47a3dd21b175ad6c9fee19e82d64c0b68fe57fca5
MD5 a6c01c4fff7cb73ab9ab7c9ef5630e3e
BLAKE2b-256 f1d4f807a0aee3b17046646706fe2a470407939ae58c1a6314162b6dacbc00d8

See more details on using hashes here.

File details

Details for the file deduplicate-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: deduplicate-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for deduplicate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c725c896e249d306d6a8703da5b5c31112a424496a7d963fe4d041490d93ca16
MD5 1a1642ea7f59ac049053cb71dead406f
BLAKE2b-256 24bc8fab05a20225341ac9e7b8fa96870007ffc58624cc6025ad90e1b2083964

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page