Commit 53607edc9f89fb0bbedc9d5cfbedaa0a2d06c9d9
Document API and CLI
cel committed on 2/16/2017, 12:23:41 AMParent: 9581a2d0f866b1ec4a9522a4e678d8c5452ffac6
Files changed
README.md | changed |
README.md | |||
---|---|---|---|
@@ -10,8 +10,32 @@ | |||
10 | 10 … | console.log(conf.decode(conf)) | |
11 | 11 … | console.log(conf.encode(conf.decode(conf))) | |
12 | 12 … | ``` | |
13 | 13 … | ||
14 … | +## API | ||
15 … | + | ||
16 … | +### `wpa.decode(str): obj` | ||
17 … | + | ||
18 … | +Decode wpa config | ||
19 … | + | ||
20 … | +- `str`: string of `wpa_supplicant.conf` data | ||
21 … | +- `obj`: config converted into a JS object | ||
22 … | + | ||
23 … | +### `wpa.encode(obj): str` | ||
24 … | + | ||
25 … | +Encode wpa config | ||
26 … | + | ||
27 … | +- `obj`: config as a JS object | ||
28 … | +- `str`: string of `obj` converted into `wpa_supplicant.conf` format | ||
29 … | + | ||
30 … | +### CLI | ||
31 … | + | ||
32 … | +A command-line program is provided that converts between a config in | ||
33 … | +`wpa_supplicant.conf` format and JSON format, using standard I/O. | ||
34 … | + | ||
35 … | +- `wpa-conf decode`: convert conf to json | ||
36 … | +- `wpa-conf encode`: convert json to conf | ||
37 … | + | ||
14 | 38 … | [wpa_supplicant.conf]: https://w1.fi/cgit/hostap/tree/wpa_supplicant/wpa_supplicant.conf | |
15 | 39 … | [POJOs]: http://odetocode.com/blogs/scott/archive/2012/02/27/plain-old-javascript.aspx | |
16 | 40 … | ||
17 | 41 … | ## License | |
Built with git-ssb-web