Code Monkey home page Code Monkey logo

httpfs's Introduction

HttpFs

Experimental FUSE filesystem that lets you read HTTP/HTTPS/FTP files as if they were present on your own Linux box.

Requirement

Requires the following Python libraries, all installable via PyPi, etc:

  • requests
  • fusepy

Usage

Setup

Create a directory to be used as a mountpoint. The directory should be named “http:”, “https:” or “ftp:” and be placed on your home directory.

Starting

Run the filesystem: ./httpfs.py <mountpoint> <http|https|ftp>

(Example: /.httpfs.py /home/daniboy/http: http - this will “mount” the HTTP schema to /home/daniboy/http:

Using

To access a file just paste the URL as part of your command and append two dots at the end. For example, with the URL http://placekitten.com/g/400/300 we can:

  • cp ~/http://placekitten.com/g/400/300.. ~/kitty.jpg - this will copy the file to the home directory under the name kitty.jpg
  • xdg-open ~/http://placekitten.com/g/400/300.. - this will open the file with the user's preferred application
  • Using GIMP's “Open Image” dialog open http://placekitten.com/g/400/300.. in the home directory

Stopping

To stop the filesystem run fusermount -u <mountpoint>. DO NOT kill the Python process as this will NOT clear the mountpoint, allowing all sorts of extra dimensional critters to invade our universe through your device.

NOTICE

  • See instructions on how to stop the filesystem!
  • Linux ignores multiple /-slashes, so trying to access the file http:/example.com/, http://example.com/ and http:///////////example.com/ will all lead to the same file
  • The filesystem caches all files that were accessed with it in RAM for approximately 60 seconds
  • This FUSE filesystem is EXPERIMENTAL and far from being stable enough for any work, and comes under NO WARRANTY (and any other big scary all-caps things that can be said)

httpfs's People

Contributors

danielrozenberg avatar zesterer avatar

Watchers

James Cloos avatar  avatar  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.