diff --git a/README.md b/README.md index 0119388..5b1043f 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,36 @@ Details about supported options: * `rest_lib` which method will be used to access the remote API. `nap` is the internal one (curl+simdjson). `restc-cpp` is currently broken due to a [bug](https://github.com/jgaa/restc-cpp/issues/101) upstream * `with_lzma` adds support for JSON logs compression (option `json_store_mode=xz` in the config file) +### Debug build ### + +If you want to work on orotool I suggest the following configuration (assuming ~/dev/orotool is where the source code is): + +``` +meson setup -Dbase_url=http://localhost:8080 --sysconfdir ~/dev/orotool -Dbuildtype=debug ~/dev/orotool +``` + +This will cause the config file in your source tree to be used by orotool, so you +will have to enter an API key there. It doesn't have to be valid since you're +not connecting to the real server, but it should be still recognised by the +program as valid. Try a dummy value like aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa for example. +`ninja install` is still safe to run. + +It will also set localhost as the url to the rest API. You can install and run +[SoapUI](https://www.soapui.org/) to make your computer respond on localhost:8080. +You can use the provided `sample_responses/originsro.xml` file with SoapUI. + +After compiling you can run `ln -s src/orotool` in the build directory to make a +symlink to the binary. You can then run the program with `./orotool`. When testing +locally I usually run this command in just one line: `rm -fv originsro.db3 ; ninja && ./orotool`. +It will delete the SQLite database if present, compile if needed and then run orotool. + +## Configuration ## + +You can customise certain runtime aspects of orotool in `orotool.conf` (location +of this file depends on your build configuration). The file provided in the repository +has some sane defaults except for the API key which you have to set yourself. To +obtain an API key login to your OriginsRO control panel and generate a key [here](https://cp.originsro.org/masteraccount/view/). + ## Contact ## The best way to get in touch is on IRC: