diff options
author | Florian Pritz <bluewind@xinu.at> | 2016-04-11 09:44:18 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2016-04-11 09:44:18 +0200 |
commit | 7f96c6a3cb79127480a7dc6f9f1753c853a66969 (patch) | |
tree | 549ae619a74e97b6a7ad640efbd244c9cec89f86 | |
parent | dfae82ab4d61e3d5a3a09264025345717f4f4373 (diff) |
fb.1: Document id://
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | fb.1 | 12 | ||||
-rwxr-xr-x | fb.py | 8 |
2 files changed, 15 insertions, 5 deletions
@@ -1,10 +1,10 @@ -.\" Copyright (c) 2010-2014 Florian Pritz, bluewind at xinu.at +.\" Copyright (c) 2010-2016 Florian Pritz, bluewind at xinu.at .\" 2011 Moritz Wilhelmy, mw at wzff.de .\" .\" Licensed under GPLv3 .\" (see COPYING for full license text) .\" -.Dd September 18, 2015 +.Dd April 11, 2016 .Dt FB 1 .Os @@ -15,11 +15,11 @@ .Sh SYNOPSIS .Nm .Op options -.Ar file/directory ... +.Ar file|directory|id://ID|URL ... .Nm .Op Fl dg .Op options -.Ar ID/URL ... +.Ar ID|URL ... .Nm .Op Fl hv @@ -52,6 +52,8 @@ is installed. If you want to use paste.xinu.at, you need to create an account there and then run .Sq Nm Fl a to create an API key. +.Pp +IDs of existing pastes can either be given as URLs pointing to that paste or by prefixing the ID with "id://". .Sh OPTIONS .Bl -tag -width Ds @@ -87,7 +89,7 @@ binary data may cause unexpected results when being output directly to a terminal. You can no longer upload files in this mode. If the argument is a URL, .Nm -will try to extract the ID. +will try to extract the ID. This option also accepts IDs without the "id://" prefix. .It Fl m, -multipaste Create a multipaste of the IDs/files/directories/URLs. This uploads files as always, but then creates a multipaste combining all of them. URLs starting with @@ -97,6 +97,14 @@ class CURLWrapper: return self.serverConfig def upload_files(self, files): + """ + Upload files if f.should_upload() for f in files is true. + + Args: + files: List of File objects + Returns: + List of updated File objects + """ totalSize = 0 chunks = [[]] currentChunkSize = 0 |