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

JSON standard unit format (proposal) #8

Open
Technici4n opened this issue Nov 20, 2016 · 7 comments
Open

JSON standard unit format (proposal) #8

Technici4n opened this issue Nov 20, 2016 · 7 comments

Comments

@Technici4n
Copy link
Member

Hi,

I propose to have a JSON file for each unit, with standard format. This would allow me to easily (and dynamically) show problems by unit for every contestant on the beoi-training website... It could also be used to create the README.md files in a standardized way, but that's not the main purpose.

Here is my (personal) suggestion (I picked the unit 7 as example):

{
	"unit": 7,
	"title": "Union Find Disjoint Sets",
	"description": "This unit covers the Union-Find data structure for disjoint sets\n\nComplementary notes can be found in section 2.4.2 of the book Competitive Programming 3.",
	"short_description": "",
	"presentation": "union-find.pdf",
	"prerequisites": [1, 2, 4],
	"problems":
	[
		["uva", 793, "recommended as beginning exercise"],
		["uva", 10158, "a bit more challenging"],
		["uva", 10583, "recommended as beginning exercise"],
		["uva", 10608],
		["uva", 11503],
		["uva", 11690],
		["codeforces", "278C"],
		["codeforces", "722C"]
	]
}

This should be enough to create the main README.md with all titles and short descriptions, and a README.md and links to all problems and to the main pdf (That's a lot of "and")...

I can write all the scripts without any problem, but I'll use Ruby then. :-)

@RobinJadoul
Copy link
Member

It would help for my dependency graph (see pull request) as well, no more
regex parsing 😉

Robin

On Nov 20, 2016 14:03, "Technici4n" [email protected] wrote:

Hi,

I propose to have a JSON file for each unit, with standard format. This
would allow me to easily (and dynamically) show problems by unit for every
contestant on the beoi-training website... It could also be used to create
the README.md files in a standardized way, but that's not the main purpose.

Here is my (personal) suggestion (I picked the unit 7 as example):

{
"unit": 7,
"title": "Union Find Disjoint Sets",
"description": "This unit covers the Union-Find data structure for disjoint sets\n\nComplementary notes can be found in section 2.4.2 of the book Competitive Programming 3.",
"short_description": "",
"presentation": "union-find.pdf",
"prerequisites": [1, 2, 4],
"problems":
[
["uva", 793, "recommended as beginning exercise"],
["uva", 10158, "a bit more challenging"],
["uva", 10583, "recommended as beginning exercise"],
["uva", 10608],
["uva", 11503],
["uva", 11690],
["codeforces", "278C"],
["codeforces", "722C"]
]
}

This should be enough to create the main README.md with all titles and
short descriptions, and a README.md and links to all problems and to the
main pdf (That's a lot of "and")...

I can write all the scripts without any problem, but I'll use Ruby then.
:-)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#8, or mute the thread
https://github.com/notifications/unsubscribe-auth/APVxdhlfiYevcHojDrCBSDUl5aPjgq1gks5rAFM_gaJpZM4K3i11
.

@Technici4n
Copy link
Member Author

Technici4n commented Nov 20, 2016

Yeah, that would be nice too !

I think there will be some problems with the FR/NL translations though (why not just use EN ?)...
Here is an ongoing test: https://github.com/Technici4n/beoi-training-1
Obviously it's not ready yet, but so you can see what it looks like...

BTW do you know why the newlines on the main README.md aren't displayed ?
EDIT: Now they are ! (WTF?)

@RobinJadoul
Copy link
Member

Because for the introductory units, we don't want to put the less fluent
english speakers off too much...

The newlines might be markdown requiring double newlines/whitespace to make
it an actual different paragraph instead of a paragraph splitted among
multiple lines.

Robin

On Nov 20, 2016 20:58, "Technici4n" [email protected] wrote:

Yeah, that would be nice too !

I think there will be some problems with the FR/NL translations though
(why not just use EN ?)...
Here is an ongoing test: https://github.com/Technici4n/beoi-training-1
Obviously it's not ready yet, but so you can see what it looks like...

BTW do you know why the newlines on the main README.md aren't displayed ?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#8 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APVxdpBzkTMSFDEFzQ4FayqZnEZEjWaaks5rALSQgaJpZM4K3i11
.

@RobinJadoul
Copy link
Member

It could be separated into multiple languages, in an array with an extra key maybe

@Technici4n
Copy link
Member Author

Maybe just add an optional "unit-nl.json" or "unit-fr.json" to overwrite some values, and build the READMEs in EN, NL and FR, with links to the version with the correct language.

I already implemented this, have a look at: https://github.com/Technici4n/beoi-training-1/blob/master/README-nl.md (only works for unit 1 and NL, it's just a POC).

@Technici4n
Copy link
Member Author

So... I'm done. What do you think of it ? (Have a look at my fork)

@RobinJadoul
Copy link
Member

  1. I think I'd rather see the localized unit information merged in a general README.md, such that it is simply displayed for everyone to read when that folder is opened on github.

  2. We might want to localize the headers (eg. "Prerequisites") for the different languages as well (maybe some extra json data for translations in the scripts folder?)

Otherwise, this seems OK for me. If you make it a pull request, we can continue the last tweaking here...

Any other ideas/remarks? @nicoekkart @vlecomte @mcouplet @JorikJooken

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants