Giter Site home page Giter Site logo

UUID about pbpst HOT 10 CLOSED

p1839251 avatar p1839251 commented on September 15, 2024
UUID

from pbpst.

Comments (10)

HalosGhost avatar HalosGhost commented on September 15, 2024

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.

p1839251 avatar p1839251 commented on September 15, 2024

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.

HalosGhost avatar HalosGhost commented on September 15, 2024

-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.

HalosGhost avatar HalosGhost commented on September 15, 2024

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.

p1839251 avatar p1839251 commented on September 15, 2024

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.

HalosGhost avatar HalosGhost commented on September 15, 2024

@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.

p1839251 avatar p1839251 commented on September 15, 2024

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.

HalosGhost avatar HalosGhost commented on September 15, 2024

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.

HalosGhost avatar HalosGhost commented on September 15, 2024

@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.

p1839251 avatar p1839251 commented on September 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.