@ -36,20 +36,20 @@ def main():
@@ -36,20 +36,20 @@ def main():
# a send command
send_parser = subparsers . add_parser ( " send " , description = " Send data to PrivateBin instance " )
send_parser . add_argument ( " -t " , " --text " , help = " t ext in quotes. Ignored if used stdin. If not used, forcefully used stdin" )
send_parser . add_argument ( " -f " , " --file " , help = " e xample: image.jpg or full path to file" )
send_parser . add_argument ( " -p " , " --password " , help = " p assword for encrypting paste" )
send_parser . add_argument ( " -t " , " --text " , help = " T ext in quotes. Ignored if used stdin. If not used, forcefully used stdin" )
send_parser . add_argument ( " -f " , " --file " , help = " E xample: image.jpg or full path to file" )
send_parser . add_argument ( " -p " , " --password " , help = " P assword for encrypting paste" )
send_parser . add_argument ( " -E " , " --expire " , default = " 1day " , action = " store " ,
choices = [ " 5min " , " 10min " , " 1hour " , " 1day " , " 1week " , " 1month " , " 1year " , " never " ] , help = " p aste lifetime (default: 1day)" )
send_parser . add_argument ( " -B " , " --burn " , default = False , action = " store_true " , help = " burn sent paste after readin g" )
send_parser . add_argument ( " -D " , " --discus " , default = False , action = " store_true " , help = " o pen discussion for sent paste" )
choices = [ " 5min " , " 10min " , " 1hour " , " 1day " , " 1week " , " 1month " , " 1year " , " never " ] , help = " P aste lifetime (default: 1day)" )
send_parser . add_argument ( " -B " , " --burn " , default = False , action = " store_true " , help = " Set \" Burn after reading \" fla g" )
send_parser . add_argument ( " -D " , " --discus " , default = False , action = " store_true " , help = " O pen discussion for sent paste" )
send_parser . add_argument ( " -F " , " --format " , default = " plaintext " , action = " store " ,
choices = [ " plaintext " , " syntaxhighlighting " , " markdown " ] , help = " f ormat of text (default: plaintext)" )
send_parser . add_argument ( " -q " , " --notext " , default = False , action = " store_true " , help = " d on' t send text in paste " )
choices = [ " plaintext " , " syntaxhighlighting " , " markdown " ] , help = " F ormat of text (default: plaintext)" )
send_parser . add_argument ( " -q " , " --notext " , default = False , action = " store_true " , help = " D on' t send text in paste " )
send_parser . add_argument ( " -c " , " --compression " , default = " zlib " , action = " store " ,
choices = [ " zlib " , " none " ] , help = " s et compression for paste (default: zlib). Note: works only on v2 paste format" )
choices = [ " zlib " , " none " ] , help = " S et compression for paste (default: zlib). Note: works only on v2 paste format" )
## URL shortener
send_parser . add_argument ( " -S " , " --short " , default = False , action = " store_true " , help = " u se URL shortener" )
send_parser . add_argument ( " -S " , " --short " , default = False , action = " store_true " , help = " U se URL shortener" )
send_parser . add_argument ( " --short-api " , default = argparse . SUPPRESS , action = " store " ,
choices = [ " tinyurl " , " clckru " , " isgd " , " vgd " , " cuttly " , " yourls " , " custom " ] , help = " API used by shortener service " )
send_parser . add_argument ( " --short-url " , default = argparse . SUPPRESS , help = " URL of shortener service API " )
@ -59,45 +59,44 @@ def main():
@@ -59,45 +59,44 @@ def main():
## Connection options
send_parser . add_argument ( " -s " , " --server " , default = argparse . SUPPRESS , help = " Instance URL (default: https://paste.i2pd.xyz/) " )
send_parser . add_argument ( " -x " , " --proxy " , default = argparse . SUPPRESS , help = " Proxy server address (default: None) " )
send_parser . add_argument ( " --no-check-certificate " , default = False , action = " store_true " , help = " d isable certificate validation" )
send_parser . add_argument ( " --no-check-certificate " , default = False , action = " store_true " , help = " D isable certificate validation" )
send_parser . add_argument ( " --no-insecure-warning " , default = False , action = " store_true " ,
help = " s uppress InsecureRequestWarning (only with --no-check-certificate)" )
help = " S uppress InsecureRequestWarning (only with --no-check-certificate)" )
##
send_parser . add_argument ( " -L " , " --mirrors " , default = argparse . SUPPRESS , help = " Comma-separated list of mirrors of service with scheme (default: None) " )
send_parser . add_argument ( " -v " , " --verbose " , default = False , action = " store_true " , help = " e nable verbose output" )
send_parser . add_argument ( " -d " , " --debug " , default = False , action = " store_true " , help = " e nable debug output" )
send_parser . add_argument ( " --dry " , default = False , action = " store_true " , help = " i nvoke dry run" )
send_parser . add_argument ( " stdin " , help = " i nput paste text from stdin" , nargs = " ? " , type = argparse . FileType ( " r " ) , default = sys . stdin )
send_parser . add_argument ( " -v " , " --verbose " , default = False , action = " store_true " , help = " E nable verbose output" )
send_parser . add_argument ( " -d " , " --debug " , default = False , action = " store_true " , help = " E nable debug output" )
send_parser . add_argument ( " --dry " , default = False , action = " store_true " , help = " I nvoke dry run" )
send_parser . add_argument ( " stdin " , help = " I nput paste text from stdin" , nargs = " ? " , type = argparse . FileType ( " r " ) , default = sys . stdin )
send_parser . set_defaults ( func = pbincli . actions . send )
# a get command
get_parser = subparsers . add_parser ( " get " , description = " Get data from PrivateBin instance " )
get_parser . add_argument ( " pasteinfo " , help = " \" PasteID#Passphrase \" or full URL " )
get_parser . add_argument ( " -p " , " --password " , help = " p assword for decrypting paste" )
get_parser . add_argument ( " -p " , " --password " , help = " P assword for decrypting paste" )
## Connection options
get_parser . add_argument ( " -s " , " --server " , default = argparse . SUPPRESS , help = " Instance URL (default: https://paste.i2pd.xyz/, ignored if URL used in pasteinfo) " )
get_parser . add_argument ( " -x " , " --proxy " , default = argparse . SUPPRESS , help = " Proxy server address (default: None) " )
get_parser . add_argument ( " --no-check-certificate " , default = False , action = " store_true " , help = " d isable certificate validation" )
get_parser . add_argument ( " --no-check-certificate " , default = False , action = " store_true " , help = " D isable certificate validation" )
get_parser . add_argument ( " --no-insecure-warning " , default = False , action = " store_true " ,
help = " s uppress InsecureRequestWarning (only with --no-check-certificate)" )
help = " S uppress InsecureRequestWarning (only with --no-check-certificate)" )
##
get_parser . add_argument ( " -v " , " --verbose " , default = False , action = " store_true " , help = " e nable verbose output" )
get_parser . add_argument ( " -d " , " --debug " , default = False , action = " store_true " , help = " e nable debug output" )
get_parser . add_argument ( " -v " , " --verbose " , default = False , action = " store_true " , help = " E nable verbose output" )
get_parser . add_argument ( " -d " , " --debug " , default = False , action = " store_true " , help = " E nable debug output" )
get_parser . set_defaults ( func = pbincli . actions . get )
# a delete command
delete_parser = subparsers . add_parser ( " delete " , description = " Delete paste from PrivateBin instance using token " )
delete_parser . add_argument ( " -p " , " --paste " , required = True , help = " paste id " )
delete_parser . add_argument ( " -t " , " --token " , required = True , help = " paste deletion token " )
delete_parser = subparsers . add_parser ( " delete " , description = " Delete paste from PrivateBin instance " )
delete_parser . add_argument ( " pasteinfo " , help = " Paste deletion URL or string in \" pasteid=PasteID&deletetoken=Token \" format " )
## Connection options
delete_parser . add_argument ( " -s " , " --server " , default = argparse . SUPPRESS , help = " Instance URL (default: https://paste.i2pd.xyz/) " )
delete_parser . add_argument ( " -x " , " --proxy " , default = argparse . SUPPRESS , help = " Proxy server address (default: None) " )
delete_parser . add_argument ( " --no-check-certificate " , default = False , action = " store_true " , help = " d isable certificate validation" )
delete_parser . add_argument ( " --no-check-certificate " , default = False , action = " store_true " , help = " D isable certificate validation" )
delete_parser . add_argument ( " --no-insecure-warning " , default = False , action = " store_true " ,
help = " s uppress InsecureRequestWarning (only with --no-check-certificate)" )
help = " S uppress InsecureRequestWarning (only with --no-check-certificate)" )
##
delete_parser . add_argument ( " -v " , " --verbose " , default = False , action = " store_true " , help = " e nable verbose output" )
delete_parser . add_argument ( " -d " , " --debug " , default = False , action = " store_true " , help = " e nable debug output" )
delete_parser . add_argument ( " -v " , " --verbose " , default = False , action = " store_true " , help = " E nable verbose output" )
delete_parser . add_argument ( " -d " , " --debug " , default = False , action = " store_true " , help = " E nable debug output" )
delete_parser . set_defaults ( func = pbincli . actions . delete )
# parse arguments