
IPFS-Screenshot – Like Cloudapp but with IPFS - uptownhr
https://github.com/uptownhr/ipfs-screenshot
======
namuol
Does this actually do anything? Here's the full source:

    
    
        #! /bin/bash
        echo "testing" >> ~/.ipfs-screen/ipfs-add.log
        file=ipfs-screen.jpg
    
        gnome-screenshot -a -f ~/.ipfs-screen/$file
    
        hash_log=$(ipfs add ~/.ipfs-screen/$file)
    
        echo $hash_log >> ~/.ipfs-screen/ipfs-add.log
    
    
        hash=$(echo $hash_log | awk '{ print $2; }')
    
        echo "https://ipfs.io/ipfs/$hash" | xclip -selection clipboard
    

Edit: Nevermind, didn't see the `ipfs add ...` call... I guess this just goes
to show how simple it is to use IPFS. ;)

Edit2: I can't seem to resolve any of my files on `ipfs.io` -- probably some
problem with my network config that's preventing peers from mirroring my file?

~~~
lkjhgfdsa57
Have you left the ipfs daemon running? Do any errors show in it? Does this
show any connections:

    
    
        ipfs swarm peers

~~~
namuol
I wasn't aware that `ipfs daemon` was required for it to work. Ran that; it
works now. :)

------
no_protocol
Looks like a Show HN. Can you update the title?

Sharing screenshots quickly sounds like a useful app. I'm interested
immediately.

I've never used IPFS so when I see the installation steps list things like
"install IPFS" and "start IPFS daemon," I'm scared to actually take those
actions. I just wonder what this is going to do to my system. Is it going to
be running a web-accessible service?

 _vague idea of what IPFS is leads to more questions_

Can I remove content after publishing?

Do I have to have the daemon running forever?

Is it like pastebin for images? Am I anonymous or not?

etc.

Because of those types of questions, I haven't actually tried it out yet, but
this seems like a good opportunity to package up a 'program' that people can
just 'run' on their computers. If you're relying on an existing network that
any party can enter, the program just works and you don't have any
infrastructure. Am I on the right track here?

I'm not really looking for answers to any of those questions, just pointing
out what thoughts I have after reviewing your project. If I wanted to know the
answers, I would go spend a while learning about IPFS.

If the author is still here, I am wondering what benefits/drawbacks using IPFS
has compared to, say, a shell script that uploads images to your own server
and places the link in your clipboard.

~~~
kefka
> Can I remove content after publishing?

No. Once a file has been hashed, that hash always equals that file. No.
Matter. What.

Now, if no one else in the world has that file that equals that hash, then the
content is dead.

But you can never remove things. It wouldn't make sense to do so.

>Do I have to have the daemon running forever?

You can run it as long as you want. But if you're the only hoster of certain
images, then you quitting will mean those files can't resolve. But if your
stuff is popular, other IPFS daemons will also provide bandwidth and capacity.

> Is it like pastebin for images? Am I anonymous or not?

It's like Pastebin, kind of. Your node is _NOT_ anonymous, but the content
itself can be. The content=hash , no matter who shared it.

~~~
fudged71
>you can never remove things. It wouldn't make sense to do so.

This seems like one of the few instances where that might not be true. Does a
quick screenshot deserve to take up space on IPFS forever?

It seems like an optional expiry timestamp could be useful.

~~~
kefka
In the truest sense of the word, if data for a given hash is on any computer,
that computer can provide the data behind the hash.

If that data was found 1000 years from now, and entered into the system, the
data would generate the same hash, and then be able to fulfill any hash
requests.

Also, IPFS does data deduplication across blocks (chunks of 512KB - I
believe), files, and directories. So if I share a source repo that uses
someone else's repo, and they share it too, then my copy helps speed his files
up as well.

There's an ongoing project to get OpenStreet Maps in IPFS, so that local areas
have their own hash, all the way up to state, country, continent, and world.
It's so the whol geographic repo could be shared amongst all, without the
burden of storage on a single person or group.

~~~
toomuchtodo
Can you point me towards info about OSM serving via IPFS? Very interested in
helping with that if at all possible.

~~~
kefka
Sure thing.

[https://github.com/ipfs/archives/issues/11](https://github.com/ipfs/archives/issues/11)

is the root isue on GH that made this project

[https://github.com/davidar/ipfs-maps](https://github.com/davidar/ipfs-maps)

And here it is in prod:
[https://maps.ipfs.io/?/ipfs/QmQ2YKnWpfjYQdoDN4KZjxL18K33nz2p...](https://maps.ipfs.io/?/ipfs/QmQ2YKnWpfjYQdoDN4KZjxL18K33nz2p8eTHjm5GsY2fnr#1/0/0)

------
mercora
ive bound this oneliner to do the same for Xorg:

echo "[https://gateway.ipfs.io/ipfs/`xwd](https://gateway.ipfs.io/ipfs/`xwd)
-root|convert - png:-|ipfs add -q`"|xclip -selection clipboard

------
jerguismi
I don't really grasp the point. Isn't ipfs.io still pretty much centralized
service? So you have the image stored in ipfs, but what is the added value
instead of using something like imgur?

~~~
x0137294744532
ipfs.io is simply a public gateway to the ipfs network. If you have the ipfs
daemon running, you can fetch the image through the ipfs network like this:

    
    
        $ ipfs get QmTf3EquRYzxa4njTRpimp6YEcJJPSUf5pQE9TE54qCa3M
    

It will download the image per P2P.

~~~
toomuchtodo
Is there a way to associate metadata for an object in IPFS? Or must that be
out of band?

------
uptownhr
hi guys. just noticed it i got on frontpage! I wanted to demo how easy it was
to use IPFS and was a bit suprised no one made a cloudapp clone with this
tech. As you can see in the code, took like 30 min to put it together. I'm not
that familiar with IPFS either so thanks for answering all the questions guys.

FYI: thanks for the guys that put in a pull-request, i've already merged them
in.

~~~
mschoening
Creator of CloudApp here (no longer involved). This is really neat, thanks for
sharing! You could potentially monitor ~/Desktop on OS X and identify
screenshots with:

    
    
      mdls 'Screen Shot 2016-10-24 at 4.14.54 PM.png' | grep IsScreenCapture
    

That would match the original behavior even closer.

 _Edited for brevity_

~~~
nathancahill
Props. Didn't know you were no longer involved. Sale? Is this why it got super
expensive?

------
webscaleizfun
Neat, could be very handy for sharing screenshots with others!

------
jaequery
for osx, anyone know how to bind a keyboard shortcut commands to run this
script?

~~~
tinix
make a service with automator that runs whatever command you want and define a
global shortcut under prefs/keyboard/shortcuts.

