Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
gpx-for-runners
Advanced tools
This is a simple GPX parser for runners who want to parse their gpx files from Nike+, Garmin connect or similar services. The parser only works with trackpoints for now.
See it in action here: http://timbenniks.nl/garmin-vs-nike.html
The module expects a string of gpx data. It does not have a fetch feature.
import gpx from 'gpx-for-runners';
const gpxContent = `<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="Garmin Connect"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd"
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"
xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<metadata>
<link href="connect.garmin.com">
<text>Garmin Connect</text>
</link>
<time>2015-08-03T19:07:54.000Z</time>
</metadata>
<trk>
<name>Paris 14
Running</name>
<trkseg>
<trkpt lon="2.3212804924696684" lat="48.83561119437218">
<ele>73.0</ele>
<time>2015-08-03T19:07:54.000Z</time>
</trkpt>
<trkpt lon="2.3212731163948774" lat="48.83561563678086">
<ele>73.0</ele>
<time>2015-08-03T19:07:55.000Z</time>
</trkpt>
</trkseg>
</trk>
</gpx>`;
const gpx = new gpx( gpxContent );
const distance = gpx.distance();
// 4.87939601482932
const pace = gpx.pace();
// "06:03"
const elevation = gpx.elevation();
//{
// elevation: [{
// dist: 0.000731177171930792,
// elevation: 73,
// time: "00:01"
// },{
// dist: 0.005157667126616718
// elevation: 73
// time: "00:03"
// }
// ...
// ],
// min: 63,
// max: 79.4000015258789,
// gain: 58.4000244140625,
// loss: -57.60002136230469
//}
const duration = gpx.duration();
//{
// start: Mon Aug 03 2015 21:07:54 GMT+0200 (CEST) (instance of Date),
// end: Mon Aug 03 2015 21:37:27 GMT+0200 (CEST) (instance of Date),
// totalMS: 1773000,
// total: "29:33"
//}
You need to have node and npm installed to be able to work on this code. If you intent to add or change code you will need to re-render the esdoc.
Install esdoc
npm install -g esdoc
Run esdoc
esdoc -c esdoc.json
npm install
Opens browser as it needs the DOMParser().
npm run test
npm run dev
npm run build
FAQs
A GPX file parser for runners.
The npm package gpx-for-runners receives a total of 5 weekly downloads. As such, gpx-for-runners popularity was classified as not popular.
We found that gpx-for-runners demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.