PASTEMNGR(1)

NAME
pastemngr - A powerful pastebin manager for the command line.

SYNOPSIS
pastemngr [<command>] [OPTIONS]

DESCRIPTION
pastemngr manages pastes from pastebin.com and stores informations locally about users and pastes. This tool has the hability to create and retrieve pastes from the command line as well as fetching information regarding users and pastes (locally and online).

OPTIONS

--fetch-dev-key
    Request a pastebin login, fetch the account's developer key and, on success, save it locally, at the config folder. This application needs a developer key to access the pastebin API, otherwise it won't work.

This command is very error prone and it's probably not going to work, so you will need to get the key manually. To do so, just follow the steps below.

    Login to the pastebin.com website;

    Access the api page;

    Look for a section called "Your Unique Developer API Key";

    In this section, there will be a text block containing a code with 32 characters, that looks like this: b026324c6904b2a9cb4b88d6d61c81d1. Copy the code found there;

    Go to the configuration directory, create a blank file called dev_key and paste the code found at the pastebin site;

    Save the file.

COMMANDS
List of accepted commands

list_users [--raw]
    List registered users in the local database.

register [-u USER, --username USER]
    Register the given user in the local database. This will fetch the user key associated with the given user name, and store it locally.

remove [-u USER, --username USER]
    Remove the given user from the local database.

user_info [-u USER, --username USER] [--local] [--raw]
    Show informations about the given user.

new_paste [-i FILE, --input-file FILE] [-u USER, --username USER] [-t NAME, --title NAME] [-f FMT, --format FMT] [-v N, --visibility N] [-e TIME, --expire TIME]
    Create a new paste and upload it to pastebin.

fetch_paste [-k KEY, --paste-key KEY] [--local]
    Fetch the paste identified by the given key.

list_pastes [-u USER, --username USER] [--local] [--raw]
    List pastes belonging to the given user.

delete_paste [-u USER, --username USER] [-k KEY, --paste-key KEY] [--local]
    Remove the paste identified by the given key.

paste_info [-k KEY, --paste-key KEY]
    Show informations about the paste identified by the given key.

remove_expired [-u USER, --username USER]
    Remove expired pastes from the local database for every registered user or for the given user.

update_db [-u USER, --username USER]
    Update the local database for every registered user or for the given user.

  OPTIONS

-u, --username=USER
    Set the username for executing the operation on.

-i, --input-file=FILE
    Set the input file to be uploaded as a paste. Open a text editor if left blank.

-t, --title=NAME
    Set the paste title. Default is 'Untitled'.

-f, --format=FMT
    Set the paste format. Default is 'text'. Check the end of this manual for a complete list of accepted formats.

-v, --visibility=N
    Set the paste visibility between '0' (public), '1' (unlisted) and '2' (private). Default is 0.

-e, --expire=TIME
    Set the expire time for the paste. Default is 'N'. Check the end of this manual for a complete list of accepted expire times.

-k, --paste-key=KEY
    The key referring to a paste. e.g.: https://pastebin.com/UIFdu235s (the key is UIFdu235s).

--local
    Run the operation locally instead of online.

--raw
    Print the operation's result without fancy headers.

EXAMPLE

This section presents some examples of pastemngr usage.

pastemngr new_paste
    Post a new paste as guest

pastemngr new_paste --title 'A simple title' --expire 1M
    Post a new paste as guest, with title and expiration date of a month.

pastemngr new_paste --username user --input-file example.sh --format bash
    Post a new paste as user, using an existing file and having a format:

pastemngr fetch_paste --paste-key UIFdu235s
    Fetch a paste

pastemngr update_db
    Update the database

ENVIRONMENT
Enviroment variables used by the application.

EDITOR
    Contains the name of the default text editor used for creating a new paste.

    (Default: nano)

CONFIGURATION FOLDER
The configuration directory is located under $XDG_CONFIG_HOME/pastemngr/ by default, or $HOME/.config/pastemngr/ if the first is undefined.

EXPIRE
List of avaiable expirations times

N   Never.

10M 10 minutes.

1H  1 hour.

1D  1 day.

1W  1 week.

2W  2 weeks.

1M  1 month.

6M  6 months.

1Y  1 year.

FORMAT
List of available paste formats

4cs 4CS

6502acme
    6502 ACME Cross Assembler

6502kickass
    6502 Kick Assembler

6502tasm
    6502 TASM/64TASS

abap
    ABAP

actionscript
    ActionScript

actionscript3
    ActionScript 3

ada Ada

aimms
    AIMMS

algol68
    ALGOL 68

apache
    Apache Log

applescript
    AppleScript

apt_sources
    APT Sources

arduino
    Arduino

arm ARM

asm ASM (NASM)

asp ASP

asymptote
    Asymptote

autoconf
    autoconf

autohotkey
    Autohotkey

autoit
    AutoIt

avisynth
    Avisynth

awk Awk

bascomavr
    BASCOM AVR

bash
    Bash

basic4gl
    Basic4GL

dos Batch

bibtex
    BibTeX

blitzbasic
    Blitz Basic

b3d Blitz3D

bmx BlitzMax

bnf BNF

boo BOO

bf  BrainFuck

c   C

c_winapi
    C (WinAPI)

c_mac
    C for Macs

cil C Intermediate Language

csharp
    C#

cpp C++

cpp-winapi
    C++ (WinAPI)

cpp-qt
    C++ (with Qt extensions)

c_loadrunner
    C: Loadrunner

caddcl
    CAD DCL

