Coder Social home page Coder Social logo

cloudup-cli's Introduction

Cloudup CLI

The cloudup cli up(1) allows you to upload files to the cloud with ease.

Cloudup cli Cloudup interactive mode

Installation

Install with npm:

$ npm install -g Automattic/cloudup-cli

Authenticate:

$ up config

  Cloudup up(1) one-time configuration requires your
  password, however it is transfered via https
  and is not stored locally. Subsequent operations
  use the auth token generated from this process.

  Username: tobi
  Password: ******

Usage


  Usage: up [options] [file ...]

  Commands:

    open                   open matching stream
    copy                   copy matching stream's url
    streams                list streams
    config                 configure up(1)
    help [cmd]             display help for [cmd]

  Options:

    -h, --help            output usage information
    -V, --version         output the version number
    -t, --title <name>    stream title name
    -s, --stream <id>     upload to the given stream
    -d, --direct          output direct links
    -f, --filename <str>  assign filename to stdin
    -T, --thumb-size <n>  thumbnail size in pixels [600]
 

Examples

Examples illustrating how to use the cloudup command-line tool to upload files and access your account.

Uploading

Upload a single file, the stream url is copied to your clipboard immediately for sharing, even before the upload has completed.

$ up reflection.png

 reflection.png : 92%
         stream : https://cloudup.com/cHFtYYeB8fJ

Multiple Files

Upload several files at once by passing multiple filenames:

$ up simon-*.png

              simon-1.png : https://cloudup.com/iqd4NLa13ZV
              simon-2.png : https://cloudup.com/iCxBKJZAm36
              simon-3.png : https://cloudup.com/iEzTZXvVRYP
              simon-4.png : https://cloudup.com/iRYA6bLp70E
              simon-5.png : https://cloudup.com/ilMqsXxtTsV
              simon-6.png : https://cloudup.com/ilVngVMMeSd
              simon-7.png : https://cloudup.com/i1Tx8vkIbCC
              simon-8.png : https://cloudup.com/ifUKcaz5I3A
    simon-ball-ocean.png… : https://cloudup.com/iCA5N2PCJJS
    simon-ocean-stick-2.… : 71%
    simon-ocean-stick.pn… : 55%
          simon-ocean.png : 74%
                   stream : https://cloudup.com/c7WwhIwSl6Y

Thumbnails

up(1) delivers thumbnails when possible before the files are uploaded, so viewers can see what they're getting before-hand, and progress is updated in real-time.

cloudup cli simon photos

STDIN

When no filenames are given up(1) reads from stdin:

$ echo 'hello world' | up

A filename can be passed to help cloudup interpret the content:

$ echo 'hello __world__' | up --filename hello.md

Upload Options

You may optionally provide a stream --title upon upload, otherwise Cloudup will generate one for you based on the content:

$ up ferrets/*.png --title Ferrets

You may also upload to an existing stream by passing --stream:

$ up simon.png --stream c7WwhIwSl6Y

If you prefer direct links you may use --direct:

$ up example.jpeg --direct

  example.jpeg : http://i.cloudup.com/uBuZVUk80lK/SXSc1V.jpeg
        stream : https://cloudup.com/c1rAycLAdHo

Streams

List your cloudup streams:

$ up streams 

                    Art (19) https://cloudup.com/cQD5fdgPrU1
                      C (2) https://cloudup.com/c4f5h12Ti1T
                   Cats (3) https://cloudup.com/cVeLe7dWdEH
        Cloudup - light (5) https://cloudup.com/ce4R6fdsQo
                Cluster (3) https://cloudup.com/cQJg8sdf7qO
                 Design (35) https://cloudup.com/c7nHCsd30hhF
  Dolphins intelligence (8) https://cloudup.com/c5Hy71w2fWe
                   EXIF (6) https://cloudup.com/coRcOdfXXiom
              Es6 yield (2) https://cloudup.com/cJWXLX1af2t

Search for streams:

$ up streams australia

   Australia 2013 (63) https://cloudup.com/c_nzIQcjCWo

Copy the first matching stream to the clipboard:

$ up copy australia

Open the first matching stream in your default browser:

$ up open australia

Interactive Mode

The -i or --interactive flag may be used to list streams in an interactive list using the arrow keys to traverse the list. Pressing return will open the stream or item in your default browser.

The up / down arrows for navigating the list, and left / right to view the items or go back to the stream list.

interactive mode

Tips

Stream and item links that output to stdout may be opened in the browser by holding down command and double-clicking the url.

License

(The MIT License)

Copyright (c) 2014 Automattic, Inc and contributors <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

cloudup-cli's People

Contributors

dustinhartzler avatar mmalecki avatar tj avatar tootallnate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloudup-cli's Issues

Homebrew complains about `up-config`

I have node/npm installed via homebrew on a Mac as well as up(1).

When I run brew doctor to ensure that things are silky smooth, it complains:

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:

    /usr/local/share/npm/bin/up-config

Be nice to use a different filename if possible.

500 error when posting

When I'm using up FILE LOCATION I am seeing a 500 bad gateway error:

up /home/Desktop/Screenshot_14-04-2016-15:53:43.png
    Screenshot_14-04-201… : 0%
  Error: 502: <html>
  <head><title>502 Bad Gateway</title></head>
  <body bgcolor="white">
  <center><h1>502 Bad Gateway</h1></center>
  <hr><center>nginx/1.5.13</center>
  </body>
  </html>
   (POST /1/streams)
      at module.exports (/usr/local/lib/node_modules/up/node_modules/cloudup-client/lib/error.js:13:10)
      at /usr/local/lib/node_modules/up/node_modules/cloudup-client/lib/stream.js:335:32
      at Request.callback (/usr/local/lib/node_modules/up/node_modules/superagent/lib/node/index.js:628:30)
      at Request.<anonymous> (/usr/local/lib/node_modules/up/node_modules/superagent/lib/node/index.js:131:10)
      at emitOne (events.js:90:13)
      at Request.emit (events.js:182:7)
      at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/up/node_modules/superagent/lib/node/index.js:773:12)
      at emitNone (events.js:85:20)
      at IncomingMessage.emit (events.js:179:7)
      at endReadableNT (_stream_readable.js:906:12)

"Calling an asynchronous function without callback is deprecated"

Installed latest via npm install -g up on macOS 10.12.5 with node v8.1.2. Running up does work, but displays errors:

[q@x/0 ~] up Screen\ Shot*.png
    Screen Shot 2017-07-… : 0%
    Screen Shot 2017-07-… : 0%
    Screen Shot 2017-07-… : 0%
                   stream : https://cloudup.com/clNeGiVyxFe
(node:93782) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:93782) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
    Screen Shot 2017-07-… : https://cloudup.com/iU3vFBfJ85Ohronous function without callback is deprecated.
    Screen Shot 2017-07-… : https://cloudup.com/iv7ek8HCud3hronous function without callback is deprecated.
    Screen Shot 2017-07-… : https://cloudup.com/iC6aOpZ98phhronous function without callback is deprecated.
(node:93782) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.

support dirs

? maybe... could be bad haha, unless we have the recursion limit, we should at least ignore dirs so we dont get EISDIR if you do $ up *

Slow response after upload

I tried to upload a file and it has been successfully uploaded and also it returned me the links for the file and the stream url. But, it takes so much time to return exit.

Rename ‘up’ to ‘cloudup’ and update install instructions

The npm package name up has been assumed by apex/up, thus cloudup-cli can no longer be installed with npm install -g up. I recommend cloudup-cli be renamed to cloudup so it can be installed with npm install -g cloudup and can be installed in parallel with the new up.

In the meantime, cloudup-cli can be installed by referencing the github repo directly, like this:

npm install -g Automattic/cloudup-cli

Status?

Is this abandonware? It looks like deprecation warnings are printed on the command-line when I use it now.

Error: Cannot switch to old mode now.

I get Error: Cannot switch to old mode now. when I try running up.

I tried both installing from npm via npm -g install up and from github. Same result.

OSX 10.8.5, node 0.10.20, all npm packages just upgraded.

Fix sporadic error

Happens occasionally...

  Error: Offset is out of bounds
      at Object.fs.readSync (fs.js:476:19)
      at sync (/Users/nrajlich/cloudup-cli/node_modules/head/index.js:38:14)
      at module.exports (/Users/nrajlich/cloudup-cli/node_modules/head/index.js:19:10)
      at textual (/Users/nrajlich/cloudup-cli/bin/up:153:13)
      at Socket.files.forEach.ind (/Users/nrajlich/cloudup-cli/bin/up:105:11)
      at Socket.EventEmitter.emit (events.js:117:20)
      at _stream_readable.js:920:16
      at process._tickCallback (node.js:415:13)

update to use api

also giving us a good idea if the level of api I've implemented is sufficient

auto-detect stdin

so they don't become blobs, things like:

  • text
  • diffs
  • code snippets

Error: EISDIR

From user:

Hi!

Adviced by rauchg I'm sending a bug I just found with the recently released up tool.

I found that when running up * as it's shown on the blog post gif... and there is a sub-directory at the running path, then the process crashes with the following error:

Error: EISDIR, read

And no file us uploaded.

I was guessing that when a sub directory is present, up would zip it into a .tar or .zip file and upload it.

Or at least say that directories cannot be upload but continue uploading the rest of the files.

I'm running [email protected] with [email protected] at a Mac OS X 10.6.8 via native terminal Darwin.

I wouldn't mind to provide with any extra information you require to debug this.

Salút!

Error 400

Whenever I try to sign in I get this error:

~ up config

  Cloudup up(1) one-time configuration requires your
  password, however it is transfered via https
  and is not stored locally. Subsequent operations
  use the auth token generated from this process.

  Username: mtello17
  Password: ********

/usr/lib/node_modules/cloudup/bin/up-config:38
      if (err) throw err;
                     ^
Error: 400: {"error":"invalid_grant","error_description":"invalid user credentials"} (POST /oauth/access_token)
    at module.exports (/usr/lib/node_modules/cloudup/node_modules/cloudup-client/lib/error.js:13:10)
    at /usr/lib/node_modules/cloudup/node_modules/cloudup-client/lib/client.js:72:30
    at Request.callback (/usr/lib/node_modules/cloudup/node_modules/cloudup-client/node_modules/superagent/lib/node/index.js:628:30)
    at Request.<anonymous> (/usr/lib/node_modules/cloudup/node_modules/cloudup-client/node_modules/superagent/lib/node/index.js:131:10)
    at Request.EventEmitter.emit (events.js:95:17)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/cloudup/node_modules/cloudup-client/node_modules/superagent/lib/node/index.js:773:12)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:919:16
    at process._tickCallback (node.js:419:13)

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.