Comments (10)
There's no other way to have the UUID listed when the paste is created. However, -Dq exists for you to query the pastes you have created so you can manage them. Also note, if you use bash or zsh, pbpst ships with tab completions which will work to complete UUIDs for the options that expect them.
If you use a different shell for which we do not ship tab completions, and would like to contribute them, let me know!
from pbpst.
Thank you.
I use bash, tab completion works good. It tells uuids, I just don't know which is which but I guess that's what the -Dq is for.
Just to make sure
$pbpst -Dq ./already_uploaded_file right?
and not $pbpst -Dq https://ptpb.pw/link or anything else
In the case that my first command is right and I lose the original file, I'm messed up, aren't I?
from pbpst.
-Dq
allows you to search based on all stored fields in the database. You can search by the file name (or whatever message you used in -m
when creating the paste), by the uuid, by the sunset or by the paste id (either the long id or the vanity label if one exists).
Also note that searches can be partial, so pbpst -Dq 't'
will print all results from the db where t
was part of any field.
Finally, -Dq
only searches, it does not do anything destructive. You would use it only to get the uuid to pass to -Ru
(or -Dd
if you do not care about its removal on the provider).
from pbpst.
Please also consider reading the manual page (man pbpst
); we spent a considerable amount of time trying to make the documentation pretty good.
from pbpst.
Thank you HalosGhost,
Being a good Arch user, I had tried to read the manual before I asked the question.
"Search each paste in the pastes object for text matching STR. Matches will be printed to stdout with the form \t/\t\t where is either the long id or a vanity label if one exists. "
This wasn't clear enough for me to fully understand the usage. Thank you for taking your time and clarifying it!
from pbpst.
@p1839251, Happy to do it! Can you suggest an alternate phrasing or some clarification that I could add to the page which would have helped you? I would be glad to add it!
from pbpst.
The phrasing is probably good. Once you understand it, everything makes sense then.
Definitions are usually written by such people who know the subject inside out. Therefore they are well written, although they are sometimes incomprehensible and might be hard to understand or even learn from them.
My problem was that I had never thought pbpst was so advanced. You can fundamentally type anything after -Dq, pbpst will find it.
However, this line is kind of messy in the manual: \t/\t\t
Those \t-s are rather confusing and I still don't know what they are supposed to mean.
So, I personally love examples. It's oftentimes easier to learn from them than definitions.
If I'm not mistaken there are 5 main operations. Each operation has an example but database. I really missed that. (Okay there's a 'for' command which contains database operations but it's definitely not for dummies. I don't know what's going on there).
Every important operation should have an example that could help dispel the myths and doubts. The more, the better. By the way, obtaining UUIDs are important because I think they are needed in order to modify an uploaded content.
I incorrectly thought pbpst got the UUIDs from links, so I insisted on them and since there was no output after launching $pbpst -Dq https://ptpb.pw/34Cb I didn't know what went wrong.
To sum up, more examples, especially a database example would increase the manual's value. As you wrote, for example: "pbpst -Dq 't' will print all results from the db where t was part of any field"
from pbpst.
Ahh, I see. \t
is the backslash-escape representation of a tab character. I found it important to specify so that the user could predictably parse the output of -Dq
.
Having a simpler example of -D
makes sense to me; I will include that!
from pbpst.
@p1839251, I've added a simpler example for -Dq
and tried to expand on the documentation for how it operates. Let me know if you can think of anything else that would help!
from pbpst.
I've checked it and I have to tell you it's pretty good! It's quite straight forward. Good job!
Maybe one more example could be added to the manual.
People mainly use pbpst to upload content, don't they? There's already an example how to upload a file but there isn't any about how to upload a command output. I know there's a note about this at 'Sync Options'. Although this topic not as vague as the previous one, it's might worth adding one, for instance how to upload the output of $uname -a, in case someone does $uname -a > /tmp/output ; pbpst -Sf /tmp/output
Keep up the good work!
from pbpst.
Related Issues (20)
- pbpst says "Paste deleted" even when you pass it a silly UUID
- doc/pbpst.rst line 220+225 indentation errors? HOT 1
- Passing --provider and URL without the '/' suffix gives an invalid link HOT 2
- Allow files bigger than 64MiB HOT 9
- i18n HOT 6
- Provide an option to add pastes to the DB HOT 1
- Teach -x time unit shortcuts HOT 11
- Errors on use of stderr HOT 5
- Use of non-Async-Signal-Safe functions in signal handler
- Does it support authentication HOT 5
- Failing to build on x64 Linux with clang 3.9.1 HOT 1
- Issue on Musl HOT 1
- Could not create paste: HTTP response code said error HOT 9
- Don't use tup HOT 1
- Conditionally use sys/syslimits.h for macOS HOT 1
- pbpst does not work with stdin HOT 6
- Behaviour when re-creating a paste with sunset after manually removing it HOT 2
- How can I build a static pbpst
- Request for new release HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pbpst.