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
|
||||
|
||||
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
|
||||
|
||||
* A D compiler
|
||||
* dub
|
||||
* fish (for generating translation data)
|
||||
* csvquote (for generating translation data)
|
||||
* D compiler (tested with ldc) + dub
|
||||
* [fish](https://fishshell.com/) (for generating translation data)
|
||||
* [csvquote](https://github.com/dbro/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:
|
||||
0. Install [fish](https://fishshell.com/) and [csvquote](https://github.com/dbro/csvquote)
|
||||
1. Save the `/master/getMaster` API response of the Nutaku version
|
||||
2. Decompress the response (zlib) and name the file 'nutakuMaster.json'
|
||||
3. Run `./generate-translations.fish`
|
||||
4. Verify the translations were generated correctly by looking at the output of `head data/*`
|
||||
```bash
|
||||
$ curl 'http://rn.floweknightgirl.com/api/v1/master/getMaster' (...) > nutakuMaster.zlib
|
||||
$ printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" | cat - nutakuMaster.zlib | gzip -dc > nutakuMaster.json
|
||||
$ ./generate-translations.fish
|
||||
```
|
||||
|
||||
(Get the full curl request from your browser's developer tools' network tab when loading **Nutaku's version**.)
|
||||
|
||||
## Building
|
||||
|
||||
1. Copy `source/config.d.example` to `source/config.d` and edit it
|
||||
2. Run `dub build`
|
||||
```bash
|
||||
$ cp source/config.d.example source/config.d
|
||||
$ # edit source/config.d
|
||||
$ dub build
|
||||
```
|
||||
|
||||
## Using
|
||||
|
||||
1. Start the proxy (`./fkg-api-proxy`)
|
||||
2. Make your browser send the API requests through the proxy (e.g. by adding an /etc/hosts entry)
|
||||
```bash
|
||||
$ echo '127.0.0.1 web.flower-knight-girls.co.jp' | sudo tee -a /etc/hosts
|
||||
$ ./fkg-api-proxy
|
||||
```
|
||||
|
||||
## Disclaimer
|
||||
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
module config;
|
||||
|
||||
//you should be able to find these fairly easily
|
||||
enum keyString = "encryption key";
|
||||
enum cipherName = "cipher name";
|
||||
|
||||
enum serverHost = "API server hostname";
|
||||
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