datenanfragen / company-json-generator Goto Github PK
View Code? Open in Web Editor NEWA very simple (quick-and-dirty) company JSON generator
Home Page: https://company-json.datenanfragen.de
License: Other
A very simple (quick-and-dirty) company JSON generator
Home Page: https://company-json.datenanfragen.de
License: Other
We should support loading an existing record into the generator from a file.
Since this feature is especially useful for validating and fixing community contributions, we should also support loading records from the URL (as a base64-encoded string or similar).
The tool can already load records from a number of sources, including from the data
repository (through the slug
parameter) and from JSON (through the doc
parameter):
company-json-generator/src/app.js
Lines 142 to 163 in 2fdbb7a
We should add the ability to load a record from an arbitrary URL through a new url
parameter. As the implementation will be very similar to the one for the slug
parameter, we should reuse that code.
The idea behind this is that we wouldn't need to encode the whole record in the URL in our backend anymore for suggest PR "Edit" links. Instead, we could just reference the raw file on GitHub (like: https://raw.githubusercontent.com/datenanfragen-community-edits/data/suggest_haspa_1631904031723/companies/haspa.json
) and load that.
The added bonus of that is that this would allow the "Edit" link to continue working even after changes have already been made to the PR.
Seems like the JSON generator now fetches the file from a PR (#31), but doesn't seem to be working?
The source code for this tool uses an awful mix of old and new JS and has gotten quite messy over time.
We should refactor and clean up the source code and convert it to TypeScript, making use of modern JS and TS features.
As the code for the tool is quite short and not complex, this issue is well suited for people new to our project. But you need to be familiar with modern JS and TS already.
-> While the website changes the values, the changes aren't considered when generating the JSON record.
The generator uses the displayed, formatted text to generate the JSON record.
https://example.com
as the websiteexample-com
Alternatively:
004987654321
as the phone/fax numberde
, and confirm the dialog+49 8765 4321
004987654321
instead of +49 8765 4321
as the phone/fax number.The JSON schema for datenanfragen/data, requires a name
attribute, but the generator only has desc
attribute
"required-elements": [
{
"desc": "example",
"type": "input",
"optional": true
}
],
E.g. click on the "Edit" link in datenanfragen/data#946
It contains some "optional": false
s. But they are not picked up by the cjg:
Seems to be a bug in brutusin-json-forms
and not in our code.. But still quite annoying.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.