diff options
author | Florian Pritz <bluewind@xinu.at> | 2016-02-13 14:39:57 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2016-02-13 14:39:57 +0100 |
commit | a906a4e17453663091a24d63582936030e3e0edb (patch) | |
tree | 2101c00051aeb79386b6cb3e60a55ed1d08622a8 | |
parent | b2cc4200359e94da78d7dbd2b9c9bc2d5b158a91 (diff) |
Add --id option to create multipaste from IDs
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-x | fb.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -426,6 +426,8 @@ class FBClient: help="Enable debug output") upload_options = parser.add_argument_group('upload options') + upload_options.add_argument("-i", "--id", default=False, action="store_true", + help="Interpret arguments as IDs") upload_options.add_argument("-t", "--tar", default=False, action="store_true", help="Upload a tar file containing all files (and directories)") upload_options.add_argument("-m", "--multipaste", default=False, action="store_true", @@ -598,6 +600,10 @@ class FBClient: self.upload_files([tempfile]) return else: + if self.args.id: + ids = [self.extractId(arg) for arg in self.args.args] + return self.multipaste(ids) + # TODO: detect paste URLs and add their IDs to a multipaste files = [self.dl_file(arg) for arg in self.args.args] self.upload_files(files) |