HalosGhost / pbpst

A command-line libcurl C client for pb deployments
GNU General Public License v2.0
44 stars 9 forks source link

Provide an option to add pastes to the DB #73

Closed HalosGhost closed 7 years ago

HalosGhost commented 7 years ago

We have slowly added tools to minimize the need for the user to look at the paste db.

With the addition of this option, we could now solidly give the following advice: “generally avoid touching the paste db manually unless something has gone wrong”.

HalosGhost commented 7 years ago

The simplest way to implement this is to make an extra option under -D (I'm thinking --add | -a) which takes a json object in a similar format as what pb returns which the user would pass directly. Luckily, we would not need the user to provide everything, but we do depend on a few boiler-plate things that would need to be in the object. Namely, we need the uuid key, the long key, and the status key (we will just respect the provider set with -P or default).

So, the user could ostensibly invoke the command like so:

$ pbpst -Da '{ "uuid": "someuuidhere", "long": "thelongidhere", "status": "created" }'

"label" should be functional to provide instead of "long", but we likely cannot support "sunset" in any simple way.