Improve readme and config example

This commit is contained in:
Les De Ridder 2017-08-13 00:23:37 +02:00
parent 4994fdc1b4
commit 9b3872142a
2 changed files with 24 additions and 17 deletions

View File

@ -2,33 +2,38 @@
## Description ## Description
This is a proxy for DMM's version of Flower Knight Girl. Currently its main feature is providing a way to use parts of Nutaku's translations (or user-provided translations) in the DMM version. This is a proxy for DMM's version of [Flower Knight Girl](http://www.dmm.co.jp/netgame_s/flower-x/). Currently its main feature is providing a way to use parts of Nutaku's translations (or user-provided translations) in the DMM version.
## Dependencies ## Dependencies
* A D compiler * D compiler (tested with ldc) + dub
* dub * [fish](https://fishshell.com/) (for generating translation data)
* fish (for generating translation data) * [csvquote](https://github.com/dbro/csvquote) (for generating translation data)
* csvquote (for generating translation data)
## Translations ## Generating translation data
To use the proxy for translations based on the Nutaku version, you need to generate the data from the Nutaku version's master data: ```bash
0. Install [fish](https://fishshell.com/) and [csvquote](https://github.com/dbro/csvquote) $ curl 'http://rn.floweknightgirl.com/api/v1/master/getMaster' (...) > nutakuMaster.zlib
1. Save the `/master/getMaster` API response of the Nutaku version $ printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" | cat - nutakuMaster.zlib | gzip -dc > nutakuMaster.json
2. Decompress the response (zlib) and name the file 'nutakuMaster.json' $ ./generate-translations.fish
3. Run `./generate-translations.fish` ```
4. Verify the translations were generated correctly by looking at the output of `head data/*`
(Get the full curl request from your browser's developer tools' network tab when loading **Nutaku's version**.)
## Building ## Building
1. Copy `source/config.d.example` to `source/config.d` and edit it ```bash
2. Run `dub build` $ cp source/config.d.example source/config.d
$ # edit source/config.d
$ dub build
```
## Using ## Using
1. Start the proxy (`./fkg-api-proxy`) ```bash
2. Make your browser send the API requests through the proxy (e.g. by adding an /etc/hosts entry) $ echo '127.0.0.1 web.flower-knight-girls.co.jp' | sudo tee -a /etc/hosts
$ ./fkg-api-proxy
```
## Disclaimer ## Disclaimer

View File

@ -1,9 +1,11 @@
module config; module config;
//you should be able to find these fairly easily
enum keyString = "encryption key"; enum keyString = "encryption key";
enum cipherName = "cipher name"; enum cipherName = "cipher name";
enum serverHost = "API server hostname"; enum serverHost = "API server hostname";
enum serverPort = 80; enum serverPort = 80;
enum proxyPortNumber = 80; //edit this if you want to run the proxy as a normal user and use a reverse proxy //edit this if you want to run the proxy as a normal user and use a reverse proxy
enum proxyPortNumber = 80;