geodbconverter

1.0.0 • Public • Published

geodbconverter

ipgeobase.ru DB to MaxMind GeoLiteCity conversion utility

Installation

npm install -g geodbconverter

Usage

Command line

To create GeoIP GeoLiteCity-Blocks.csv and GeoLiteCity-Location.csv files run command:

geodbconverter [options] [outputDir]

Options:

-h, --help                output usage information
-V, --version             output the version number
-d, --download-url [url]  ipgeobase.ru zip archive url (by default http://ipgeobase.ru/files/db/Main/geo_files.zip)
-l, --local               Use local files without archive downloading
-i, --ipblocks [path]     Used only with --cities option. It's path to local file with blocks of IP addresses if used with --local option. It's file name in archive if DB is downloaded from ipgeobase.ru. By default "cidr_optim.txt"
-c, --cities [path]       Used only with --ipblocks option. It's path to local file with cities names if used with --local option. It's file name in archive if DB is downloaded from ipgeobase.ru. By default "cities.txt"
--ipblocks-output [path]  IP blocks output file name (by default "GeoLiteCity-Blocks.csv")
--cities-output [path]    Cities output file name (by default "GeoLiteCity-Location.csv")

Examples:

Download db from ipgeobase server, convert and save to current directory:

geodbconverter

Convert and save to custom directory:

geodbconverter ./converted/GeoLiteCity

Local module

var geodbconverter = require('geodbconverter');

geodbconverter.download(options);
geodbconverter.convert(options);

Notes

To convert .csv files to .dat use mteodoro/mmutils.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    1
  • 0.0.3
    0
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i geodbconverter

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • jokero