0.0.7 • Published 9 months ago

gpsvg v0.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

GPML-to-SVG is currently in alpha. You can get useful results if the shapes you are trying to convert are SHAPES according to GPlates and not lines or dots. Continental Crust and Ocean Crust are safe bets.

System requirement

  • Node 20 or higher

Node is a javascript runtime that is compatible with the major operating systems. You do not need to know Node to use this command line tool.

How to install Node

How to:

Install gpsvg globally:

npm install gpsvg -g

Once it's installed test the installation by running

gpsvg --version

If the cli has been successfully installed you should see something like:

gpsvg --version
0.0.6

To run the conversion, make sure gpsvg is installed. Then pass in commands.

Commands

GPSVG has two commands: 1. convert one or more files at a specific time to a rectangular projection. 2. color-gradient converts a single file but will apply coloring based on feature age and a .cpt file.

Convert options

gpsvg convert -t 900 -d /Users/imauser/testTheCode/ -c "008080" -fn kilroyWasHere "/Users/imauser/folder\ Name/Big\ continents:dinosaur\ friendly.gpml"

The path or paths you want to convert MUST come last.

Please note: any path with spaces must be in quotes.

Destination, time and a file to convert are required. If you're not passing in a directory of files, the tool will attempt to find a rotation file near any of the files you pass in, and will use the first it finds.

Color-gradient options

gpsvg color-gradient -t 900 -d /Users/imauser/testTheCode/ -fn kilroyWasHere -cr /Users/iamuser/ocean-depth.cpt -f "/Users/imauser/folder\ Name/Big\ continents:dinosaur\ friendly.gpml"

Destination, time and a file to convert are required. The tool will attempt to find a rotation file near any of the files you pass in, and will use the first it finds. It will not try to find .crt files yet.

Please note: any path with spaces must be in quotes.

Example:

FULL PATH: /Users/imauser/folderName/Big\ continents:dinosaur\ friendly.gpml

DESTINATION PATH: /Users/imauser/testTheCode/

COLOR: teal or 008080 or #008080

TIME: 900

ROTATION FILE: /Users/imauser/folderName/shared.rot

gpsvg convert -d /Users/imauser/testTheCode/-c "008080" -t 900 "/Users/imauser/folderName/Big\ continents:dinosaur\ friendly.gpml"

You can convert multiple files into one SVG.

gpsvg convert -c "008080" -t 900 -r /Users/imauser/folderName/shared.rot "/Users/imauser/folderName/Big\ continents:dinosaur\ friendly.gpml" "/Users/imauser/folderName/Big\ continents:terror\  bird.gpml"

or a directory.

gpsvg convert -c "008080" -t 900 -r /Users/imauser/folderName/shared.rot /Users/imauser/folderName

or combinations

gpsvg convert -c "008080" -t 900 -r /Users/imauser/folderName/shared.rot /Users/imauser/folderName /Users/imauser/folderName2/bigDino.gpml

Limitations

As of this version (0.0.6 alpha)

  • only shapes and lines will get converted
  • every file gets converted to a <g> group, which can be selected as a group by Illustrator

To use local version: 1. install Node v20.1.0 or higher: How to install Node 2. clone GPML-to-SVG locally 3. navigate into the GPML-to-SVG directory 4. run npm install 5. run npm run build 6. to run locally replace gpsvg with node dist/index.js


I don't have a PC, so if anyone is willing to test this on a PC, I would appreciate the collaboration.

0.0.7

9 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago