Plain Text Calendar
terokarvinen.com
terokarvinen.com
My Google cal emails me notifications, works with desktop calendar apps, integrates with Maps, etc. It autofills addresses, adjusts for time zones, syncs across my 4000 devices, allows me to edits dates via text input or GUI/drag 'n drop, etc. (Not shilling, Apple cal is probably similar.)
Even my todo list went from org mode to Google Tasks because of the integrations with Android, Google Calendar, etc.
Until you get locked out/banned by Google.
That said, this kind of text format is useful if one needs to keep track of calendar information for a specific project (in a project folder).
There's an open standard, icalendar (https://icalendar.org/) which represents calendar entries. Invitations you get in the mail come this format too. The easiest way for your map, address book, reminders etc to integrate is just to talk to your calendar server. The apps need not know about each other at all.
Google and microsoft of course may do some non-standard futzing around within their proprietary stacks: you can often see these problems when you try to connect to something outside their silos, though in my experience the standards integration in google calendaring is pretty good (especially when compared to their mail system). It's been a few years since I had to interface with Exchange calendaring but back then it...wasn't good.
So in any case there's no reason you couldn't write a small service that spoke ical over the network and this plain text calendar's format locally. Then it would appear normally in your partner's iphone, handle your kids' schools' calendars etc.
Whether it would be worth doing that is literally an exercise for the reader...but you'd get the same level of integration as you would with, say, Apple's icloud calendar services.
> Google and microsoft of course may do some non-standard futzing around within their proprietary stacks: you can often see these problems when you try to connect to something outside their silos, though in my experience the standards integration in google calendaring is pretty good (especially when compared to their mail system).
Yes, crossing the two is often still a hot mess.
The first paragraph sounds great in theory. The second paragraph sounds more like what happens in practice...
Sadly, in this particular case, I can forgive them. The fact that iCalendar is the best we have is sad. There is a lot of room for improvement.
[link redacted]
This is one of those situations were worse is better.
I've been looking for something like this that will let me edit in plaintext but also sync both ways with gCal for the benefits of plaintext but also the caveats that you mentioned.
Any time slot that matters to me goes into a proper calendar so my time is marked as blocked and people know that I'm busy and don't dump meetings in it. I literally block time to code. Likewise, a lot of my work is coordinating work with others and we use Asana and Github issues for that sort of thing. Other tools are available. But the key feature usually is that you can use them with a team and assign stuff to each other, edit them concurrently, and have some non technical team members doing so as well.
Doing csv exports and imports is feasible for calendars and issue trackers but it doesn't solve a problem I have (except when migrating to different tools). As data input tool that seems not really great. It's actually why I like Asana; I can just type an issue, hit enter, type another one, etc. It feels like a spread sheet tool.
I think I still prefer Remind's approach for now; it keeps the ability to have a plaintext viewable thing, but Remind also appears more scriptable and exportable; e.g. I make mine both give me reminders in my Terminal, and I can also make it print out a regular "human-ready" calendar.
[1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Fo...
ie, I just want to see April of this year: but `cal 4` returns Jan-Dec 0004 CE <!>
`cal -3` is perfect!
~ $ cal apr
cal: year `apr' not in range 1..9999
speaking of, cal is just a calendar. It doesn't have events anyway.
ncal -b -M -w -B 1 -A 1
now() {
cal -3
echo
echo -n "Local: "
date --rfc-3339=s
echo -n "UTC: "
date -u --rfc-3339=s
echo -n "New York "
TZ='America/New_York' date --rfc-3339=s
echo -n "London: "
TZ='Europe/London' date --rfc-3339=s
echo -n "New Zealand: "
TZ='Pacific/Auckland' date --rfc-3339=s
}I made a video about how it works: https://www.youtube.com/watch?v=gbGawb728xA
I'm the creator of Calendar.txt. I'm very happy to see this on Hacker News.
I've used Calendar.txt as my calendar for over a year (and previous versions before that). Having previously marketed both digital and paper calendars, and tested the digital variety, I felt they were excessively complicated.
For me, the benefits of calendar.txt have been reliability, simplicity and integration with established Linux tooling (grep, git, scripts). The downside has been lack of automatic synchronization, a tradeoff for simplicity and reliability.
If you want to ask about using Calendar.txt, I'll check here during breaks from my Django intensive course.
My teacher voice says: concentrate on your Django course while you can bombard the facilitator and participants with questions.
Happy to hear that you've found a new use, journaling, for calendar.txt. I'm using it similarly myself, even though it's not mentioned on the page. For some projects, I collect billable hours from old calendar.txt entries ('grep +theproject calendar.txt'). I also use it to record some results, e.g. Cooper x meters on this date.
Do you use calendar.txt for journaling and another program for calendar planning? If so, what are you using for a calendar?
I plan to rename my copy of calendar.txt to yesterday.txt. Each morning my plan is to write something about what I did yesterday with a view to extracting themes - perhaps like not making assumptions about the roles people on forums might have. I'm thinking some code words might emerge like '$ScreenTime 3'. But I'll see.
Planning: I am actually a teacher in adult education so we operate on pre-determined timetables for each class. I have a document called a 'scheme of work' which I use to plan what happens each week in a given class with space for a bit of a note after each session about what actually happened. Schemes of work are 'working documents' - they change as the year unfolds. My life in general just lives on a (paper) calendar on the notice board in the kitchen.
Thanks for your work.
There are many more students than teachers, so even if hn crowd has x5 number of teachers than students, you're still statistically correct
2b3a51, interesting planning process. My system with calendar.txt and planning courses: I use week headings for marking the periods and period weeks (4p1). When reserving course days, I just put the tags there (+pw). Later, when I decide the main theme, I add it ("+pw deploy"). If there is a special channel, guests and other info, I add it as it arrives.
For past events, calendar forms a nice basis. At least for me, most of the stuff I plan, happens. I understand you add some insight there, maybe I should try that, too.
calendar.txt (lowercase for my filename) but only 'YYYYMMDD thing' for how the content line was - you've got more structure going on so that's cool, I like the week numbering - good idea.
calendar.sh was my little grep reminder tool running from cron.
Great minds eh.
POSIX cal[1], calendar(1)[2]
[1]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/c...
[2]: `man -S 1 calendar`
ics is already plain text.
This plain text calendar would be more powerful if it came with an ICS parser.
I am remarkably lazy sometimes.
I guess I can roll my own OAuth and parser, but then I'm not going to use this linked plain text calendar.
2021-03-03 w09 ke 8-1345 +lp bash-db; (14-1545 +mp); 1530 FxBar
Is that particularly readable? There's a whole section dedicated to how to read the entries and why the syntax is the way it is.From the BEGIN:VCALENDAR line all the way down to the description being littered with \n line breaks, it is not very human readable.
The tradeoff is the greater feature set of ics comes with a necessarily more complicated format. We can see complexity creeping back in to this format as you scroll towards the bottom and tags are introduced, and there’s still a lot missing. With the way it is now, basic things we take for granted like recurring meetings are not handled. You’d need a separate program to insert/delete lines and do the date math if the format isn’t going to change, or more likely a special event type. If you add a recurring event, then you’d likely end up revisiting the one line per day idea.
Preview here: https://github.com/lorey/obsi/tree/master/example/output/cal...
From LAPTOP Sat Jan 3 01:05:34 1996
Subject: CAL EVENT: Call gas company
Account number: 12345678
From ANDROID
Date: Tuesday, May 31st, 2020 6pm EDT
Subject: CAL EVENT: Meet Chris after work for drinks at Bad Bar
A format like that could be edited in a text editor, or easily loaded into a simple app with an existing parser library. A single mbox could be a calendar with each e-mail a calendar item, which is easy to search/filter by an email client. As a bonus it supports MIME encoding to attach files. You can use one date format, or several, and have a script easily re-format the date lines if you want to grep/awk it.Other existing formats (https://en.wikipedia.org/wiki/ICalendar) have features missing here, like date/time ranges, recurrence, status, allday, reminder time/method. While you might not want them yet, you may want to convert your calendar to/from another format in the future.
I created calendar.txt format to meet some requirements:
- One line, one day - easy to use with Linux command line tools I use every day (grep, sort...)
- Simplicity: no recurrence, no date time ranges (but I can of course grep for project tag "+pw" to see the first and last date for the project)
- Fast to write, even on mobile
- Use ISO 8601 standard dates, have standard weeks near dates
Package: when
Version: 1.1.38-2
Priority: optional
Section: universe/utils
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Salvatore Bonaccorso <carnil@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 156 kB
Depends: perl:any
Recommends: m4
Homepage: http://www.lightandmatter.com/when/when.html
Download-Size: 49.7 kB
APT-Manual-Installed: yes
APT-Sources: http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
Description: tiny personal calendar
Minimalistic personal calendar. It runs from the command
line, and it uses a plain text file format, which you can edit
using your favorite editor.Additionally this is not a great format for recurrence, which has to be done manually, reminders(nil), notifications, change tracking (without git), location information and you're obviously at the mercy of typos.
Synchronizing my own calendar.txt between my own devices has worked very well for me using git and synchthing. I also find it very easy to audit correctness of synch, thanks to plain text and version control.
For recurring events, I have found calendar.txt much easier for my use. Many recurring events have small number of events in any given year. Also, there are often exception or two, and some entries get more specific over time.
I have found adding recurring events much faster with a text editor than any of the calendar programs I've used. As the author of calendar.txt, I'm of course biased here.
A preview can be seen here https://github.com/lorey/obsi/tree/master/example/output/cal....
I've also created a script to automatically generate all the files for me: https://github.com/lorey/obsi
For calendars, right, that's important data. Sooooo, I wrote some software that is correct back to Pope Gregory. E.g., can read Gone with the Wind, look up the date of the firing on Fort Sumter, and then know the day of the big BBQ!
But my plain text calendar program just prints out for any given year, for each month, a traditional calendar format, e.g.,
January, 2022
Sun Mon Tue Wed Thu Fri Sat
__ __ __ __ __ __ 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 __ __ __ __ __
Right, for the movie: April, 1861
Sun Mon Tue Wed Thu Fri Sat
__ 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 __ __ __ __
__ __ __ __ __ __ __
Right, there is a lot more we
want to do with calendars!Sooo, I wrote code in Fortran, Rexx, and Kexx (macro language for "plain text" text editor KEDIT, by far my most important computing tool) that, given one of either (a) month, day, year or (b) number of days since the start of the Gregorian calendar, will return the corresponding other. So, easy to calculate number of days between two dates, day of week, etc.
Then can easily write other little programs to do a wide range of applications of manipulations of calendar data!!
So, there's another theme: End users get some general purpose tools, e.g., subroutines that do the hard work, and with those tools write short programs that give them what they want, likely all in easy to work with plain text.
Basically, change the meaning of the date on a todo.txt item to be the soonest date that task/appointment can be done, have optional time of day (point or range), and sort the entries to an appropriate ordering (pending before completed, then by date, then by time of day). Every day, tasks you didn't do, search&replace the date to tomorrow.
They work nicely together. To check for all calendar events and todos for a project, I can 'grep +pw calendar.txt todo.txt'. This also shows the start and end date of the project (first and last event date)
Todo.txt is a great format!
I use a simpler syntax, such as "2022-06-01 Event description" or "2022-06-01 12-13 meeting" because I don't really care about week numbers and week days are handled separately (see screenshot).
Through the years I've added more features as it became more interwoven with the rest of my (plain-text) productivity system.
For example, I have reminders: 2022-06-01 2100! take out the trash. This notifies me at 21 on whatever device I'm using at the moment (computer or smartphone notification)
I have a vim syntax and ftplugin files that help in visualizing important things (eg. the date and time are highlighted; inactive events (starting later) are shaded a bit) with support for easy and ergonomic moving of things (keyboard shortcuts to postpone tasks by one day, one week, etc) and also handling of recurring events (every X days/weeks/months/etc).
Relevant data is integrated into dashboards (e.g. the number of remaining events/tasks for the day is shown in my desktop statusbar); each morning (or the evening before) I can get an email with the tasks for tomorrow, etc.
The only thing I'm missing, since lately I have begun attending several meetings and have started timeboxing my work time as well, is the ability to see those nice boxes one sees e.g. in google calendar in day or week view. However I think that this plaintext file could be parsed and a view like that could be generated with relatively little effort.
example screenshot: https://0x0.st/oBIr.png
edited to add. I just noticed that OP's solution is one day per line. Mine is one event per line, which I find much more readable and versatile. You can change the date or time of an event and then simply `sort` the file and it's automagically in order
Your syntax highlight sounds like a nice addition.
The option of viewing your calendars and tasks on the phone or anything with Google calendar gives a very considerable advantage, IMHO.
Some of the comments I do agree with (syncing with Apple, Google and Microsoft would be amazing) and hopefully someone is willing to extend the calendar to enable this. Heck, I might have a go myself.
In Finland there is a heavy reliance on week numbers. When finding a shared free time slot for a meeting you pick a week first. Especially the public sector revolves around weeks and the default user interface is the official desktop paper(!) calendar.
What makes most US-based calendars confusing by default is the different Date/Time format. The Finnish written standard is DD.MM.YYYY with the week starting on Monday.
Localisation doesn't necessarily help. The British mental model clashes with the Finnish tradition in highlighting the "wrong" pieces of information. In spoken Finnish 'month DD' or 'DD' if you're already looking at the same week is the natural order. The British put a lot of emphasis on the day of the week and the order/formatting is also "wrong": 'DAY DD MONTH'.
In the grand mess of global localisation these are tiny details, but many smaller nations, and their citizens, get stubbornly attached to our local peculiarities.
A tradeoff with sync to external calendars will be reduced simplicity, reliability and security. Depending on your use case, it might be worth it.
I used to use remind, but now it's mostly for birthday reminders. And work appointments require logging in to Outlook anyway.
2033-06-12 w23 Sun Resume on HN the 'Plain Text Calendar' post :P
No thanks! IMNSHO the week starts on Sunday.
But you should use whatever works for you. If you want to use the US system, you can easily adapt to this. The short Go code for generating the template is on calendar.txt homepage.
http://unicorn.us.com/pub/cal40.zip
Rather nice
Why not use day-of-week number to make lines sortable?
2021-02-21 w07-7 Sun 10 ski with N
But, in my country, Sunday is first day of week, so
2021-02-21 w08-0 Sun 10 ski with N
(Year) (dd) (MMDD): (most important event), (next most important)
Ex
2022
sa 0102: appt
su 0103: party, drop off mail
mo 0104: work, call jon