This repository contains a cpp client module for access to Mergin service and a command-line tool for easy access to data stored in Mergin.
Note: Check also Mergin Python Client
When the client is installed, it comes with mergin command line tool.
$ mergin --help
Usage: mergin [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
--version Show the version information.
--username Mergin username (or MERGIN_USERNAME env. variable)
--password Mergin password (or MERGIN_PASSWORD env. variable)
--url Mergin url (defaults to public.cloudmergin.com)
Commands:
create Create a new project on Mergin server
download Download last version of mergin project
sync Pull&Push the changes
remove Remove project from server.
For CI setup, see this GitHub Action
- Install Visual Studio (At least c++ compiler)
- Install Qt5 (some recent version, 5.14.x or 5.15.x)
- Install Cmake
- Compile Geodiff
<in VS cmd>
git clone https://github.com/lutraconsulting/geodiff
cd build-geodiff
cmake ..\geodiff\geodiff
cmake --build . --config Release
- Download Input
git clone https://github.com/lutraconsulting/input
git checkout mergin_cpp
- Compile Client
<in VS cmd>
cd build-client
qmake ..\mergin-cpp-client\src\client.pro
nmake release
TODO For running test do:
cd mergin
export TEST_MERGIN_URL=<url> # testing server
export TEST_API_USERNAME=<username>
export TEST_API_PASSWORD=<pwd>
export TEST_API_USERNAME2=<username2>
export TEST_API_PASSWORD2=<pwd2>
pipenv run pytest --cov-report html --cov=mergin test/