The following functionality needs to be built out and added as global scripts in package.json, so that you could e.g. run node import:
Import new terms
This functionality would take a .CSV or .json file, ingest it, and update the wordlists accordingly.
Desired behavior:
- Identify the locale, and match it to the corresponding locale's wordlist
- Iterate through the importation source, checking the object keys to see if we already have matches
- If not, add the term
- Produce a report of the terms missing / added / already in that locale
Current status
This already exists, in a limited form, in merge.js; however, that script:
- only handles .json, needs to account for .CSV as well
- needs to be made "global" in package.json
Known issues
- Capitalization of terms / object keys. This is very difficult, I don't know how to solve it. wordsofweb3 prefers lower-case unless it's a proper noun, you know, like a real dictionary, but lots of glossary sites use title case. 😢
Export all terms
This functionality would export a global .csv file with all terms and all field values for those terms.
Desired behavior:
- Iterate over all locales' .json files
- Produce a CSV file wherein column A is
locale, and then columns B --> are the object key, term value, etc.
Current status
Other functionalities
There are lots of things that it would be useful to generate in this project. I'll add more to this issue as they occur to me.
The following functionality needs to be built out and added as global scripts in
package.json, so that you could e.g. runnode import:Import new terms
This functionality would take a .CSV or .json file, ingest it, and update the wordlists accordingly.
Desired behavior:
Current status
This already exists, in a limited form, in merge.js; however, that script:
Known issues
Export all terms
This functionality would export a global .csv file with all terms and all field values for those terms.
Desired behavior:
locale, and then columns B --> are the object key, term value, etc.Current status
export-json.js.export-json.jswork for all locales #29Other functionalities
There are lots of things that it would be useful to generate in this project. I'll add more to this issue as they occur to me.