-
Notifications
You must be signed in to change notification settings - Fork 15
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
Printer rotation command #174
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job, thanks for working on this! Have some style nits but this is definitely the right idea.
One more thing: it might later be useful to add a subcommand that lists the current printer state (i.e. tell the user which printers are in/out of service). You might want to look into argparse subparsers (https://docs.python.org/3/library/argparse.html#sub-commands) for a better way of handling this (as opposed to a conditional arg for "add"/"remove" |
Okay so I took your changes/suggestions and now it uses a subparser, with functionality to list/add/remove. Notably however CUPS doesn't provide a CLI option for listing "non-shared" printers (i.e. hardware printers, not just the classes), so the best I could do was just print the printers that are currently active. Also the entire thing is now more modern, as per your suggestions. Thanks for your help with this @dkess! (also I'm not entirely sure why the build is failing, I see from the logs it has something to do with whitespace (?) but idk where) |
Re: the build errors, the |
* Parsing for mod printer * Implemented mod-printer functionality * Test and bugfix mod-printer * Update mod-printer with more modern Python functions * Change mod-printer to subparsers * Add list_printers mod-printer base function * Add list subcommand to mod-printer * Minor mod-printer doc fix * Fix mod-printer formatting, general verbosity
Fix for #101 with regards to ocf/ocfweb#754.