Update README.md and usage outputs

sql-rework
Tomasz Golinski 2019-11-18 16:06:20 +01:00
rodzic ee30967194
commit a9d41f9382
3 zmienionych plików z 21 dodań i 14 usunięć

Wyświetl plik

@ -6,12 +6,14 @@ Tools for computing various statistics related to Geocaching/Opencaching
### Usage
The main tool is called `geostat`. It is able to access `opencaching.pl` via `OKAPI` or from local database dump maintained by `geodb`. It can also partially read `GPX` files, e.g. exported from `C:GEO`. It produces various statistics (either as text output, or in a HTML form) and renders a heat map of found/not found caches in a selected region. HTML output requires a style sheet. Sample one is included as `geo.css`.
```
Usage: [-p] [-g file] [-MDHh]
Usage: geostat [-p] [-g file] [-qn] [-MDHLTOYh] [-s size] [-m map]
Generate stats from Opencaching data or GPX files.
* Data source:
-p use Opencaching.pl
-p use opencaching.pl
-u user user for Opencaching
-g file use specified gpx file
-q use local SQLite file
@ -31,9 +33,15 @@ Generate stats from Opencaching data or GPX files.
-h display this help screen
```
There is a helper program `geodb` which manages local SQLite database. It can initialize the database from full data dump or update it according to changelogs grabbed from OKApi.
There is a helper program `geodb` which manages local SQLite database. It can initialize the database from full data dump or update it according to changelogs grabbed from OKAPI.
HTML output requires a style sheet. Sample one is included as `geo.css`.
```
Usage: geodb [-i path] [-uh]
Manage local Opencaching database.
-i folder initialize database from dump located in given folder
-u update database with changelogs grabbed via OKAPI
-h display this help screen
```
### Installation
@ -52,13 +60,12 @@ run `meson build; cd build; ninja`. You might need to set `CXX` variable to poin
### Credits
* Maps of Poland `Poland.png` and `Poland_big.png` come from `https://pl.wikipedia.org/wiki/Plik:Poland_location_map.svg` and are licensed under CC-BY-SA and GNU FDL.
* Maps of Poland `Poland.png` and `Poland_big.png` come from https://pl.wikipedia.org/wiki/Plik:Poland_location_map.svg and are licensed under CC-BY-SA and GNU FDL.
* Map of Poland `Poland_relief.png` comes from `https://commons.wikimedia.org/wiki/File:Relief_Map_of_Poland.svg` and is licensed under CC-BY-SA.
* Map of Poland `Poland_relief.png` comes from https://commons.wikimedia.org/wiki/File:Relief_Map_of_Poland.svg and is licensed under CC-BY-SA.
* Map of Europe `Europe.png` comes from `https://pl.wikipedia.org/wiki/Plik:Europe_location_map.svg` and is licensed under PD.
* Map of Europe `Europe.png` comes from https://pl.wikipedia.org/wiki/Plik:Europe_location_map.svg and is licensed under PD.
* Maps of Voivodeships of Poland come from `https://commons.wikimedia.org/wiki/File:Podlaskie_Voivodeship_location_map.svg`, `https://commons.wikimedia.org/wiki/File:Pomeranian_Voivodeship_location_map.svg`, `https://pl.wikipedia.org/wiki/Plik:Kuyavian-Pomeranian_Voivodeship_location_map.svg`, `https://pl.wikipedia.org/wiki/Plik:Warmian-Masurian_Voivodeship_location_map.svg`, `https://pl.wikipedia.org/wiki/Plik:Masovian_Voivodeship_location_map.svg`, `https://pl.wikipedia.org/wiki/Plik:Lesser_Poland_Voivodeship_location_map.svg`, `https://pl.wikipedia.org/wiki/Plik:Greater_Poland_Voivodeship_location_map.svg`, `https://pl.wikipedia.org/wiki/Plik:Opole_Voivodeship_location_map.svg`, `https://pl.wikipedia.org/wiki/Plik:Lower_Silesian_Voivodeship_location_map.svg`, `https://pl.wikipedia.org/wiki/Plik:Silesian_Voivodeship_location_map.svg`, `https://pl.wikipedia.org/wiki/Plik:Lublin_Voivodeship_location_map.svg`, `https://pl.wikipedia.org/wiki/Plik:Subcarpathian_Voivodeship_location_map.svg`, `https://pl.wikipedia.org/wiki/Plik:West_Pomeranian_Voivodeship_location_map.svg`, `https://pl.wikipedia.org/wiki/Plik:%C5%9Awi%C4%99tokrzyskie_Voivodeship_location_map.svg`, `https://pl.wikipedia.org/wiki/Plik:Lubusz_Voivodeship_location_map.svg`, `https://pl.wikipedia.org/wiki/Plik:%C5%81%C3%B3d%C5%BA_Voivodeship_location_map.svg`
and are licensed under CC-BY-SA.
* Maps of Voivodeships of Poland come from https://commons.wikimedia.org/wiki/File:Podlaskie_Voivodeship_location_map.svg, https://commons.wikimedia.org/wiki/File:Pomeranian_Voivodeship_location_map.svg, https://pl.wikipedia.org/wiki/Plik:Kuyavian-Pomeranian_Voivodeship_location_map.svg, https://pl.wikipedia.org/wiki/Plik:Warmian-Masurian_Voivodeship_location_map.svg, https://pl.wikipedia.org/wiki/Plik:Masovian_Voivodeship_location_map.svg, https://pl.wikipedia.org/wiki/Plik:Lesser_Poland_Voivodeship_location_map.svg, https://pl.wikipedia.org/wiki/Plik:Greater_Poland_Voivodeship_location_map.svg, https://pl.wikipedia.org/wiki/Plik:Opole_Voivodeship_location_map.svg, https://pl.wikipedia.org/wiki/Plik:Lower_Silesian_Voivodeship_location_map.svg, https://pl.wikipedia.org/wiki/Plik:Silesian_Voivodeship_location_map.svg, https://pl.wikipedia.org/wiki/Plik:Lublin_Voivodeship_location_map.svg, https://pl.wikipedia.org/wiki/Plik:Subcarpathian_Voivodeship_location_map.svg, https://pl.wikipedia.org/wiki/Plik:West_Pomeranian_Voivodeship_location_map.svg, https://pl.wikipedia.org/wiki/Plik:%C5%9Awi%C4%99tokrzyskie_Voivodeship_location_map.svg, https://pl.wikipedia.org/wiki/Plik:Lubusz_Voivodeship_location_map.svg, https://pl.wikipedia.org/wiki/Plik:%C5%81%C3%B3d%C5%BA_Voivodeship_location_map.svg and are licensed under CC-BY-SA.
* CSS tricks used to render histograms are based on `https://css-tricks.com/making-charts-with-css` and collapsibles are based on `https://alligator.io/css/collapsible/`.
* CSS tricks used to render histograms are based on https://css-tricks.com/making-charts-with-css and collapsibles are based on https://alligator.io/css/collapsible.

Wyświetl plik

@ -41,10 +41,10 @@ int main(int argc, char** argv) {
case 'h':
case '?':
default:
std::cout << "Usage: ???\n";
std::cout << "Usage: geodb [-i path] [-uh]\n";
std::cout << "Manage local Opencaching database.\n\n";
std::cout << "\t-i folder\tinitialize database from dump located in given folder\n";
std::cout << "\t-u\tupdate database with changelogs grabbed via OKapi\n";
std::cout << "\t-u\tupdate database with changelogs grabbed via OKAPI\n";
std::cout << "\t-h\tdisplay this help screen\n";
std::exit(EXIT_FAILURE);
}

Wyświetl plik

@ -14,10 +14,10 @@
const int HIST_MAX = 20;
void show_usage() {
std::cout << "Usage: [-p] [-g file] [-qn] [-MDHLTOYh] [-s size] [-m map]\n";
std::cout << "Usage: geostat [-p] [-g file] [-qn] [-MDHLTOYh] [-s size] [-m map]\n";
std::cout << "Generate stats from Opencaching data or GPX files.\n\n";
std::cout << " * Data source:\n";
std::cout << "\t-p\tuse Opencaching.pl\n";
std::cout << "\t-p\tuse opencaching.pl\n";
std::cout << "\t-u user\tuser for Opencaching\n";
std::cout << "\t-g file\tuse specified gpx file\n";
std::cout << "\t-q\tuse local SQLite file\n";