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

Show abstracts in available command #2286

Merged

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Feb 15, 2018

Problem

Currently the ckan available command prints a module's identifier, latest compatible version, and full name:

$ ckan available | shuf -n 5
* CrewPortraits (1.3.1) - Crew Portraits
* SETI-CareerChallenge (1.3.0.0) - SETI-CareerChallenge
* JSIAdvancedTransparentPods (V0.1.15.0) - JSI Advanced Transparent Pods
* SigmaReplacements-Descriptions (D_v0.2.3) - Sigma Replacements: Descriptions
* NodeAlert (1.1.0) - NodeAlert

If you aren't already familiar with a given mod, this format isn't very helpful in deciding whether to install it. You would have to look up each individual mod to get more information.

Change

Now a new --detail option is available to add the abstract (short description) to the end of each line:

$ ckan available --detail | shuf -n 5
* SearchAndRescue (1:11) - Search And Rescue - A pack of parts for KSP that can be used to build Coast Guard style ships and aircraft
* NEBULADecalsContinued (0.1.1.5) - NEBULA Decals Continued -  STDdM3y.jpg This mod allows to place decals on your crafts!
* KerbalNRAP (1.5.9) - Kerbal NRAP - Procedural Test Weights - Procedural test weights for launchers
* ContractsWindowPlus (8.1) - Contracts Window + - A new, more flexible contract monitoring window.
* ForScience (v1.5.0) - ForScience! - ForScience is autopilot for running, collecting and resetting experiments.

This way you can get a sense of what an unfamiliar mod does. The existing output is left as-is in case scripts are parsing it.

The @-symbol syntax is needed because abstract is a keyword in C#, and the @ allows it to be interpreted as a variable name instead.

@HebaruSan HebaruSan added Enhancement New features or functionality Easy This is easy to fix Cmdline Issues affecting the command line Pull request labels Feb 15, 2018
@politas
Copy link
Member

politas commented Feb 16, 2018

Can we have a --detail option to turn this on, rather than changing the default behaviour?

@HebaruSan
Copy link
Member Author

OK.

@politas politas merged commit 05501a7 into KSP-CKAN:master Feb 17, 2018
politas added a commit that referenced this pull request Feb 17, 2018
@HebaruSan HebaruSan deleted the feature/cmdline-available-abstracts branch February 17, 2018 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cmdline Issues affecting the command line Easy This is easy to fix Enhancement New features or functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants