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

jc integration - suggest to install #530

Open
ilyash-b opened this issue Jan 24, 2022 · 2 comments
Open

jc integration - suggest to install #530

ilyash-b opened this issue Jan 24, 2022 · 2 comments
Labels

Comments

@ilyash-b
Copy link
Contributor

ilyash-b commented Jan 24, 2022

NGS should recommend to install jc when NGS is unable parse the output of a command or a contents of a file.

Parsing a command

data = ``some_command``

If the above fails, the recommendation should say something like "please install jc and run as following:"

data = ``jc some_command``

Parsing a file

Example:

data = fetch('/etc/fstab')

Same for the above except no code modification is required, just re-run when jc is installed.

Useful information

Baking the list of supported commands into NGS

  • jc -a outputs a list of supported commands and platforms
  • The platform roughly corresponds to sys.platform in Python
  • Beware of two_word_command - a command with an argument, for example airport -s
  • jc -a apparently does not have paths of supported files (like /etc/fstab) except for in description
@ilyash-b
Copy link
Contributor Author

ilyash-b commented Jan 24, 2022

Have second thoughts regarding the exact behavior of fetch(). It is asymmetrical with the run-and-parse syntax. The issue here is if at any point in time, NGS will consider a particular file or two so important as to have built-in parser in NGS, there would be a conflict.

@ilyash-b
Copy link
Contributor Author

TODO: also handle the situation with run-and-parse when jc is installed but was not used

@ilyash-b ilyash-b pinned this issue Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant