Hacker News new | past | comments | ask | show | jobs | submit login
Dropbox is my publish button (joehewitt.com)
90 points by siglesias on Oct 3, 2011 | hide | past | favorite | 66 comments



Perhaps I didn't stress enough in the blog that this system was designed with non-technical users in mind. My girlfriend uses it on her blog and she is savvy enough to understand Markdown, but if I asked her to run a command-line script every time she wanted to publish something it would be a non-starter.


Your girlfriend can't use a command line but prefers handcranking Markdown to using WordPress WYSIWYG? That's unusual.


This could actually be a pretty neat feature to install on a server for clients so that they can change/add text content on the server without having to contact a dev (and without having command line access).

Once set up, it could be as simple as sharing folders with them.


I've set that kind of stuff up before by just having a .bat file with an icon on the desktop to run whatever script is needed. No need to actually type into a command line.


Out of curiosity, are you using this for Up On a Hill now?


yep.


An odd thing about all these technologies is that they are severely dumbed down versions of unix software that exists for decades. How is it "cooler" to write markdown instead of troff? "Dropbox" instead of <strike>nfs</strike> rsync? Text files instead of a database? Node.js instead of "insert generic server here"?

Maybe people consider that 'hip', but I don't see how any of these 'trends' have any viability for more than, say, 12 months[1]?

[1]: http://fashion.about.com/od/latesttrends/a/trendover.htm


I agree with where you're coming from, and I'd certainly rather use, say, rsync to move content to a server than Dropbox (which, given their security track-record, is just asking for trouble), but troff doesn't really solve the "perfectly readable formatted plain text even before processing" niche that Markdown does.

Markdown has also been around since 2004, so it's outlived the 12 month "just a trend" horizon by quite a bit.


But isn't it by definition impossible to expect that plaintext can replace a markup? (I just wanted to use a strikethrough; can markdown do that?). That's just a niche for developers. Also i believe markdown just started its hype cycle: http://www.google.com/trends?q=markdown


Markdown isn't a general purpose markup syntax. It's a niche solution to the smaller problem of "I want to format a plain text file or plain text email in a way that is perfectly readable as plain text, but also can be converted into a web page that retains the same basic formatting".


Markdown is much more human readable than troff. It's great for things like READMEs which may be viewed unprocessed, or converted to HTML.


You had me with troff, but then lost me with Dropbox vs NFS. rsync or unison would have been more appropriate.


I was thinking "rsync -auvz ftw", but the crontab addition would make the sentence too long


No offense to Joe, cause I LIKE the effort, I suppose, but it seems like a really long way around to get to where you were headed.

As has been listed, rsync / git / NFS shares etc would have been a really easy way to get your objectives met UNTIL I read your response that this was for your girlfriend, and asking her to do a command line would be hard. Then I read further and saw this:

A password-protected drafts page allows me to preview drafts before publishing. Once they are done, I add the timestamp, save the file, and it's published."

That part seems more complicated to me than just hitting 'publish' on a Wordpress page, but so as to keep from sounding overly negative (cause really, kudos for doing what works) here are my tips to make it even easier.

1) Set up cron to restart the dropbox service every few hours. That should be a no-brainer, and would at least save you having to explain how every now and again you have to SSH into your server to fix your 'super easy' solution.

2) From an end-user perspective, I'm thinking rip off the old email-consumption strategy. Write the code to just check a POP server every couple of hours for unread messages. If there's a message, check to see if it's from your girlfriend's email address (optional). If it's from her, then publish it.

Markdown syntax would still apply, and you've now relegated blog posting to something as easy as just 'sending an email'.


Email won't do, you want to e.g fix typos after publishing. I also think that there's something powerful in "all posts in one file" strategy. You might revise drafts more often, read older posts again to expand on them etc. I'm going to try that


So on the server, write the emails to a single file in Dropbox. Like .mbox with markdown level 1 instead of headers. Default input by email, revisions or alternate new via dropbox.


Simple: the system/blog replies with a confirmation of reception that includes the post text. Just hit reply, edit it and send.


FFS, it's like you whippersnappers have never heard of rsync or makefiles. Dropbox requires the mouse, and therefore means that you should get off my lawn.

Seriously though, a Makefile in your web directory with a default target that rsyncs your content up to your webserver via ssh solves this problem much more elegantly, without relying on a third party service. Bonus points for you if you render/minify your sass/scss and/or coffeescript as a target dependency.

PS: Put your remote username and remote port (if custom) for a given host in your ~/.ssh/config file, along with any necessary 'ProxyCommand's to allow direct "rsync ./ $hostname:public_html/" or such in your makefile.


