gcfixer
Normalize Geocaching GPX file for Garmin devices
Last updated 3 months ago by dullus .
GPL-3.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gcfixer 
SYNC missed versions from official npm registry.

GCFIXER

NPM Stats

GCFixer is command line tool for normalistaion of geocaching pocket queries (PQ) in GPX format to use with Garmin devices. GPX parser in Garmin devices is not perfect and can have problems with not well formed or compilcated HTML descriptions. Also PQ can contain rich text formatted logs and this can sometimes render them unreadable.

What tool does:

  • Simplify HTML code in cache description and fix potential errors (or optionally remove HTML formating)
  • Replace internationalised diacritic to simple ASCII
  • Replace emojis with ASCII emoticons if possible

Installation

You can choose to use published version from npmjs.com or directly clone project from GitHub

Install from NPMJS

npm install -g gcfixer

Installation from Git

  • You need NodeJS to be installed on your computer.
  • Clone repository or download zip:
git clone https://github.com/dullus/gcfixer.git
  • Install it
cd gcfixer
npm install -g .
  • Run it
gcfixer --help

will output:

Usage: -i <infile> [-o <outfile>]

Options:
  --help        Show help                            [boolean]
  --version     Show version number                  [boolean]
  -i, --input   Input file                 [string] [required]
  -o, --output  Output file                           [string]
  -h, --html    strip html                           [boolean]
  -s, --stdout  pipe result to stdout                [boolean]

Sample usage

# Process file GC12345.gpx and save output to GC12345.out.gpx:
gcfixer -i GC12345.gpx

# Process file GC12345.gpx, strip html from description to plaintext and save output to output.gpx:
gcfixer -i GC12345.gpx -o output.gpx -h

# Process file GC12345.gpx and output to stdout:
gcfixer -i GC12345.gpx -s

Uninstall

npm uninstall -g gcfixer

API

You can use GCFixer directly as library without CLI interface in your project.

npm install --save gcfixer

Then include in your project (TypeScript example):

import { Process } from 'gcfixer/src/Process';
// configure options
const params = {
  stdout: true, // matches -s switch
  stripHtml: false // matches -h switch
};
// create instance
const process = new Process('input.gpx', params);
// add some code to capture STDOUT, or use temporary file
...
// run conversion
process.run().then(
  (caches: number) => { /* .. promise resolved handler */ },
  () => { /* .. promise rejected handler */ }
);

Current Tags

  • 0.9.2                                ...           latest (3 months ago)

2 Versions

  • 0.9.2                                ...           3 months ago
  • 0.9.1                                ...           6 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (8)
Dev Dependencies (17)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |