Git Product home page Git Product logo

paperless-cli's Introduction

paperless-cli

license Build Status

badge Stargazers over time

Table of Contents

Description

A CLI tool written in Go to interface with a Paperless instance.

Installation and usage

Prerequisites

You should have a working Go environment and have $GOPATH/bin in your $PATH.

Precompiled binary

You can get a precompiled binary from the releases page (soon).

Self-compiled binary

To download source, compile, and install, run:

$ go get -u github.com/stgarf/paperless-cli
$ $GOPATH/src/github.com/stgarf/paperless-cli/build.sh

The source code will be located in $GOPATH/src/github.com/stgarf/paperless-cli.

A newly compiled binary will be in $GOPATH/src/github.com/stgarf/paperless-cli/bin/

You can place the binary in you $PATH for easy usage. e.g.

$ cp $GOPATH/src/github.com/stgarf/paperless-cli/bin/paperless-cli $GOPATH/bin

$ which paperless-cli should return the path to the newly installed binary.

Usage

Check paperless-cli version

$ paperless-cli version
paperless-cli v0.6.0 built on 2019-03-10T16:28:33Z from git:c8dd2e7-clean (master) by user@chrx

Setting up a config

You can set up a basic YAML-based configuration to be read by placing it in $HOME/.paperless-cli.yaml.

A base config can be autogenerated with paperless-cli config create.

Here's an example configuration:

# A basic paperless-cli configuration file.

# The hostname of the Paperless instance.
hostname: localhost
# Connect via HTTP or HTTPS.
use_https: false
# Port the Paperless instance is listening on.
port: 8000
# Path to the API root.
root: /api
# Username to auth to Paperless instance.
username: myUsername
# Username to auth to Paperless instance.
password: mYpa$$w0rd.is.h0p3fully.s3cur3!!1

Development

Prerequisites

You should have a working Go environment and have $GOPATH/bin in your $PATH.

Get the code

To download the source code, run:

$ go get -du github.com/stgarf/paperless-cli

The source code will be located in $GOPATH/src/github.com/stgarf/paperless-cli.

Running the tests

$ go test

Really though, there are none and need to be written.

Built With

  • cobra - A Commander for modern Go CLI interactions
  • logrus - Structured, pluggable logging for Go
  • gjson - Get JSON values quickly - JSON Parser for Go
  • viper - Go configuration with fangs
  • go-fqdn - Simple wrapper around net and os golang standard libraries providing Fully Qualified Domain Name of the machine
  • go-homedir - Go library for detecting and expanding the user's home directory without cgo
  • govvv - "go build" wrapper to add version info to Golang applications

Contributing

Please read CONTRIBUTING.md for details on the code of conduct, and the process for submitting pull requests to the project.

Versioning

We use SemVer for versioning, roughly. For the versions available, see the tags on this repository.

Authors

  • Steve Garf - Initial CLI work - stgarf
  • Zibby Mofrad - Document Download option - zibby

See also the list of contributors who participated in this project.

License

This project is licensed under the Apache License - see the LICENSE file for details.

Acknowledgments

  • Daniel Quinn for starting Paperless and the awesome community of people maintaining Paperless
  • Seth Junot for rubber duck debugging - xSetech
  • Hat tip to anyone whose code was imported!

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.