2021-09-30 18:50:08 +02:00
The charging station theme
==========================
As you might have noticed, the charging station theme is complicated and large.
There are a ton of repititive questions. Luckily, we can generate those.
If you want to add a missing socket type, then:
- Add all the properties in 'types.csv'
- Add an icon. (Note: icons are way better as pictures as they are perceived more abstractly)
2022-04-08 13:05:47 +02:00
- Update 'license_info.json' with the copyright info of the new icon. Note that we strive to have Creative Commons icons
2021-11-07 16:34:51 +01:00
only (though there are exceptions)
2021-09-30 18:50:08 +02:00
2022-04-08 13:05:47 +02:00
At this point, most of the work should be done; feel free to send a PR. If you would like to test it locally first
(which is recommended) and have a working dev environment, then run:
2021-09-30 18:50:08 +02:00
2022-04-08 13:05:47 +02:00
- Run `ts-node csvToJson.ts` which will generate a new charging_station.json based on the protojson
- Run `npm run query:licenses` to get an interactive program to add the license of your artwork, followed
2021-11-07 16:34:51 +01:00
by `npm run generate:licenses`
2021-09-30 18:50:08 +02:00
- Run `npm run generate:layeroverview` to generate the layer files
2021-10-02 15:16:41 +02:00
- Run `npm run start` to run the instance
The CSV File
------------
The columns in the CSV file are:
2021-12-10 14:29:12 +01:00
- `key` : the key as described on the wiki, starts with `socket:`
- `image` : The associated image (a .svg)
- `description:en` A description in english
- `description:nl` A description in english
- `countryWhiteList` : Only show this plug type in these countries
- `countryBlackList` : Don't show this plug type in these countries. NOt compatibel with the whiteList
- `commonVoltages` , `commonCurrents` , `commonOutputs` : common values for these tags
- `associatedVehicleTypes` and `neverAssociatedWith` : these work in tandem to hide options. If every associated vehicle type
2021-11-07 16:34:51 +01:00
is `no` , then the option is hidden If at least one `neverAssociatedVehicleType` is `yes` and none of the associated
types is yes, then the option is hidden too
2021-12-11 00:22:45 +01:00
- `extraVisualisationCondition` : in some exceptional cases, a socket type is branded differently. This extra condition allows to hide these cases in the big multi-answer