nodeschool / admin

CLI tool for setting up and maintaining a nodeschool chapters and other things.
17 stars 7 forks source link

Short name for chapters? #13

Open martinheidegger opened 8 years ago

martinheidegger commented 8 years ago

Subtask of #6

All logos have a short-name written at the bottom of the chapter. It might be important to make sure that those names are "unique" (not overlapping with other logos). There be an optional (?) field shortName that can contain something like OSA?

I think the unique-ness should be respected and treated like the area-specification in one central location. (To which people can apply per PR on a FCFS basis).

On the other hand: The creator of nodeschool probably wanted it more free. If it is free'er then it should be part of chapter.json.

Are there other takes on this? Should it be treated unique? Should it be part of the 1.0.0 release?

bnb commented 8 years ago

Yes, I think this should be part of the 1.0.0 release.

On uniqueness, collisions would do no good for anyone and would actually harm people searching for specific shortNames. Collisions are almost never a good idea in programming/computer language (i.e. JSON), and the same reasons for that apply here, I'd say.

So, we have a validator for the chapter.json, right? Why not...

  1. Register a shortName when a chapter.json file is being created. Either create a PR automatically to add to a shortNames.json or chapters.json file in a given central location, or automatically add it via an HTTP request (no idea how that would work - far out of my league; REST API?).
  2. Collect the shortNames in the aforementioned centralized location in array or iteratable structure, where they can be looked up by people and programs alike
  3. When creating a chapter.json file (there's a CLI for doing that, right?), prompt for a preferred shortName, and poll the array or iteratable structure and compare the preferred shortName to it. If it exists, ask for a secondary, tertiary, etc. until an unused one is found; if it doesn't exist, GOTO 1.
martinheidegger commented 8 years ago

Thank you for your feedback. I thought of it a little more and I see following evolutionary steps to support short names.

  1. Have shortnames.json file in nodeschool-admin root that contains the "shortName": "longName" information with all known, unique shortNames.
  2. Automatically add the shortName output of every chapter of list.
  3. Add a command-line-wizard to create a short-name pull-request.
  4. Insert the command-line-wizard into the creating a chapter.json logic (yes it exists)

To me, this issue still has relatively low priority but I will accept PR's if they arrive in the above order.