Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fakedata: add page #5675

Merged
merged 12 commits into from
Apr 10, 2021
24 changes: 24 additions & 0 deletions pages/common/fakedata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# fakedata

> Generate fake data using a large variety of generators.
> More information: <https://github.com/lucapette/fakedata>.

- List all valid generators:

`fakedata --generators`

- Generate data using one or more generators:

`fakedata {{generator1}} {{generator2}}`

- Generate data with a specific output format:

`fakedata --format {{csv|tab|sql}} {{generator}}`

- Generate a given number of data items (defaults to 10):

`fakedata --limit {{n}} {{generator}}`

- Generate data using a custom output template (the first letter of generator names must be capitalized):

`echo "{{\{\{Generator\}\}}}" | fakedata`
Copy link
Member

@sbrl sbrl Apr 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wow, this is a very awkward situation here. We don't actually define any standard way to escape this in the client spec. This is the only thing we mention:

Although this specification is about the interface that clients must provide, it is also worth noting that pages are written in standard CommonMark, which the exception of the non-standard {{ and }} syntax, which surrounds values in an example that users may edit. Clients MUST NOT break if the page format is changed within the CommonMark specification.

So the escaping with the backward slashes won't be handled correctly here. What happens if you remove the backwards slashes? How do clients handle that? I would assume that since the syntax can't be nested they would display it?

I think a client spec update is in order to properly define our non-standard token syntax.

Sorry to drag the review process out!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also @sbrl some clients just blindly replace {{ and }} with ANSI codes/HTML to highlight, e.g. hidroh/tldroid (though that client it no longer maintained and we're going to remove it soon I think, #4044)