README.md 2.64 KB
Newer Older
1
### Install
2

kwadronaut's avatar
kwadronaut committed
3
As requirements you need `nodejs` and `npm`. 
4 5 6 7 8

    npm install -g apaste

In Debian GNU/Linux 8 (Jessie) the npm version is too old to work with. You will need to upgrade npm manually.

9
    # install requirements
Micah's avatar
Micah committed
10
    apt install nodejs nodejs-legacy npm
11 12
    npm install -g npm            # install npm 3.3.x
    hash -r                       # rescan $PATH
13
    # finally install apaste
14
    npm install -g apaste
15 16 17

### apaste, the share.riseup.net command-line client

guido's avatar
guido committed
18
This is a modification of [upclient](https://github.com/Upload/upclient), the [Up1](https://github.com/Upload/Up1) command-line client to make it work with [https://share.riseup.net](https://share.riseup.net). 
19 20 21 22

Please help and contribute directly to the [Up1 command-line client](https://github.com/Upload/upclient)

    Usage: apaste [options] [files]
23
    
Keith's avatar
Keith committed
24
    Upload files and text to an Up1 based pastebin. If no argument is specified, stdin is assumed.
25 26
    
    Options:
guido's avatar
guido committed
27 28 29 30 31 32
      -b, --binary            force application/octet-stream (for downloadable file)
      -t, --text              force text/plain (for pastebin)
      -f, --file <name>       force file name for stdin based inputs
      -m, --mime <mime>       force given mime type (default: detect)
      -T, --tor               route the upload through Tor.
      -h, --hidden-service    use hidden service address
33 34
          --version       display version information and exit
          --help          display this help and exit
guido's avatar
guido committed
35 36 37 38 39 40 41 42 43 44 45 46 47 48

### Configuration

You can customize some options in the at `~/.apasterc`. This is a list of possible options (with their default values)

```
server_address = https://share.riseup.net
hidden_service_address = http://6zc6sejeho3fwrd4.onion
api_key = 59Mnk5nY6eCn4bi9GvfOXhMH54E7Bh6EMJXtyJfs
tor = false
hidden_service = false
```

The `tor` and `hidden_service` variables means always route the upload through Tor and always use the hidden service address respectively. If `hidden_service = true` it tor will be always true too.
49

50
### Usage examples
51

Keith's avatar
Keith committed
52
Paste command output to Up1:
53

54
    ps aux | apaste
55

Keith's avatar
Keith committed
56
Copy an image file to Up1:
57

58
    apaste image.png
59

Keith's avatar
Keith committed
60
Take a screenshot (using a selection rectangle), send it to Up1, and put the result link on the clipboard:
61

62
    import png:- | apaste | xsel -b
63

Keith's avatar
Keith committed
64 65
Do the same as above, but also notify when complete:

66
    import png:- | apaste | tee >(xsel -b) >(xargs notify-send "Upload Complete")
Keith's avatar
Keith committed
67

guido's avatar
guido committed
68 69 70 71 72 73 74 75 76 77
Use the Tor network

    echo "Hi Tor" | apaste -T

Use the Hidden service address

    echo "Hi Tor" | apaste -h

(when you use the hidden service you will get the url with the hidden service address too)

Keith's avatar
Keith committed
78
### Up1
79

Keith's avatar
Keith committed
80
For more information on Up1, view the README at https://github.com/Upload/Up1