Skip to content

PaulNokel/filr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Filr

Filr turns Flickr into a storage engine. Very useful now that everyone gets 1TB for free :)

Install

npm install filr-cli -g

This will put the filr bin in your path.

Authorization

First, create an app at http://www.flickr.com/services/apps/create/ and take note of your consumer keys.

# Add your keys
filr --auth CONSUMER_KEY CONSUMER_SECRET

Complete the OAuth flow to obtain access tokens. Filr will attempt to open a browser for you, just enter the resulting PIN on the prompt that follows. Tokens are persisted to $HOME/.filr.

Uploading

filr my_file1.txt my_file2.txt

Each file will be uploaded as a separate image. Resulting images are set to private so they won't show on your public photostream.

Encoding / decoding

The encode/decode functionality is exposed as

filr --encode radiohead.mp3 radio.png

filr --decode radio.png radiohead.mp3

How it works / caveats

Files are encoded as hex strings and saved as a tEXt chunk inside the PNG, so the actual image could be anything. Flickr preserves the original data intact in the "Original" size.

Unfortunately this method is very wasteful, resulting in file sizes 2-4x the original. PNG does support "zEXt" chunks which are compressed using zlib, but the libraries being used here don't. Even better (and more cool) would be to save data in the image itself as seen here.

There is probably a restriction on chunk sizes that will cause this to break on larger files, I have only tested up to 15mb.

To-do

  • upload folders
  • add images to separate set
  • match file icons by filetype?
  • custom base image
  • bitmap mode (save data as grayscale bitmap)

License

http://ricardo.mit-license.org

About

Store files in your Flickr account

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published