Repository navigation
Description
A lot of this is sorta stubbed out, but I think that it makes sense, in order to work through the UX, to add all the commands and basics in the cobra stuff.
Here's what I think the high level command are:
configReturns the current configurationdoctorCheck that everything looks goodeventCreate or modify an eventprogramCreate or modify a programspeakerCreate or modify speakerssponsorCreate or modify sponsorsversionReturn the current version of the tool
The main commands (event, program, speaker, and sponsor) all have sub-commands of add and edit, for consistency.
Add and edit commands for event, program, and speaker will take in either city year as arguments, or prompt for them. The add and edit commands for sponsor will take in the sponsor name as an argument or prompt for it.
Edit event should prompt and say "what field do you want to modify" or something. And then act on it. so maybe something like:
>event edit chicago 2017
Do you want to [1] edit the value of a field, [2] add an organizer, or [3] add a sponsor?
>1
Fields you can edit are [1] Event Twitter, [2] Google Analytics Tracking ID, [3] start date, [4] end date ...
>1
The current value of your event twitter is devopsdays. Would you like to change it? (Y/n)
>Y
What should the new value be?
>@ponyville
Great! The new value has been set.
Don't forget to use git to add, commit, and push up the new branch for review
The good things? We can validate fields as they are entered. The bad? The list of fields could get REALLY LONG.
What's going to end up happening is going through all the if cases (edit an organizer vs add one, how do they add sponsor levels?, etc)
Activity
mattstratton commentedon Sep 28, 2017
I've gone through this a bit more, and thought a bit about it, and according to how cobra approaches it:
The pattern to follow is APPNAME VERB NOUN –ADJECTIVE. or APPNAME COMMAND ARG –FLAGWith that, the high level commands are:
configReturns the current configurationdoctorCheck that everything looks goodversionReturn the current versionaddAdd an event, sponsor, speaker, talk, program, etceditEdit an event, sponsor, speaker, talk, program, etcso you could have something like this for a new event:
devopsdays-cli add event --city chicago --year 2017and then the more fun one...
mattstratton commentedon Sep 29, 2017
OK, after further analysis, I've gone back to the original high-level command idea.
The high-level commands are:
configReturns the current configurationdoctorChecks that everything looks goodeventCreate or edit an eventprogramCreate or edit a programspeakerCreate, edit, or remove a speakersponsorAdd or remove a sponsor from an event; create or edit an existing sponsortalkCreate, edit, or remove a talkversionReturns version of tools, etcSo to go back to the previous example...to create a new event:
devopsdays-cli event create --city Chicago --year 2017mattstratton commentedon Sep 30, 2017
Gah. This is driving me crazy. I don't remember why I changed away from the initial one.
Remember, the pattern to follow is
APPNAME VERB NOUN --ADJECTIVE. orAPPNAME COMMAND ARG --FLAG.That would mean it should be
devopsdays-cli create event --city chicago --year 2017The verbs are:
addAdd a thing to another thingadd sponsor --city chicago --year 2017createMake a new thing:create event --city chicago --year 2017editChange an existing thing.edit talkremoveDelete a thing.remove speaker george-bluth --city ponyville --year 2017showDisplay a thing.show version,show config. Maybe it can also be used to show events, speakers, etc, but not worried about that right now.The nouns are:
configeventorganizerprogramspeakersponsortalkversionNot all verbs work with all nouns; for example,
configonly works withshow, andremovewon't work withsponsor.mattstratton commentedon Oct 2, 2017
Here's the matrix of verbs and nouns:
9 remaining items