gearnode / privatebin

A powerful CLI for creating and managing PrivateBin pastes with ease
ISC License
53 stars 4 forks source link

Config exmaple or generate config? #13

Open douglasg14b opened 5 hours ago

douglasg14b commented 5 hours ago

There is no config generated for the CLI, and I cannot find an example config in this repo.

I need to specify a URL for the default privatebin instance to use.

What is the recommended course of action here?

douglasg14b commented 5 hours ago

By default using a premade binary result sin:

Error: cannot load configuration: cannot open file: open /home/douglas/.config/privatebin/config.json: no such file or directory


However, adding an emoty cofnig file with an empty JSON objects results in:

Error: cannot find "" bin configuration: cannot find "" bin configuration

In this case, this issue is now a feature request to generate the config file if it does not exist since the CLI breaks if it's not generated for it.

douglasg14b commented 4 hours ago

I tried to reverse engineer it, but still get the same error 😒

Using the example in the docs:

cat example.txt | privatebin create

{
  "bin": [
    {
      "name": "example",
      "host": "[my private instance]",
      "expire": "1week",
      "open-discussion": false,
      "burn-after-reading": false,
      "gzip": false,
      "formatter": "plaintext"
    }
  ],
  "expire": "1week",
  "open-discussion": false,
  "burn-after-reading": false,
  "gzip": false,
  "formatter": "plaintext"
}
douglasg14b commented 4 hours ago

Looks like I needed an empty bin profile name for the default.