Improve readme and config example
This commit is contained in:
parent
4994fdc1b4
commit
9b3872142a
37
README.md
37
README.md
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue