Git Product home page Git Product logo

dev-host-cl's Introduction

dev-host-cl

dev-host-cl is a python script that allows you to upload and manage files to http://d-h.st (Dev-Host) from a shell. It can be used anonymously or with your account's credentials.

Download

You can download and place the script in ~/bin to use it directly. For example:

     $ git clone git://github.com/GermainZ/dev-host-cl.git dev-host-cl
     $ cp dev-host-cl/devhost.py ~/bin/devhost
     $ chmod +x ~/bin/devhost

Usage

  • Syntax: devhost [-h] [-u USERNAME] [-p PASSWORD] ACTION ...
  • If only a username is specified, the password will be prompted for without having it display on screen.
  • Actions:
    • upload - Upload file (anonymously if no credentials are specified)
    • For the actions below, you must be the owner of the file and use your credentials to login, unless otherwise noted:
      • file-get-info - Get file info (public files need no authentication)
      • file-set-info - Set file info
      • file-delete - Delete file
      • file-move - Move file
      • folder-get-info - Return folder info (public folders need no authentication)
      • folder-set-info - Set folder info
      • folder-delete - Delete folder
      • folder-move - Move folder
      • folder-create - Create new folder
      • folder-content - Return folder content (public folders need no authentication)
    • For more help about an action: devhost ACTION -h
  • Example (to upload a file Anonymously): devhost upload file.txt

Dependencies

Installing python-requests

If you have root, Use pip, easy_install or your package manager to install requests

pip install requests
easy_install requests
apt-get install python-requests
pacman -S python-requests

If you do not have root, then install requests locally

curl -L https://github.com/kennethreitz/requests/tarball/master | tar xz
cd kennethreitz-requests*
python setup.py install --user
cd ..
rm -rf master kennethreitz-requests*

Notes

  • It's not possible to have streaming uploads with the requests module and d-h. This means the whole file is loaded into your memory before being uploaded. I might look into other modules if I have the time, but it's not a priority at the moment.

dev-host-cl's People

Contributors

germainz avatar antdking avatar

Watchers

 avatar

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.