Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# @see: https://opensource.com/article/20/4/print-duplex-bash-script#!/bin/bash | |
# take any PDF file and print the odd pages first | |
# THEN, ask the user to put the paper back in the printer, face down | |
# THEN, print even pages | |
# take the default printer from the cups configuration | |
# OR manually set it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inspect | |
import ast | |
def _args_from_usage_string_ast(s): | |
tree = ast.parse(s) | |
ast_args = tree.body[0].value.args | |
args = [s[arg.col_offset:arg.end_col_offset] for arg in ast_args] | |
return args | |