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

osmreplication

v1.0.2

Published

Easy way to convert date to number of [Planet.osm/diffs](http://wiki.openstreetmap.org/wiki/Planet.osm/diffs), the app support `timestamp` and `date(YYYY-MM-DDThh:mm:ss)` parameters.

Downloads

2

Readme

osmreplication

Easy way to convert date to number of Planet.osm/diffs, the app support timestamp and date(YYYY-MM-DDThh:mm:ss) parameters.

Installation

npm install osmreplication

Update

There are problems with file replication per minute, sometimes falls server replication and sequence files are lost, which is why we need to update the files before using. the upgrade take the last date of the update and start updating the latest incidents. This could take the around of 20sec, 1min depending on how old the last update.

the last incidence on the replication server was 2016-02-01 19:1

npm run update

Usage

var osmreplication = require('osmreplication');
var timestamp = 1453943167;
var date = '2016-01-28T01:06:07';

Replication files per minute

File:

osmreplication.file(timestamp,'minute');
//or 
osmreplication.file(date,'minute');

Output:

{
  url_data: 'http://planet.openstreetmap.org/replication/minute/001/766/587.osc.gz',
  sequenceNumber: 1766587,
  date: '2016-01-27T01:06'
}

Range:

var dateStart = '2012-09-13T02:01';
var dateEnd = '2012-09-13T02:03';
var result = osmreplication.range(dateStart, dateEnd, 'minute');

Output:

[{
  url_data: 'http://planet.openstreetmap.org/replication/minute/000/000/996.osc.gz',
  sequenceNumber: 996,
  date: '2012-09-12T02:01'
}, {
  url_data: 'http://planet.openstreetmap.org/replication/minute/000/000/997.osc.gz',
  sequenceNumber: 997,
  date: '2012-09-12T02:02'
}, {
  url_data: 'http://planet.openstreetmap.org/replication/minute/000/000/998.osc.gz',
  sequenceNumber: 998,
  date: '2012-09-12T02:03'
}]

Replication files per hour

File:

osmreplication.file(timestamp,'hour');
//or 
osmreplication.file(date,'hour');

Output:

{
  url_data: 'http://planet.openstreetmap.org/replication/hour/000/029/586.osc.gz',
  sequenceNumber: 29586,
  date: '2016-01-27T01:05'
}

Range:

var dateStart = '2016-02-05T16:02';
var dateEnd = '2016-02-05T18:02';
var result = osmreplication.range(dateStart, dateEnd, 'hour');

Output:

[{
  url_data: 'http://planet.openstreetmap.org/replication/hour/000/029/793.osc.gz',
  sequenceNumber: 29793,
  date: '2016-02-05T16:01'
}, {
  url_data: 'http://planet.openstreetmap.org/replication/hour/000/029/794.osc.gz',
  sequenceNumber: 29794,
  date: '2016-02-05T17:01'
}, {
  url_data: 'http://planet.openstreetmap.org/replication/hour/000/029/795.osc.gz',
  sequenceNumber: 29795,
  date: '2016-02-05T18:01'
}]

Replication files per day

File:

osmreplication.file(timestamp,'day');
//or 
osmreplication.file(date,'day');

Output:

{
  url_data: 'http://planet.openstreetmap.org/replication/day/000/001/233.osc.gz',
  sequenceNumber: 1233,
  date: '2016-01-27T01:05'
}

Range:

  var dateStart = '2016-02-27T00:06';
  var dateEnd = '2016-02-29T00:06';
  var result = osmreplication.range(dateStart, dateEnd, 'day');

Output:

[{
  url_data: 'http://planet.openstreetmap.org/replication/day/000/001/263.osc.gz',
  sequenceNumber: 1263,
  date: '2016-02-26T00:05'
}, {
  url_data: 'http://planet.openstreetmap.org/replication/day/000/001/264.osc.gz',
  sequenceNumber: 1264,
  date: '2016-02-27T00:05'
}, {
  url_data: 'http://planet.openstreetmap.org/replication/day/000/001/265.osc.gz',
  sequenceNumber: 1265,
  date: '2016-02-28T00:05'
}]

Test

npm install & npm test
Similar applications

https://osm.mazdermind.de/replicate-sequences/