Besides being better suited to non-technical users (as joehewitt points out on this very thread), it also has an advantage of running in the background, i.e. you don't have to remember to run anything.

Also, there's this webapp called http://droppages.com/ which makes publishing from DropBox even easier.

Though personally, if I had to help a non-technical friend with setting up a blog, I'd just send him to Wordpress.com.


GNOME can actually mount remote folders on startup / on demand using SSH/SCP/FTP/whatever. I had a relatively non-technical friend go for this approach and it worked really well.

It's actually a really kickass feature


Using dropbox is problematic for security reasons, but Joe's solution offers a benefit (over rsync, etc.) he doesn't mention in his post, which is that it places his blog source in the cloud as well, and makes it amenable to editing from virtually any desktop/laptop/android/iphone/ipad out there.

I suspect it's easier to go to a new client and set up dropbox on it and link it in, than it is to set up rsync and any necessary keys or firewall holes or if you are using windows, the cygwin system to support rsync.

There's a lot to be said about simplicity and ubiquity, especially if it's to encourage making a blog post, and not discourage it.

That said, using dropbox for this is terribly problematic in terms of security.


What security problems do you foresee? As I outlined in my post, I created a dedicated Dropbox account for the blog and it only synchronizes files meant for the blog. If those became public it wouldn't be a problem.


I'm referring to the known (and still not fixed?) issues with dropbox, including logging out having no real effect on disabling access to the dropbox files. Or someone being able to steal the dropbox keys from one computer and reuse them on a different computer.

In addition, as I'm sure you recognize, this reduces breaking into your hardened box and filling it with unicorn pr0n to swiping your friend's laptop while she is in the loo at the Starbucks.

So someone can steal the key to your server with a few minutes access to your home computers or laptops and you will not know until you have unicorn pron all over your blog.

This may be fine, and I mean that, for a personal blog (that also has regular backups.) I wouldn't set this up for clients (as suggested by others) to make it easier for them to blog, I think I would find a different solution for them.

Don't get me wrong. For my own personal needs, I think your solution is better than say, posterous which seems to be going downhill fast.

I like the idea of easily, quickly, blogging within emacs.


hey jerrya, this is fixed in the beta version available here: http://forums.dropbox.com/topic.php?id=44811. it's awesome.


When I install Dropbox on a new machine, I can use selective sync to decide which folders are kept in sync on that machine. You can configure selective sync in CLI mode using 'dropbox exclude <path>'. (Unfortunately, I don't think there's a whitelist option.)

Is there a reason this wouldn't work for your use case?


I don't want my personal account on the server in case it was compromised. Besides, even if you use that "dropbox exclude" command, the client will start downloading all of your files when you first link it and there's no way to tell it not to do that before you have the chance to do all of your excludes.


How about run dropbox, put your network interface down whilst you set your excludes, cycle dropbox, bring network up.


I agree with every aspect of your comment except one: Dropbox does not require the mouse.

I've been very happily running it on my headless web server for over a year. There's a CLI installer, and you can do things using the 'dropbox' command-line utility.


> Bonus points for you if you render/minify your sass/scss and/or coffeescript as a target dependency.

And compile markdown files to static HTML to be served directly on the target machine.


Easy to minify with Google Closure in a Makefile, all you need is curl:

  build/project_min.js: build/project.js
    rm -f $@
    curl -s --data-urlencode 'js_code@build/project.js' --data-urlencode 'output_format=text' --data-urlencode 'output_info=compiled_code' http://closure-compiler.appspot.com/compile >> $@
h/t @enaeseth, edited for formatting


Yeah, Dropbox does not require mice. One of my Dropbox-hosted sites† gets updated automatically a few times daily, using a cron job.

http://cmtorrent.inportb.com/


Isn't make overkill? You just need a shell script with an rsync one liner


I wrote that exact script earlier, except I used Rake.


Why are there no pirates in asia?

They're all already too busy frying the pranes.


I like the sound of that. Care to share a makefile?


I get a blank page when I click that link, so maybe a better publish button is in order.


I get a blank page when I use opera, a blog post when I use chrome, firefox, safari, and ie. Is a better browser in order!?


The server was down initially until I upgraded my EC2 instance from micro to small. Now it's running, but yeah, I didn't test in Opera so I'm not surprised.


Opera is better than Chrome on one and only one point: Opera will load multiple pages in multiple tabs swiftly, while Chrome gets bogged down in some known and unfixed race condition.

I find that reading news aggregator content like Google Reader or Hacker News is much easier and faster in Opera than in Chrome.

Apart from that, Opera seems to have many bugs where pages that other browsers load just fine, load incorrectly.

But yeah, even now, Opera won't display your site.


