Hide Forgot
Can we make a "works out of the box" (as much as possible) and "self-documenting" configuration file? Something like this would be good: [servers] # The default url and username is used by commands like csprocessor list that aren't project-specific # See: https://bugzilla.redhat.com/show_bug.cgi?id=803120 default.url = http://skynet.usersys.redhat.com:8080/TopicIndex default.username = YOUR KERBEROS NAME HERE test.url = http://skynet.usersys.redhat.com:8080/TopicIndex test.username = YOUR KERBEROS NAME HERE production.url = http://skynet.bne.redhat.com:8080/TopicIndex production.username = YOUR KERBEROS NAME HERE [directory] root = [publican] build.parameters = --langs=en-US --format=html-single preview.format = html-single
When csprocessor is run and it sees "YOUR KERBEROS NAME HERE" in the ini file, it could say: "Please edit ~/.config/csprocessor.ini and set your username"
jwulf-108> so what about linking it with the other RFE which makes the default a reference <jwulf-108> and put something like this: <jwulf-108> # default = test <jwulf-108> # default = production <jwulf-108> # Uncomment one of the above servers <lnewson> yeah i see no issues with that <jwulf-108> and then the csprocessor could say: <lnewson> that way it's all there and they just need to remove one comment symbol <jwulf-108> "No default server is specified in ~/.config/csprocessor.ini. Do you need to uncomment one?" <jwulf-108> if it doesn't find a default server
Added in 0.22.4 The new output is: ------------------------------------------------- [servers] # Uncomment one of the default servers below based on the server you wish to connect to. #default=production #default=test #If you use one username for all servers then uncomment and set-up the below value instead of each servers username #default.username= # Production Server settings production.url=http://skynet.cloud.lab.eng.bne.redhat.com:8080/TopicIndex/ production.username= # Test Server settings test.url=http://skynet.usersys.redhat.com:8080/TopicIndex/ test.username= [directory] root= [publican] build.parameters=--langs=en-US --format=html-single preview.format=html-single ------------------------------------------------- Note: I didn't include the "YOUR KERBEROS NAME HERE" as that will break part of the ease of having a default.username property. If the default server hasn't been uncommented and no server is specified by the command line or csprocessor.cfg then the following error will appear "No default server was found in the /home/lnewson/.config/csprocessor.ini configuration file. Perhaps you need to uncomment a default?" If no username is entered then the error message "No username was specified for the server. Please check your configuration files and make sure a username exists." will be printed.
An example with the default.username property: ------------------------------------------------- [servers] # Uncomment one of the default servers below based on the server you wish to connect to. #default=production #default=test default=local #If you use one username for all servers then uncomment and set-up the below value instead of each servers username default.username=lnewson # Production Server settings production.url=http://skynet.cloud.lab.eng.bne.redhat.com:8080/TopicIndex/ production.username= # Test Server settings test.url=http://skynet.usersys.redhat.com:8080/TopicIndex/ test.username= # Local server settings local.url=http://localhost:8080/TopicIndex/ local.username= [directory] root= [publican] build.parameters=--langs=en-US --format=html-single preview.format=html-single -------------------------------------------------
Closing and setting as current release as no QA was performed by the original reporter. If there is still an issue with this bug still than please re-open it.