TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Calendar.txt

345 点作者 Iuz3 个月前

41 条评论

emacsen3 个月前
As a file format, this is just fine, but I feel like there&#x27;s some conflation between a file format and software meant to interact with that format.<p>I use plain text accounting for my business, and it&#x27;s lovely to be able to enter bookkeeping data with a plain text editor and keep it all under version control, but the next step is using a program such as hledger or beancount to work with that data.<p>I&#x27;d love to work with plain text calendar software, but it would still need to do things such as provide a mechanism to work on my desktop and mobile device. It would need to handle recurring events automatically, and it would need to allow me to invite others to events and ideally to track when they&#x27;ve accepted or rejected my invites.<p>I&#x27;d need to be able to update, cancel or propose to move events in such a way that others would be updated.<p>I wish I knew of a good command line tool to interact with CalDav or similar servers, or that I could maintain my calendar in a file format and then handle the synchronization automatically.<p>Maybe calendar.txt could play a role in that, but on its own, it&#x27;s not quite enough for me.
评论 #43204077 未加载
评论 #43205058 未加载
评论 #43208629 未加载
评论 #43204230 未加载
评论 #43235095 未加载
评论 #43218530 未加载
评论 #43208791 未加载
lblume3 个月前
&gt; Unix philosophy. It&#x27;s one day, one line.<p>The Unix philosophy is often recited as &quot;do one thing, and do it well&quot;. This does one thing, but doesn&#x27;t do it well at all.
评论 #43203432 未加载
评论 #43203978 未加载
评论 #43204887 未加载
hoherd3 个月前
I do something similar for daily notes for work. I have a shell alias `tdw` for `TODO work` which opens a YYYY-MM.md file in vim. Inside of that markdown file I use a vim macro that generates a date similar to what is shown in calendar.txt, where I take notes about what I am working on and what I have worked on. Here&#x27;s ane example of what it looks like:<p><pre><code> ## 2025-02-27 W09 Thursday - Team standup - Looking up flights to Venus - Meeting with Acme - Discuss hydrocoptic marzlevanes - TODO: read up on them &lt;http:&#x2F;&#x2F;example.com&#x2F;docs&#x2F;hydrocoptic-marzlevanes&gt; - (personal) Feed the dragon - #5934 Fix glitch in dingle arm reciprocator </code></pre> I kind of like the calendar.txt idea of prefixing every line with the date, because it makes grepping easier, but at the same time, it doesn&#x27;t allow for sub-lists and more detailed notes about what was worked on. It hasn&#x27;t been a big enough problem to deal with though, because of things like `grep -i -B10 encabulator`<p>The vim macro I use is:<p><pre><code> &quot; Macro To Do Today nmap mtdt &lt;esc&gt;O&lt;CR&gt;&lt;esc&gt;k&quot;=strftime(&#x27;## %F W%V %A&#x27;)&lt;CR&gt;Pa&lt;CR&gt;&lt;CR&gt;-</code></pre>
评论 #43209207 未加载
评论 #43216367 未加载
评论 #43208720 未加载
评论 #43208883 未加载
评论 #43216707 未加载
guessmyname3 个月前
I created a super-simple CalDav-esque web endpoint in my personal website that receives HTTP requests from a command line tool, stores the calendar events, and then returns them as a dynamic ICS file. Then, I use Apple’s Calendar app to subscribe to a “hidden” URL and iCloud automatically distributes the subscription to all my devices.<p>It sounds super dumb but it works so well.<p>The main feature is that I can categorize the events (personal, family, work, friends, etc.) and share individual URL’s with other people. Admitedly, I didn’t try solving this problem with Google Calendar, Apple Calendar, or any other calendar service, mostly because I wanted to own my data and also learn a bit more about CalDav itself.
评论 #43206443 未加载
评论 #43216265 未加载
评论 #43207846 未加载
neilv3 个月前
For a few years, I evolved a slightly-modified Todo.txt format for this purpose, to represent both tasks and appointments.<p><a href="http:&#x2F;&#x2F;todotxt.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;todotxt.org&#x2F;</a><p><a href="https:&#x2F;&#x2F;www.neilvandyke.org&#x2F;todotxt&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.neilvandyke.org&#x2F;todotxt&#x2F;</a><p>In some ways it worked well, but there were a few drawbacks, and eventually I switched to native calendar programs on desktop and mobile.<p>Drawbacks I personally felt:<p>* In the text file, recurring tasks didn&#x27;t show up when I looked into the future, such as to schedule an appointment.<p>* Calendar invites over email weren&#x27;t integrated, so I had to enter and update those manually anyway. (Though one advantage over the native calendar programs I use now is that todo.txt doesn&#x27;t force the appointment headline someone else wrote into my calendar view, and refuse to let me edit it in my local copy.)<p>* I had to keep editing dates on tasks manually, every day, for my &quot;current day view&quot; of top of the file to work with priorities.<p>* No visual calendar views with the tools I was using.<p>* No device sync with the tools I was using (though possible).<p>* There are only so many ways in which I was willing to be a weirdo at once, and this one didn&#x27;t make the cut.<p>I don&#x27;t discourage anyone from trying todo.txt or calendar.txt. Just a heads-up of some things you might want to find solutions&#x2F;workarounds for.
Communitivity3 个月前
I like this, but need more detail in my log and have too many things in a given day to have them all on a line. Had the following idea, and will try it out at some point. Call it calendar.md<p>Use calendar.txt format and method with the following changes:<p>1) Use markdown, with a top level heading of Calendar (so inclusion is easier) and the portion<p>2) Use :tag: instead of +tag. Tags can be run together (:tag:tag2:). This helps with Org mode compatibility<p>3) Third level heading for each event in day, following same format as calendar.txt<p>4) text under heading is for notes about the event<p>5) Searching and seeing info on event in day, or summary about day is no longer easy with grep. This is the biggest drawback from not using calendar.txt. Overcome by writing a tool mgrep that is specifically designed to search markdown files in a Markdown aware way (search headings or specific level of headings, show all headings under matching heading or just one level under, show all content under matching headings, search text and show either lines or section text is in optionally along with ancestry of headings).<p>6) Create CalendarMDMode, minor mode designed to facilitate calendar.md use and editing within Emacs, requires OrgMode, things like shortcuts for new date, new event, in-editor use of mgrep, etc.<p>7) Attempt to add CalendarMD support to Helix, which is my daily notes editor, using the as-yet unlanded Scheme based plugin system (see <a href="https:&#x2F;&#x2F;github.com&#x2F;helix-editor&#x2F;helix&#x2F;pull&#x2F;8675">https:&#x2F;&#x2F;github.com&#x2F;helix-editor&#x2F;helix&#x2F;pull&#x2F;8675</a> )
评论 #43205969 未加载
bArray3 个月前
My format used to be as follows:<p><pre><code> * [ ] YYYY-MM-DD * [ ] 1800: Dinner with parents * [x] Walk the dog * [ ] YYYY-MM-DD * [ ] 0900: Interview new recruit * [ ] Prepare interview questions * [ ] Upload result to HR system </code></pre> This worked really well for me and was easily searchable. One benefit would be that it is easily trackable in Git.<p>These days I have a little A6 lined notebook and manually list tasks there. Each page is a new day and the tasks are listed similarly. The only modification is that sometimes I put some letters to theme a task, i.e.:<p><pre><code> * [ ] YYYY-MM-DD * [x] Home: Walk the dog</code></pre>
评论 #43204721 未加载
评论 #43205948 未加载
评论 #43206570 未加载
评论 #43220829 未加载
评论 #43205154 未加载
评论 #43211995 未加载
评论 #43208818 未加载
jaza3 个月前
I don&#x27;t like that week numbers are (documented as) mandatory. I wouldn&#x27;t see myself grepping on a week number. I&#x27;d end up constantly looking up the correct week number in order to annotate each event properly, with no benefit in return. Then again, could write a macro&#x2F;plugin thingy for one&#x27;s editor of choice, to fill in the week number for you (ditto for day of week, which I would at least find quite useful, but which would similarly be a right pain to have to fill in manually all the time).<p>Also: claims to be &quot;one thing per line&quot;, yet allows and encourages multiple events on one line (as long as they&#x27;re on the same day). This is a calendar - is an event not the main &quot;thing&quot; we&#x27;re dealing with?!
评论 #43204266 未加载
kleiba3 个月前
Emacs got you covered, my friend, no reason to reinvent the wheel:<p><a href="https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;emacs&#x2F;manual&#x2F;html_node&#x2F;emacs&#x2F;Format-of-Diary-File.html" rel="nofollow">https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;emacs&#x2F;manual&#x2F;html_node&#x2F;emacs&#x2F;Fo...</a>
评论 #43212065 未加载
nxobject3 个月前
I’m skeptical about convenient plain text is, compared to more structured formats, once we try to encode even more of the conveniences we get out of current calendaring (e.g. time zone shifting, notes of indefinite length, events that last the whole day, repeated events…)<p>There are a few more structured formats for calendaring that share the virtues of their workflows: if we used JSON, would jq be a UNIXy tool? What about sqllite and commandline queries? Both would be much more easier for my overloaded mind - especially when parsing records - without adding more inherent complexity beyond a sufficiently overloaded raw text calendar.
kragen3 个月前
I&#x27;ve been doing this since 02001, except without the week numbers. I switched from CVS to Git around 02009.<p>Anyone who knows me will tell you I am not very organized. Possibly this is why.<p>Android support is definitely substandard, even with Termux.<p>It&#x27;s not foolproof. On one occasion I typed in the month wrong, though in the right place in the file. When I noticed that the line was out of order, I moved it to where the date said it should be. Arriving a month late, I discovered that the studio space I&#x27;d paid for no longer existed.
评论 #43207815 未加载
ndegruchy3 个月前
I like this. It&#x27;s a lot like Emacs `diary` system. Though, you can group multiple events under one day heading. I will say that I like how `grep`-able this is. As long as you know the rules, it&#x27;s pretty easy to parse. You could probably whip up an alarm system in bash and cron&#x2F;systemd and let it alert you like all those big-box programs do.
评论 #43204700 未加载
评论 #43203486 未加载
p4bl03 个月前
I did something like this for <i>years</i> before having to switch to an actual calendar app. A text calendar has a lot of advantages, like easily being able to have a list of the current and next days event displayed each time you open a terminal by putting the right call in your .bashrc :).<p>My text calendar management script is still available here: <a href="https:&#x2F;&#x2F;code.up8.edu&#x2F;pablo&#x2F;myutils&#x2F;-&#x2F;blob&#x2F;master&#x2F;kal" rel="nofollow">https:&#x2F;&#x2F;code.up8.edu&#x2F;pablo&#x2F;myutils&#x2F;-&#x2F;blob&#x2F;master&#x2F;kal</a>
kruffalon3 个月前
Have you looked into remind[0] while working on this?<p>There might be value in checking that out.<p>Personally I haven&#x27;t used it in years, but the latest release is from this year so it seems active.<p>---- [0] <a href="https:&#x2F;&#x2F;dianne.skoll.ca&#x2F;projects&#x2F;remind&#x2F;" rel="nofollow">https:&#x2F;&#x2F;dianne.skoll.ca&#x2F;projects&#x2F;remind&#x2F;</a>
评论 #43291363 未加载
slmjkdbtl3 个月前
To me the biggest block for using any plain text format for daily stuff is I need a good mobile - laptop sync method that I can easily read &#x2F; write and manage files on both mobile and laptop, does anyone have any recommendation? The best choice I can think right now is SimpleNote which I&#x27;ve been using for notes for a long time, but is there a way I can actually use .txt file instead of text been stored somewhere in a database.
评论 #43206253 未加载
评论 #43206093 未加载
评论 #43206188 未加载
评论 #43206091 未加载
thesuitonym3 个月前
You make a good argument on why to use a plain text calendar, but not why you shouldn&#x27;t use the `calendar(3)` format. I think this really speaks to the problem of discoverability that standard Unix tools have. A lot of problems have already been solved by those tools that are included on every BSD, every Mac OS computer, and most Linux distributions, but nobody knows about them, and there isn&#x27;t really a good way to see what already exists. Sure, you could browse `&#x2F;usr&#x2F;bin` to see what&#x27;s available, and I <i>guess</i> that&#x27;s the Unix Way, but it&#x27;s unwieldy.<p>It would be cool if there were a crash course on this stuff, but even that wouldn&#x27;t work well, because the first time you use a unixy system, it would be too much information to retain, and subsequent times you&#x27;re likely to just gloss over all this stuff.<p>Perhaps the only real solution is asking about what you want to do on messages boards, and hoping some weird old curmudgeon who is familiar with the small program you want to use sees your question.
评论 #43209453 未加载
评论 #43209505 未加载
roland353 个月前
One thing I really would like in a calendar app is some sort of &quot;change log&quot;, and this gets somewhat close to that, assuming you track the file in git.<p>For example, I recently scheduled a dentist appointment 6 months from now. Unless I scroll through the calendar, or specifically search for it, there is no easy way to find that I added that event.
评论 #43204920 未加载
jeroenhd3 个月前
Seems useful for very basic calendar requirements. I&#x27;m not seeing much about timezones or anything at all about DST so I&#x27;m guessing this format just ignores those for convenience. Saying &quot;times are local to events&quot; is great for physical events but when you&#x27;re dealing with an international call, you probably want to specify that.<p>Using a full stop as a separator seems rather limiting, something less likely to appear in an event description such as a vertical pipe would make more sense. Now you&#x27;d need some kind of weird logic to write an event titled &quot;read top 10 news.ycombinator.com articles&quot;. Using @ as a special character also means you can&#x27;t store &quot;email support@localhost.com&quot; as an event title.<p>And, of course, everything is hard coded in English, using English style time notation.<p>This seems like a fine solution for a personal file format but everyone will probably have to modify it to fit their own needs. If I were to use it, I&#x27;d violate the &quot;spec&quot; all over the place by time and date notation alone. This could be fixed by adding some kind of header, but I doubt any full application will ever support a format like this so it&#x27;s hardly a problem.<p>If I were to use this as a file format, I&#x27;d add headers to store things like language, default time zone, ltr vs rtl, and alter the separator characters. Adding something like a title, an author, and the moment of last edit might also be useful.<p>I&#x27;d personally also probably store events as separate, duplicate lines. That way, you can easily add an event to the bottom of the file without having to find&#x2F;replace an existing date (or generate an entirely new line). Using basic POSIX tools you can easily get the events back to a single line without making scripts too difficult to read. Assuming culture and other headers match, you&#x27;d be able to import another calendar file by simply appending the event lines.
评论 #43204820 未加载
s0fasurfa3 个月前
Nice idea, but the calendar format is a bit verbose for my taste. Week number is something I would have to look up constantly and surely get wrong more than once.<p>If you want to follow UNIX philosophy, why don&#x27;t you write an augmenter&#x2F;converter tool `caug` that adds &quot;computed&quot; information such as week number, weekday or even relative date?<p><pre><code> &gt; cat calendar-src.txt 2025 ==== 03-01 9-12 project groups &gt; cat calendar-src.txt | caug 2025-03-01 w09 09:00-12:00 project groups +tomorrow +thisweek &gt; cat calendar-src.txt | caug | grep &quot;thisweek&quot; 2025-03-01 w09 09:00-12:00 project groups +tomorrow +thisweek</code></pre>
评论 #43207041 未加载
评论 #43206977 未加载
BuildTheRobots3 个月前
Tangentially related, but the built-in Windows Notepad still to this day will append the current time and date to a file on opening, if the first line is &quot;.LOG&quot;.
评论 #43208064 未加载
smikhanov3 个月前
Sorry to be a Luddite, but isn’t this completely useless?<p>- one line per event, so good luck finding multi-day events like “Grandma is visiting”;<p>- rigid metadata (dates, week numbers, weekdays) stored right next to the editable data (events), so copy-pasting errors are inevitable;<p>- the most important feature of the real calendar software (reminders) is thrown out;<p>- grepping is really not how most people interact with a calendar.<p>If you’re ready to ditch reminders, attachments, locations, use the paper diary planner. At least it won’t let you screw the dates with botched copy-paste.<p>Update: also, sorting by date must be done manually, my god.
评论 #43203474 未加载
评论 #43203302 未加载
评论 #43202877 未加载
janpot3 个月前
my dad keeps his calendar in an excel file with almost the exact same format except he omits dates with no entries. Every week he prints a new version of this on a single A4 which he folds and keeps in his wallet. new events are hand written at the bottom and get included in the excel weekly. he&#x27;s been doing this for as long as I can remember.
评论 #43209140 未加载
Brajeshwar3 个月前
A very similar idea and philosophy - <a href="http:&#x2F;&#x2F;todotxt.org" rel="nofollow">http:&#x2F;&#x2F;todotxt.org</a>
评论 #43203778 未加载
miles3 个月前
Previously:<p>3 days ago, 7 points, 0 comments <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43169019">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43169019</a><p>1004 days ago, 202 points, 93 comments <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=31574125">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=31574125</a>
noduerme3 个月前
The first online store&#x2F;cart I wrote (in php 3 or 4, around 2001), I didn&#x27;t know sql so I worked backwards into inventing a database from scratch using text files. This was great for a couple years until someone put an asterisk into the name of a product. Asterisk was my row delimiter. lol.
dim133 个月前
Little known, but there is already calendar(1) [1] in OpenBSD with much more sane format.<p>[1]: <a href="https:&#x2F;&#x2F;man.openbsd.org&#x2F;calendar.1" rel="nofollow">https:&#x2F;&#x2F;man.openbsd.org&#x2F;calendar.1</a>
account-53 个月前
I like text based formats for things. But I find that you need software to help with the maintenance and presentation of such things. Todo.txt and plain text accounting are two examples of this; sure you could edit the plain text but a software system just makes it better to use, especially on mobile.<p>With that in mind I don&#x27;t see how this is a replacement for caldav. Sure looking at the plain text of a caldav file is worse, especially one generated by a computer, but at least all expected calendar functionality is included. Though the sprawling RFC is hardly simple to follow or implement.
sunshine-o3 个月前
I love it but I believe I am deeper in that rabbit hole.<p>I just create files in a folder with the `yyyy-MM-dd-hh:mm` format. I use `XX` for recurring events.<p>I use `at` for reminders&#x2F;notifications.
jrm43 个月前
In the spirit of friendly competition; I gotta argue that Skroll&#x27;s &quot;Remind&quot; supercedes this in every way. More flexible and more powerful.
评论 #43209079 未加载
j7ake3 个月前
Cool but how do I share events with my family and coworkers so we are on the same page?<p>The point of calendars is to align with other people’s lives
pydry3 个月前
orgzly revived with org mode<p>It&#x27;s like this, but better. I actually get notifications from my calendar text file. I can set some of them as alarms.
tero3 个月前
Thank you for bringing up calendar.txt. My homepage is feeling the hug. In the meanwhile:<p><a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20250216110151&#x2F;https:&#x2F;&#x2F;terokarvinen.com&#x2F;2021&#x2F;calendar-txt&#x2F;" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20250216110151&#x2F;https:&#x2F;&#x2F;terokarvi...</a>
评论 #43204135 未加载
arrty883 个月前
One event per line might just be better.<p>`YY-MM-DD:HH:MMa (Optional repeat cron definition) &quot;Event string&quot;`
_glass3 个月前
Seriously, with the number of invites, slots, to juggle. Might be better to work again like a dev and with text files in an IDE. Would be funny to send invites with raising a PR. Merging, reviewing, ... what a beautiful mess.
Jotalea3 个月前
This is an idea so basic, yet so good, that it should be general knowledge already.
评论 #43204991 未加载
653 个月前
This seems like it&#x27;d be much more practical as a CSV file.
评论 #43220730 未加载
dewey3 个月前
Plain text is fine as a backing format...but not as an interface for something more complicated than text or lists.<p>Editing this on mobile sounds very annoying.
评论 #43209245 未加载
ulrischa3 个月前
A nice idea. But imagine you are a manger with a bunch of dates. This will not be very readable
doenwe3 个月前
Is support for 2034 on the calendar?
评论 #43208210 未加载
doenwe3 个月前
Is support for 2034 announced?
gherard55553 个月前
its <a href="https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;</a> all over again
评论 #43204668 未加载