Race condition?


Well, I can't find the right report now, but yes, if you google thinks like chrome slow multiple tabs, or chrome freezes multiple tabs, you'll find lots of reports that chrome is almost unusable when opening multiple tabs at the same time (like clicking on a series of HN links).

About a month ago, I was researching this, and I found then, (but cannot find now), some threads that said this was a long outstanding problem created by some race condition. Another said it was caused by too much priority given to processing the Chrome spinner in each tab.

I don't know what the case really is.

I do know that Opera does a much better job of opening multiple tabs at the same time as Chrome, so I use Opera when working with feed readers and the like.

All else, I default to Chrome.


EC2 Micro... Was your blog hosting free up until the moment HN showed up?


Git works for publishing content too. No dependencies on external services, and it's very easy to use over SSH.


I could never have gotten my non-technical girlfriend to use this system if she had to go to a command line and type "git commit" and "git push" for ever new post. She's become quite prolific with it since there are no tools she has to use to publish, other than a text editor.


Obviously this is working for you, but what about an icon that triggers a git shell script? Clicky clicky?


So that means you're working with an unsaved, untitled file until you're completely satisfied with the post? That doesn't seem very safe. Unless you're saving your drafts in another location and copying them into your "site", but if so, how is that any harder than just "git commit -a"?


"Nerve uses Markdown's level-one header to demarcate the posts. It then looks for a bracketed timestamp in the header to distinguish posts that are public from ones that are still drafts. A password-protected drafts page allows me to preview drafts before publishing. Once they are done, I add the timestamp, save the file, and it's published."


http://droppages.com lets you do this with very little set up. I've been very happy using it on a simple static site that I have less technical people collaborating with me on.


I can't understand why anybody would want to go through all this trouble when you can use something as simple as WordPress and post with ease.

Then again, a lot of people can't understand why I create dancing Christmas lights every year, heh.


there's nothing worse, in my opinion, than writing a blog post in a wysiwyg web form when you know how to type and all you want to to is just type up a post. c'mon, it's 2011 and editing text in web forms is an execrable experience, one of the least pleasant things to do in a browser. markdown is a snap to learn and it is such a relief to be writing in your favorite text editor, without the copy-paste rigamole.



Maybe I'm the exception but I never have trouble writing posts in WordPress.


I'll bet there's a plugin to use markdown as the default in WP?


Snap! Never thought to install Dropbox on my web server! I already have a folder in Dropbox symlinked to my main local web directory. There must be some big gotcha that I'm missing...


Security?


> My previous blog used Markdown also, but I had to FTP the files to my former Dreamhost server. I used ExpanDrive, which made the FTP process relatively painless, but FTP is still flaky.

Come on. Really? How much transfer are we talking about to publish a blog article? And how often are we publishing. Maybe it's not FTP, but Dreamhost?

The Dropbox-based system is a neat way of doing it, but blaming FTP seems to be false justification for the effort.

If you want to hack, then hack. You don't need a reason to.


Changing horizontal window size breaks the page (no horizontal scroll bar appears and middle mouse scrolling to the right is open ended) in chrome. With IE no scroll bar appears and I can't scroll to the right at all.

This has nothing to do with his publishing technique of course, I just found it strange since he mentions adapting to screen size. Maybe the page should adapt to window size.


Very nice looking.

I know that Marco Arment runs his blog off of his PHP version of the same idea, dubbed "SecondCrack" http://www.marco.org/secondcrack

I've also been looking at a simple blog updater that can update from anywhere (especially my phone or email), so I'll definitely check it out.


Even I have made something like that! Except it's not a blog, and pretty featureless. But it can be combined with sshfs or whatever that lets you poke with the source text files.

https://github.com/Zash/WikiDav


I think this is a brilliant solution. Seems like a lot of guys here are too geeky to see what is considered easy & frictionless by the masses.


Theoretically speaking, one could use Dropbox to publish to, well, anything? I'm interested in the possibilities. Nice article.


"Internal Server Error". Cache anyone?


sweet this is what i use dropbox for!


"It's Apache-licensed and hosted on Github, but I'm not recommending that anyone other than me use it at this time. You can learn from it, though."

Wow, patronise much?


Author did write world's most popular iOS app. Could be something in there to learn from.


Meh, it's just standard JavaScript (not even CoffeeScript!) to build Yet Another Blogging Platform. A well-loved (467 watches, 49 forks) node.js blogging platform already exists, authored by @creationix who is actually _employed_ to build nodey things for WebOS: https://github.com/creationix/wheat So I would recommend reading the code of that project first, rather than me-too code from someone who thinks that deploying via DropBox is cool.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: