Saturday, February 4, 2012

Mounting KDE pastebin

Ferris has extended its claws to allow the pastebin at http://paste.kde.org to be mounted. Since bash doesn't know libferris at all, without fuse you can use ferris-redirect to pipe information into any file that libferris can use as shown below (-T truncates like ">" in bash).

mkdir /tmp/test
cd /tmp/test
date > df1.txt
cat df1.txt | ferris-redirect -T pastebin://kde.org/new/foo
...
http://paste.kde.org/199754/

If you just have one file, then the "new" directory itself will act as a target too:

echo anyone, anyone... | ferris-redirect -T pastebin://kde.org/new
...
http://paste.kde.org/199760/

And because everybody knows that key protected pastebins are the new red, the following will need to have "goodkeyhere" on hand to read the data back...

echo this is secret, dudes | ferris-redirect -T pastebin://kde.org/private/goodkeyhere
...
http://paste.kde.org/199772/35847813/

The final directory is the "list" which contains virtual files allowing you to get a paste through the virtual filesystem. Of course, you could just fcat the http:// URL for the paste, but a nice tree is a nice tree.

fls pastebin://kde.org/list/
... 199700
fcat pastebin://kde.org/list/199700

3 comments:

maninalift said...

Oh, wow. I somehow I have admired the coolness of libferris for some time without realising it had a fuse adaptor (if that is the right word :)). shit XKCD 541. I thought it was a world of "awesome everything is a filesystem.. so long as you use these tools which play nice with libferris". But no, everything really can be a filesystem.

Right right right, I'm installing that right now.

maninalift said...

shabang

monkeyiq said...

Even better, there is already ferrisfuse :-p