• Stars
    star
    308
  • Rank 135,712 (Top 3 %)
  • Language
    CoffeeScript
  • Created over 11 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Store files in your Flickr account

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

Alternatively, manually create a .filr file in your $HOME folder, containing a json object with the consumer_key and consumer_secret keys:

// these are fake keys, obviously
{
    "consumer_key": "f0d87f09a8sd7f8a08f7a",
    "consumer_secret": "8f7dsa807fa98"
}

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 as token and token_secret.

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.

Development

git clone gh:ricardobeat/filr.git
cd filr
npm install

Run cake watch (or npm run watch if you don't have coffeescript globally installed) to continuously build the coffee-script source.

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

More Repositories

1

cake-flour

Javascript build tools
CoffeeScript
66
star
2

node-polyglot

An internationalization library for node.js
CoffeeScript
58
star
3

require-tree

require multiple files and directories at once
JavaScript
51
star
4

git-commands

Custom power-user git commands.
Shell
46
star
5

levelhud

Graphical front-end for exploring data stored in LevelDB.
CoffeeScript
32
star
6

chirpweb

Reverse-engineering chirp.io's protocol using the WebAudio API
CoffeeScript
24
star
7

toml.js

Hand-written TOML parser for node and the browser.
CoffeeScript
20
star
8

TSV

A simple javascript TSV/CSV parser.
JavaScript
20
star
9

rockscript

Browsers. Guitars.
JavaScript
17
star
10

unik

Generate approximately sortable IDs in a distributed environment.
JavaScript
15
star
11

evy

Evy - fast, powerful events library based on EventEmitter3/nodejs
JavaScript
11
star
12

fuqit

fuqit in node
JavaScript
11
star
13

franz-workplace

Franz plugin for Workplace (FB@Work)
JavaScript
11
star
14

indexedup

LevelDB (levelup) compatible API for the browser, backed by IndexedDB
JavaScript
8
star
15

cake-async

Asynchronous Cakefile tasks
CoffeeScript
8
star
16

twitter-cli

A command-line interface for Twitter
JavaScript
5
star
17

lambda-face.js

Node.JS client for the Lambda Labs face-detection API
JavaScript
5
star
18

instagram-challenge

Instagram engineering challenge solved in CoffeeScript (http://instagram-engineering.tumblr.com/)
CoffeeScript
5
star
19

localstory

local/sessionStorage API wrapper with namespaces, TTL and JSON
JavaScript
5
star
20

konf

runtime configuration for node.js apps
JavaScript
4
star
21

letters

Letters game for kids (ages 0-4)
JavaScript
4
star
22

indexedlevel

Wrapper for node-leveldb and browser IndexedDB
4
star
23

what-should-i-listen-to

Artist recommendations from your Last.FM library
JavaScript
3
star
24

flatkeys

Flatten object keys
CoffeeScript
3
star
25

lepra

Perl REPL using rlwrap
Shell
3
star
26

color-cycling

CoffeeScript
2
star
27

ricardobeat.github.com

blog
CSS
2
star
28

telepong

Split-screen pong game, built during the Mozilla Firefox Apps Hackday (Porto Alegre, Sep. 2012)
JavaScript
2
star
29

nilson

Nilson SEO experiment
2
star
30

taks

Minimalistic ES7 async/await task runner
JavaScript
2
star
31

morph-components

JavaScript
1
star
32

rgbclock

1
star
33

cms

node.js cms. someday.
1
star
34

biscoito

Biscoito blog theme
1
star
35

backbone.provide

Bi-directional communication through event emitters
JavaScript
1
star
36

reload-browser

Reload browser tabs on OSX from the command line
Shell
1
star
37

rsjs

JavaScript
1
star
38

stars

Hover/touch effect using canvas, inspired by the lock screen in Android 4.1
1
star
39

DuktapeXS

XS bindings for Duktape JS engine
C
1
star
40

dojo-detective

http://dojopuzzles.com/problemas/exibe/descubra-o-assassino/ with a twist
JavaScript
1
star
41

numpack

Number array packer for node.js and the browser
CoffeeScript
1
star
42

app-template

Personal project template
CoffeeScript
1
star
43

docco-server

A documentation server.
CoffeeScript
1
star
44

kue-events

global job events for Kue
JavaScript
1
star
45

crystal-hoop-webview

Crystal
1
star
46

blog

New blog.
1
star
47

stream-bucket

Collect piped data from multiple streams.
CoffeeScript
1
star
48

advent-of-code-2023

Ruby
1
star
49

superbundler

JavaScript
1
star
50

page-replay

Replay page from local cache, honouring load behaviour from multiple domains
JavaScript
1
star
51

Update-Date-And-Save.tmMacro

Textmate macro to update timestamp on top of JS files (/* 20120116-1556 */)
1
star
52

sandman

A small adventure in your browser console.
CoffeeScript
1
star