cadlisp
    CAD Lisp

ceylon
    Ceylon

cfdg
    CFDG

chaiscript
    ChaiScript

chapel
    Chapel

clojure
    Clojure

klonec
    Clone C

klonecpp
    Clone C++

cmake
    CMake

cobol
    COBOL

coffeescript
    CoffeeScript

cfm ColdFusion

css CSS

cuesheet
    Cuesheet

d   D

dart
    Dart

dcl DCL

dcpu16
    DCPU-16

dcs DCS

delphi
    Delphi

oxygene
    Delphi Prism (Oxygene)

diff
    Diff

div DIV

dot DOT

e   E

ezt Easytrieve

ecmascript
    ECMAScript

eiffel
    Eiffel

email
    Email

epc EPC

erlang
    Erlang

euphoria
    Euphoria

fsharp
    F#

falcon
    Falcon

filemaker
    Filemaker

fo  FO Language

f1  Formula One

fortran
    Fortran

freebasic
    FreeBasic

freeswitch
    FreeSWITCH

gambas
    GAMBAS

gml Game Maker

gdb GDB

genero
    Genero

genie
    Genie

gettext
    GetText

go  Go

groovy
    Groovy

gwbasic
    GwBasic

haskell
    Haskell

haxe
    Haxe

hicest
    HicEst

hq9plus
    HQ9 Plus

html4strict
    HTML

html5
    HTML 5

icon
    Icon

idl IDL

ini INI file

inno
    Inno Script

intercal
    INTERCAL

io  IO

ispfpanel
    ISPF Panel Definition

j   J

java
    Java

java5
    Java 5

javascript
    JavaScript

jcl JCL

jquery
    jQuery

json
    JSON

julia
    Julia

kixtart
    KiXtart

kotlin
    Kotlin

latex
    Latex

ldif
    LDIF

lb  Liberty BASIC

lsl2
    Linden Scripting

lisp
    Lisp

llvm
    LLVM

locobasic
    Loco Basic

logtalk
    Logtalk

lolcode
    LOL Code

lotusformulas
    Lotus Formulas

lotusscript
    Lotus Script

lscript
    LScript

lua Lua

m68k
    M68000 Assembler

magiksf
    MagikSF

make
    Make

mapbasic
    MapBasic

markdown
    Markdown

matlab
    MatLab

mirc
    mIRC

mmix
    MIX Assembler

modula2
    Modula 2

modula3
    Modula 3

68000devpac
    Motorola 68000 HiSoft Dev

mpasm
    MPASM

mxml
    MXML

mysql
    MySQL

nagios
    Nagios

netrexx
    NetRexx

newlisp
    newLISP

nginx
    Nginx

nim Nim

text
    None

nsis
    NullSoft Installer

oberon2
    Oberon 2

objeck
    Objeck Programming Langua

objc
    Objective C

ocaml
    OCaml

ocaml-brief
    OCaml Brief

octave
    Octave

oorexx
    Open Object Rexx

pf  OpenBSD PACKET FILTER

glsl
    OpenGL Shading

oobas
    Openoffice BASIC

oracle11
    Oracle 11

oracle8
    Oracle 8

oz  Oz

parasail
    ParaSail

parigp
    PARI/GP

pascal
    Pascal

pawn
    Pawn

pcre
    PCRE

per Per

perl
    Perl

perl6
    Perl 6

php PHP

php-brief
    PHP Brief

pic16
    Pic 16

pike
    Pike

pixelbender
    Pixel Bender

pli PL/I

plsql
    PL/SQL

postgresql
    PostgreSQL

postscript
    PostScript

povray
    POV-Ray

powerbuilder
    PowerBuilder

powershell
    PowerShell

proftpd
    ProFTPd

progress
    Progress

prolog
    Prolog

properties
    Properties

providex
    ProvideX

puppet
    Puppet

purebasic
    PureBasic

pycon
    PyCon

python
    Python

pys60
    Python for S60

q   q/kdb+

qbasic
    QBasic

qml QML

rsplus
    R

racket
    Racket

rails
    Rails

rbs RBScript

rebol
    REBOL

reg REG

rexx
    Rexx

robots
    Robots

rpmspec
    RPM Spec

ruby
    Ruby

gnuplot
    Ruby Gnuplot

rust
    Rust

sas SAS

scala
    Scala

scheme
    Scheme

scilab
    Scilab

scl SCL

sdlbasic
    SdlBasic

smalltalk
    Smalltalk

smarty
    Smarty

spark
    SPARK

sparql
    SPARQL

sqf SQF

sql SQL

standardml
    StandardML

stonescript
    StoneScript

sclang
    SuperCollider

swift
    Swift

systemverilog
    SystemVerilog

tsql
    T-SQL

tcl TCL

teraterm
    Tera Term

thinbasic
    thinBasic

typoscript
    TypoScript

unicon
    Unicon

uscript
    UnrealScript

upc UPC

urbi
    Urbi

vala
    Vala

vbnet
    VB.NET

vbscript
    VBScript

vedit
    Vedit

verilog
    VeriLog

vhdl
    VHDL

vim VIM

visualprolog
    Visual Pro Log

vb  VisualBasic

visualfoxpro
    VisualFoxPro

whitespace
    WhiteSpace

whois
    WHOIS

winbatch
    Winbatch

xbasic
    XBasic

xml XML

xorg_conf
    Xorg Config

xpp XPP

yaml
    YAML

z80 Z80 Assembler

zxbasic
    ZXBasic