npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gpsvg

v0.0.7

Published

convert gpml to svg from gplates

Downloads

5

Readme

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.