Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe I'm paranoid, but I would feel uncomfortable mailing my most personal thoughts to a server I don't control, or even using clear text email at all for that purpose.


Assuming you've gmailed personal messages (and therefore trust google enough), you could set up google calendar to email you daily.

Of course without the random previous entry. Maybe with google documents there's a way to do that too.

EDIT google word doesn't have scripting, but their spreadsheet does. Their automated forms is a tiny bit like what's needed [you can enter info & it's stored], but it's not emailed, and can't be configured with a random entry. Now that I think about it, MS Word disabled automated emails (due to spammers using it), so maybe google has too. But there seems no harm in allowing it to only the one verified & linked gmail address for the account. (Otherwise there may be a niche here).

Checking google spreadsheets, and you can email from it. Just tested, it works. There's a time-based "trigger". You should be able to email a form, in a htmlBody, and store the results so you can include a previous entry.

The scripting tool and documentation are excellent.


Got the basics working.

Made a spreadsheet. Made a google form ("how has your day been?" + a text area) - they automatically add their fields to the spreadsheet. Wrote a short script that selects a random row at random, and emails it to me + a link to the form. Added a trigger that runs that script at 8pm-9pm daily. [if anyone wants the script, I'll post it - please improve it!]

Some flaws: 1. I couldn't work out how to automatically embed a form in the email directly, neither using their embed code (an <iframe>) - it works if they email it to you (which you need to trigger manually), but also gives a warning "you are leaving this page"; 2. also couldn't work out how to initialize the form with the random previous entry (a blog post said you could, but that was in 2008) nor 2. writing my own form (need an URL for the action: seems you need a form key, which you can't get, for security reasons(?))

Boy browser programming sure is frustrating: browser locked up twice had to set it all up again; 7 sec load time for pages; weird cursor movement for editing (and also not vim); along with the above limitation. Though it probably doesn't help that I don't know what I'm doing :-)


I'd like to see the script; I take it that it's some sort of Perl thingy which goes through the Google spreadsheet API? Or does the spreadsheet have builtin scripting?


It's built-in; it's Javascript. In the spreadsheet, the script stuff is in the "tools" menu, and it opens a new window which has a menu for "triggers". The help is pretty excellent (reference and tutorials), but it doesn't cover Javascript's standard libraries, only google's special spreadsheet classes (BTW: there's some cool stuff in there for webserves, you can download URLs and parse XML.)

  function sendEmail() {
    var sheet = SpreadsheetApp.getActiveSheet();
    var numRows = sheet.getLastRow() -1;// don't count first row
    var selectedRow = Math.floor(Math.random() * numRows);
    var dataRange = sheet.getRange(selectedRow+2, 1, 1, 2);// from A2, 1 row, 2 cols
    var values = dataRange.getValues();
    var date = values[0][0];       // 1st row, 1st col
    var prev = values[0][1];       // 1st row, 2nd col

    var message = "<HTML><BODY>"
      + '<a href="'+yourFormURLhere+'">goto form</a>'
      + '<BR>'   
      + '<b>Oh snap! Remember this from '+date+'</b>'
      + '<BR>'   
      + '<textarea rows="20" cols="60" name="prev">'
      + prev
      + '</textarea>'
      + '<font size=1>RemainingDailyQuota: '+ MailApp.getRemainingDailyQuota() +'<font>'
      + "</HTML></BODY>"
    ;

    MailApp.sendEmail( yourAddressHere, "How did your day go?",
      "", {htmlBody: message});
  }
You get the yourFormURLhere from the form editor. The daily quota is 500 emails.

Protip: It turns out 8pm is not a good time for the trigger to send it, for you to record the day's events, if you keep odd hours like me and get up at 9pm sometimes...

EDIT the http://OhLife.com selection of the previous entry is more useful: they first choose whether it will be "one month ago" or "one week ago" etc, then work out that date, and then get the entry from that date (or I guess the next one if blank). It might turn out that for a particular person that always being reminded of "this time last week" is a very effective context (or some mix of them). Bonus: it's trivial to then describe the entry with that string, which is much more natural than some timedate format.


I'm going to use it for a little while, and if it seems like something I'm going to continue doing I'll set up a similar script to email me reminders every day and have the reply I send to myself auto-sorted into some mailbox where it can gather dust until I decide to read it again.


Yeah, if my day consisted mostly of addressing personal 'issues' (for lack of better word) that I don't want posted to a remote server then I simply don't write about that day. And I wouldn't write about it even if it was being saved only on my own disk.


I find journaling about 'personal issues' is where it's most useful. It helps bring clarity to a subject inherently clouded by emotion.


If someone set up a similar service using a Tahoe LAFS storage server or some similar technology so that the service provider could not read your entries, would you use it?


What is the alternative apart from paper journals?

/curious


Store it locally on your computer? (being careful to back it up of course)


Yeah, when reading this, between the fact that I love emacs and the fact that I'm not too comfortable giving Ohlife (and Google, since I use Gmail) my journal, my immediate thought was text/markdown files backed up to a private Github repo.

But the email would remind me to do it every day, and it'll be easier to look through old entries on Oh Life since it shows all entires on one page (though I guess there's nothing stopping me from just having one super-long text file, if that's what I want).

At least they have an export that looks solid.


Yes, I use Aquamacs to edit a super long text file that I keep on an encrypted volume. I don't worry about reminding myself. I do it when I feel like it, which turns out to be 2-3 times per week.


I really like http://750words.com


I know quite a few people use their iPhones/iPads for such writing.


Perhaps an open-source version?




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

Search: