-
Notifications
You must be signed in to change notification settings - Fork 3
Usage
mbto edited this page Jun 18, 2023
·
4 revisions
C:\mm\bin>maxmind-geoip2-csv2sql-converter.bat
MaxMind GeoIP2 csv2sql Converter v1.1
https://github.com/mbto/maxmind-geoip2-csv2sql-converter
Supported locales: en,ru,de,es,fr,ja,pt-BR,zh-CN, IP versions: v4,v6
Country emoji: 251 (Default: 250 country + 1 for unresolved)
Available processors: 4
Usage: maxmind-geoip2-csv2sql-converter [options]
Options:
-s
Source zip archive at filesystem or http(s) request to MaxMind API URI or other http(s) source
Default: https://download.maxmind.com/app/geoip_download?edition_id=${.editionId}&license_key=${.args.licenseKey}&suffix=zip
-od
Output directory path
Default: C:\mm\bin\converted
-oa
Output archive name. Set empty "" for disable archiving
Default: maxmind-geoip2-csv2sql.zip
-k
License key for MaxMind API. Free at https://support.maxmind.com/hc/en-us/articles/4407111582235-Generate-a-License-Key
* -c
Config relative or absolute path: GeoLite2-Country-CSV.mysql.default.ini or GeoLite2-City-CSV.mysql.default.ini
or your custom formatted [Edition ID].[DBMS name].[Profile name].ini
-i
IP Blocks version: 4 or 6 or 4,6
Default: [4, 6]
-l
Locale codes of location files. Example: en,ru,de,es,fr,ja,pt-BR,zh-CN
Default: [en, ru, de, es, fr, ja, pt-BR, zh-CN]
-LV
Filter values from location files by group name with regex:
Example - for both GeoLite2-Country-CSV and GeoLite2-City-CSV editions:
-LVgeoname_id=.*777.* -LVlocale_code=en,ru,de,es,fr
-LVcontinent_code=EU,NA,OC -LVcontinent_name=Europe|Africa,Asia
-LVcountry_iso_code=AU,NZ,GB,IE,US,CA,CY
-LVcountry_name=Austr.*,Zealand$,^United,Ireland,Canada|Cyprus
-LVis_in_european_union=0|1
At GeoLite2-City-CSV edition available filter by city_name and other group names:
-LVsubdivision_1_iso_code=WO|JD|NU|GE|A.* -LVsubdivision_1_name=.*O.*
-LVsubdivision_2_iso_code=.* -LVsubdivision_2_name=.*A.*
-LVcity_name=Newport,^Clinton$|^Richmond$,"Mandria, Paphos",^Salem
-LVmetro_code=.* -LVtime_zone=.*/.*E.*
Syntax: -LVkey=value
Default: {}
-mm
Max megabytes count per file in generated files
Default: 64
-mr
Max records (values blocks) per line in generated files
Default: 100
-dc
Delete extracted *.csv source files after converting
Default: true
-ds
Delete generated *.sql and other script files after converting
Default: false