Miltitool for convert data from https://memopzk.org to Google Maps
Project description
kgr
Multitool for converting data from memopzk.org to Google Maps
Description
This project provides a tool for converting data from the format used on memopzk.org to a format supported by Google Maps.
Installation
You can install kgr using pip:
pip install kgr
Contribution
We welcome contributions from the community! Please create pull requests and report bugs via the Issues system.
License
This project is licensed under the MIT license. For details, see the LICENSE file.
Requirements
- Python 3
- Dependencies specified in
project.toml
Usage Examples
View the program version:
python -m kgr -v
View the help:
python -m kgr -h
python -m kgr prepare -h
python -m kgr geocode -h
python -m kgr convert -h
python -m kgr check -h
Complete Data Processing Workflow:
python -m kgr prepare -i list__76cce2b204_25-05-2024.csv -y -v -e errors.txt
...after filling in the city field...
python -m kgr geocode -i list__76cce2b204_25-05-2024.csv -y -r -v -e missing.txt
python -m kgr convert -i list__76cce2b204_25-05-2024.csv -s "Список политзаключённых — Мемориал."
Common Options for All Commands
All commands that process input files use the -i option for specifying the input file. To specify the output file, use the -o option or overwrite the input file with -y. When reading input data from a CSV file, the program will try to determine the delimiter character itself, but you can specify it explicitly using the -d option. Similarly, you can specify the encoding of the input file using the -c option, with the default being UTF-8 encoding. The prepare and geocode commands make requests for the necessary information and can take considerable time. To see progress during their execution, you can add the -v or -vv option. If a request cannot be processed, the program will display failed requests, which can be redirected to a file using the -e option. Additionally, each command has its own specific options.
Command Descriptions
Prepare CSV files from memopzk.org
usage: __main__.py prepare [-h] -i INPUT (-y | -o OUTPUT) [-d DELIMITER] [-c ENCODING] [-v] [-q | -e ERROR]
Parse source csv file from https://memopzk.org
options:
-h, --help show this help message and exit
-i INPUT, --input INPUT
input csv file with data
-y, --replace replace input csv file
-o OUTPUT, --output OUTPUT
output csv file
-d DELIMITER, --delimiter DELIMITER
delimiter in the input csv file
-c ENCODING, --encoding ENCODING
encoding of the input csv file
-v, --verbosity add progress messages
-q, --quiet ignore errors
-e ERROR, --error ERROR
log file for errors
Get Geocodes from OpenStreetMap
usage: __main__.py geocode [-h] -i INPUT (-y | -o OUTPUT) [-r] [-d DELIMITER] [-c ENCODING] [-v] [-q | -e ERROR]
Get geocode from OpenStreetMap
options:
-h, --help show this help message and exit
-i INPUT, --input INPUT
input csv file with data
-y, --replace replace input csv file
-o OUTPUT, --output OUTPUT
output csv file
-r, --random randomize geocode for exclude collision
-d DELIMITER, --delimiter DELIMITER
delimiter in the input csv file
-c ENCODING, --encoding ENCODING
encoding of the input csv file
-v, --verbosity add progress messages
-q, --quiet ignore get geocode errors
-e ERROR, --error ERROR
log file for missing persons
Convert CSV File to KML
usage: __main__.py convert [-h] -i INPUT [-o OUTPUT] [-d DELIMITER] [-c ENCODING] [-s SUFFIX] [-l LAYOUT]
Convertor data from CSV to KML
options:
-h, --help show this help message and exit
-i INPUT, --input INPUT
input csv file with data
-o OUTPUT, --output OUTPUT
output kml file
-d DELIMITER, --delimiter DELIMITER
delimiter in the input csv file
-c ENCODING, --encoding ENCODING
encoding of the input csv file
-s SUFFIX, --suffix SUFFIX
the phrase added to the description of each person
-l LAYOUT, --layout LAYOUT
the internal name of the xml document and the name of the layer on the map
Get Single Address Geocode
usage: __main__.py check [-h] -a ADDRESS
Check get geocode for single address
options:
-h, --help show this help message and exit
-a ADDRESS, --address ADDRESS
input address for check
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kgr-0.3.0.tar.gz.
File metadata
- Download URL: kgr-0.3.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
322daf9210f3bff1b42497f42bf40980cc2f995b823097b406b6fc6b946d4347
|
|
| MD5 |
6ea7132b54df81f5c9c2d0800e6dfdb6
|
|
| BLAKE2b-256 |
813273e6c6adeedf809553e7705f6d2b79424112c941239b3c2260ac91ba7a77
|
File details
Details for the file kgr-0.3.0-py2.py3-none-any.whl.
File metadata
- Download URL: kgr-0.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba1691d887c682ea88ef6fb39350a314aeeec57102b1ac16e8aee7aeb44c20f8
|
|
| MD5 |
6e051aeb8e4bea2f1ccfe54e4f04bc31
|
|
| BLAKE2b-256 |
8d4e659d69419c9f9af3d3672766215bd974ff42b25994cca23141fb85250e8d
|