Skip to content

Instantly share code, notes, and snippets.

@ilar
Created November 2, 2013 22:17
Show Gist options
  • Save ilar/7284104 to your computer and use it in GitHub Desktop.
Save ilar/7284104 to your computer and use it in GitHub Desktop.
redditvfs
========
Description
-----------
**reddivfs* is a FUSE-based filesystem that allows the user to read, post, and explore the content aggregation site reddit by manipulating files and directories. The goal is to provide feature-complete access to the website via your file browser of choice.
Setup
-----
redditvfs runs off Python 2.3. Once Python 2.3 has been installed and all paths are set, redditvfs can then be run without any setup. However, if the user wishes to log in, authentication must be set up. This is done by by running redditvfs with the -s flag, which will create a config file that can be used with the -c flag.
If a config file is used, but is empty or non-complete, then redditvfs will prompt the user to input any missing information from the config.
Usage
-----
Default usage is
`./redditvfs.py [options] <mount-point>`
Once redditvfs is running, one can navigate from the mount point like a regular file system.
File System
-----------
The top-level mount point holds several directories and any config files, like so.
user1.config
r/
u/
m/
`r/` holds different subreddits. Subreddits can be subscribed or unsubscribed by `rm -r` the subreddit directory to unsubscribe, and 'mkdir <subreddit name>` to subscribe.
Inside each subreddit directory, each post is another directory which contains a file with the post contents and all comments.
`u/` holds user information. `ls <username>` returns the files
overview/
comments/
submitted/
gilded/
Each directory holds the relevant comments or submissions as a symlink to the relevant post or comment in r/
`m/` holds the messages of the user in two directories, should one be logged in. One directory, `sent/` holds all sent messages from the user. The other, `inbox/` holds all messages received. To compose a message, a new text file is created in the directory `m/`, with the username of the recipient as the name of the file, and the contents of the file being the contents of the message.
Options
-------
`-c -config` Designates a config files that may be empty, noncomplete, or filled out. An example config file can be generated using `-s` and leaving all inputs blank.
`-f -foreground` Forces redditvfs to run in the foreground instead of in daemon mode. Useful for debugging.
`-s -setup` Starts the config creator.
Miscellaneous
-------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment