|
|
|
@ -1,7 +1,10 @@
@@ -1,7 +1,10 @@
|
|
|
|
|
#!/usr/bin/env python |
|
|
|
|
# PYTHON_ARGCOMPLETE_OK |
|
|
|
|
import os, sys, argparse |
|
|
|
|
from distutils.util import strtobool |
|
|
|
|
|
|
|
|
|
import argcomplete |
|
|
|
|
|
|
|
|
|
import pbincli.actions |
|
|
|
|
from pbincli.api import PrivateBin |
|
|
|
|
from pbincli.utils import PBinCLIException, PBinCLIError, validate_url_ending |
|
|
|
@ -46,7 +49,7 @@ def main():
@@ -46,7 +49,7 @@ def main():
|
|
|
|
|
send_parser.add_argument("-t", "--text", help="Text in quotes. Ignored if used stdin. If not used, forcefully used stdin") |
|
|
|
|
send_parser.add_argument("-f", "--file", help="Example: image.jpg or full path to file") |
|
|
|
|
send_parser.add_argument("-p", "--password", help="Password for encrypting paste") |
|
|
|
|
send_parser.add_argument("-E", "--expire", default="1day", action="store", |
|
|
|
|
send_parser.add_argument("-E", "--expire", default=argparse.SUPPRESS, action="store", |
|
|
|
|
choices=["5min", "10min", "1hour", "1day", "1week", "1month", "1year", "never"], help="Paste lifetime (default: 1day)") |
|
|
|
|
send_parser.add_argument("-B", "--burn", default=argparse.SUPPRESS, action="store_true", help="Set \"Burn after reading\" flag") |
|
|
|
|
send_parser.add_argument("-D", "--discus", default=argparse.SUPPRESS, action="store_true", help="Open discussion for sent paste") |
|
|
|
@ -124,6 +127,9 @@ def main():
@@ -124,6 +127,9 @@ def main():
|
|
|
|
|
delete_parser.add_argument("-d", "--debug", default=False, action="store_true", help="Enable debug output") |
|
|
|
|
delete_parser.set_defaults(func=pbincli.actions.delete) |
|
|
|
|
|
|
|
|
|
# Add argcomplete trigger |
|
|
|
|
argcomplete.autocomplete(parser) |
|
|
|
|
|
|
|
|
|
# parse arguments |
|
|
|
|
args = parser.parse_args() |
|
|
|
|
|
|
|
|
|