12 ms·
I use a single text file, have done this for decades. I dump everything into it and don't worry too much about structure, it's an incredible resource for "remem
by kabdib 7y ago
I use a single text file, have done this for decades. I dump everything into it and don't worry too much about structure, it's an incredible resource for "remembering" minutia, things like "what was that server that i thought might have had some issues last August?" Just a quick control-S and I'm there. My current 7+ year old notes file has about 100K lines in it right now. I can tell you what I was doing last year, or the year before, on this day, in seconds.
I just type
note (maybe some text here)
and it cracks open Emacs on the notes file, adds a timestamp, appends the optional text, and then I can just type or paste something in. Nearly frictionless, that's key. Great for writing those miserable annual reviews, too (easy answers to "what have I worked on in the past year?")
I use plain old notebooks (simple blank sketchpads, or something bound like a Moleskin/Lecchturm) for meetings, interviews, walking around datacenters and so forth where a keyboard is awkward and anyway, drawings.
I've tried the EverNote/OneNote/etc. apps and none of them were as convenient or as easy to use, or as portable.
- ramraj07 7y agoThat sounds quite elegant, but seems this is only possible if you work out of a single machine almost always. Perhaps it could be made into a service? As long as explicit effort is taken that there's absolute minimum extra effort as possible!
- yoz-y 7y agoTwo options would be: 1. put that file on dropbox or another syncing service. 2. have it on a remote server and ssh there first
- freetanga 7y agoI do this, with the machine being a VPS on Linode, plus an IPad 4G connectivity with Blink app to connect via MOSH almost anywhere on earth. Logitech folio keyboard and Apple Pencil. Drawings also pushed to cloud. Local backup to my own NAS and a S3 storage. Works as a charm
- Stevie300 7y agoI handle this by aliasing `todo` to `vim scp://[my website]/~/todo.txt`.
- aidos 7y agoWait, you can use scp as a protocol?!
- Izkata 7y agoNot generally, but vim can: https://vim.fandom.com/wiki/Editing_remote_files_via_scp_in_vim https://vim.fandom.com/wiki/Editing_remote_files_via_scp_in_...
- fzil 7y agowow, that's incredible. learn something new everyday.
- d0mine 7y agoEmacs' Tramp supports multiple protocols https://www.gnu.org/software/emacs/manual/html_node/tramp/Quick-Start-Guide.html https://www.gnu.org/software/emacs/manual/html_node/tramp/Qu... For example, to run a remote command using an inline org-mode source block: src_sh[:dir /ssh:host:]{some command} Or to run code using a remote Jupyter kernel within Org-mode in Emacs: #+BEGIN_SRC jupyter-julia :session /ssh:ec2:/run/user/1000/jupyter/kernel-julia-0.6.json ... #+END_SRC https://github.com/dzop/emacs-jupyter/blob/master/README.org#remote-kernels https://github.com/dzop/emacs-jupyter/blob/master/README.org...
- TeMPOraL 7y agoOh, that remote execution is a neat trick. Thanks! To cover the more trivial point for the non-Emacs readers: Tramp in Emacs makes it so that there's almost no difference between opening a file (C-x C-f) like this: /home/user/some-file.txt and like this: /ssh:some-machine:/home/user/some-file.txt and like this, if you need superuser rights: /ssh:some-machine|sudo:some-machine:/etc/someconfig The subsystem in Emacs called Tramp makes this almost transparent; you edit your remote files as if they were local. There are occasional kinks with path translation in corner-case situations, like local Emacs editing remote source files and trying to load them into remote REPL, but those are rare and can be configured away. Dired (directory manager in Emacs) also works transparently over Tramp, so this essentially replaces SCP and graphical SFTP tools for me. You can even run GDB remotely over Tramp, which is a nice trick.
- irongeek 7y agoI use text files and have for years. I use Syncthing to keep the text file available on all my machines.
- kajmagnusmobile 7y agoAlso on mobile? Which editor do you use on mobile? I like syncthing
- yjftsjthsd-h 7y agoI just put my text files in version control. Push/pull, occasionally merge when I forget.
- treebornfrog 7y agoI save these text files to my desktop, call me old school.
- yjftsjthsd-h 7y agoBut then you've only got it locally. The advantage to VCS is that you can trivially have it on multiple machines (desktop, laptop, android with termux). You can even do it between your own machines via ssh if you don't like "cloud" stuff.
- kungtotte 7y agoUsing syncthing you can trivially have it everywhere as well, with only a one-time setup and no continuous need to manually commit changes and manually sync them (unless you're using hooks for your VCS to automate that I guess).
- yjftsjthsd-h 7y agoI use syncthing for non-text files, but I keep getting conflict copies. I could probably fix that by having one node always online, but text+VCS means that conflict resolution is built in.
- war1025 7y agoI just keep a private git repo that I push the updates to after entering them. I've gotten to the point that anything important enough to keep around I basically just put in a git repo somewhere.
- duykhoa12t 7y agoSame to me. I store the note folder to a private gitlab repo, and write a bashscript function to commit and push the note.
- smcnally 7y agoA repo on github handles TODO.txt files from multiple machines fine, and better than gDrive or Dropbox. VSCode is now my main editor which makes git integration simple. I can also edit the file directly on github, though never do.
- sergioro 7y agoKeeping my notes in a single file has worked great for me too, i can quickly find notes by searching with Vim. i split the file in sections starting with [tag<name>] (e.g. [tagvim]) which makes it easier to move between sections. Each section is a markdown list.
- Karishma1234 7y agoFor me it has been a notebook and pen.
- jvanderbot 7y agoSame, of course. I added some bash aliases to make it much easier to write to the file, and use markdown instead to allow tracking todos easier. I also added a vim command to push it to github while editing. These just remove barriers to opening and syncing the file, but the concept is the same. You can see the result here: https://github.com/jodavaho/bashlog https://github.com/jodavaho/bashlog
- entilzha 7y agoAny thoughts on how to access/modify on mobile without making it too cumbersome? I often think about todo on walk/train, but could see making it a computer only thing.
- bachmeier 7y agoIf you version control it using Fossil, and it's in markdown, you can access it directly from the repo website.
- vor0nwe 7y agoBut you can't make changes to it online.
- bachmeier 7y agoDepends. You're right if you use a conventional version control approach where you write on your local machine and then push to the server. But that's not the only way to use Fossil to store your notes. If you're using the wiki (using one or more wiki pages) everything is entered into the browser whether online or using the built-in server running locally. Other options are to create an issue for each note or create a new forum thread for each note. The nice thing about these options is that you get the search and querying power of an sqlite database applied to your notes for free. Disclaimer: I haven't used this approach because I don't use mobile devices for note taking. Just pointing out that it is possible.
- justusthane 7y agoYou can with Github as well. And make changes to it via the website. Not on mobile though, unless you switch to the desktop site.
- yoavm 7y agoOn Android, I've been using Markor with Syncthing for years now and never had any issues.
- kabdib 7y ago
- jwtorres 7y agoFunny that we all resort to the same things. I have an almost identical bash script that appends and timestamps each note, but I push it to my Dropbox account using their REST APIs instead of my local file system.
- zgit 7y agoCan you expand on your system a little bit? Do you use it from the phone too?
- jwtorres 7y agoThe bash script I was talking about simply curls the .txt file from Dropbox, edits/appends it, then curls it back up to Dropbox (overwriting the old copy). Dropbox iOS app allows you to create .txt files if you absolutely need to take a note from your phone. I’m never far from my computer personally. I also wrote a Chrome extension that does essentially the same thing as my bash script (as well as save bookmarks to Dropbox). Its caching mechanism is very convenient for writing long notes that will be edited over hours or days—if the machine goes down, they’re all stored in Chrome’s local memory the next time I boot.
- war1025 7y agoI've been doing something similar to track what I do at work for just over a year. I tried keeping a home journal with a similar technique, but it didn't stick. I have a git repo set up, and I run: "vim `date -I`", which opens a text file named for the current date (2020-02-08 today for example). Then I'll put in notes about what it is I'm currently working on. I've come up with the convention of separating tasks with three equal signs (===) and separating updates to a single task with (--). The main thing it's been helpful for to me, which is honestly probably why I've kept up with it, is that I'm bad about doing my daily timesheets. So once a month when our accounting lady gets after me, I'll go back through my notes and fill everything in.
- grifball 7y agoI use vim. Doing files based on timestamps sounds smart so I might steal that. I used just one big file right now and one thing good about it is that you can search all your notes with one command. I also use the uuid command to tag/reference sections. Then, I can just put the cursor on the uuid and hit '*' to jump right to that spot in the file.
- war1025 7y agoHad never used `*` before. Turns out it's search for the word under the cursor. Handy. I guess that's basically what you wrote, but I had to play with it a bit to understand.
- the_white_oak 7y agoA bit of a tip: while `*` is a search for a word onward, `#` is a reverse -- a search for a word backwards. Might help sometimes
- Amarok 7y agoCould you explain a bit more how you tag sections?
- MichaelMoser123 7y ago
- cfitz 7y agoI’d love to implement a similar command line program for logging various on-computer activities. Thank you for sharing!
- mkarnicki 7y agoI recommend you check out https://jrnl.sh/ https://jrnl.sh/
- trunc8 7y agoBeing doing this for years also, occasionally emailing to myself as a backup, mine is at nearly 60k lines. Top tip is to add meta tags. I suffix them with a colon to help with searching. For example, the section containing my git notes begins with this line: Git notes: / Git: / Git commands: / Github: / Git bash: And any time I search for something I didn't have a tag for, then I add a new one, even misspellings.
- OnACoffeeBreak 7y agoHow do you handle a file like that on mobile? I separate my job journal from my personal journal. Job journal starts on a backed up work drive and I don't care to have mobile access to it. I must have access to my personal journal at work, or while I'm out and about and mobile is the only way.
- raziel2p 7y agonot OP but I put this file on Dropbox, their mobile app has an editor that works for markdown or plain text.
- gibspaulding 7y agoI've also had success using syncthing for this if you want something self hosted.
- Yen 7y agoWhat do you use for editing on mobile, for files synced by syncthing?
- jtsymon 7y agoI use orgzly [1] and configure it to "sync" to Syncthing's local folder [2] (which Syncthing then syncs). This requires write access to Syncthing's data directory though, so I'm not sure it works on stock Android. [1] http://www.orgzly.com/ http://www.orgzly.com/ [2] e.g. configure a "directory repository" with content://com.android.externalstorage.documents/tree/<device id>%3AAndroid%2Fdata%2Fcom.nutomic.syncthingandroid%2Ffiles%2FSync%2Forg
- scruple 7y ago> I'm not sure it works on stock Android. I'm running a stock Pixel 2 and I've been using syncthing to sync pictures and videos to my desktop automatically, but didn't know about Orgzly. I just hooked up Orgzly and syncthing and it worked without any issues. Thanks for commenting about orgzly!
- tdhttt 7y agoI just implemented something very similar last week! I store the note in a Raspberry Pi which I can access anywhere. Also with iOS shortcut, I can easily send note to my Pi from my iPhone's clipboard.
- kajmagnusmobile 7y agoHow can you access the Pi when you are not at home? It has a static IP? I've been thinking about this approach .. but was unsure about how access from outside, or if I'm abroad even.
- fadhlika 7y agofor selfhosted stuff, usually use VPN connected to home IP address using Dynamic DNS
- kajmagnusmobile 7y agoThanks, any special dynamic dns provider you like?
- Groxx 7y agoI'll toss in my setup too, which I started semi-recently and has been working well: In my .bash_profile I essentially just `open --background -e "...$(date +%F).txt" &`. Since I'm in the CLI daily for work, I get day-stamped files passively opened without having to think about it. It's a nice quiet reminder to keep notes throughout the day, and it all just goes into a folder in dropbox that I can trivially `grep` or add with other tools or add side-files (typically "date - stuff.ext" so they appear next to the day's notes).
- oso2k 7y agoI REALLY like this bash idea! Thanks!
- deleted 7y ago[deleted]
- bishalb 7y agoJust a thought but would't creating a new file for each year make it more maintainable? I can't imagine searching a 100k line file or scrolling through it.
- jannotti 7y agoSearching visually? Yes, 100k would be impossible. But then, even one year's worth would be impossible. So you're surely using your editor's search function, and that's definitely fast enough to not care whether you've got several lifetimes' notes. A do see a lot of people who are making date stamped files, but I can't understand why. Do you want to switch between using C-s vs dropping to command-line for grep?
- imtringued 7y agoMost editors allow searching all files in a directory.
- jannotti 7y agoIt's another function though, surely harder to reach for than the normal search. What's the value in bifurcating your searching process? What do you gain?
- kabdib 7y agoI find it useful to have everything in a single buffer, it makes searching easier. Otherwise I'd have to start issuing 'grep' commands and worry about which file is which, and get clever about regular expressions when all I want is instant, friction-free access with a handful of keystrokes. Opening a file that big doesn't take long on modern hardware. Honestly, there's not really anything to "maintain". Just a text file and some timestamps. No magic at all. Simple as dirt. That's the magic :-)
- bdamm 7y agoMine; the filename is today's date: alias notes='nvim echo ~/notes/notes-$(date +'%Y%m%d').md' The format being markdown gives a good syntax clue to vim.
- pssdbt 7y agoI'm similar, but with vimwiki. <leader>-w-<leader>-w will open an entry for today's date, so for me ~/vimwiki/diary/2020-02-08.md. `<leader>-w i` will show a list of all entries. Pretty convenient stuff. I have mine start with a template as well, with a few common headers.
- supersrdjan 7y agoI do this too but this article makes me think that it may be better if everything u was one file folding avoids visual clutter anyway
- herpderperator 7y agoBe careful about making a file like that -- one where you have to write the entire contents back to disk when you update it even though you only modified the last line or so -- too large. You're definitely better off splitting to give you more chances at not losing everything in the event that it gets corrupted. But I guess proper backups would also take care of that.
- racingmars 7y agoOften the "single text file" organization method is used along with a source control system like git to synchronize the file between different devices. So that helps with the backup/recovery aspect too.
- kabdib 7y agoThe "safe save" protocols that editors usually use to write file contents are pretty good. I've never worried about this and I've never lost a file to a mis-save, not in decades. I don't think it's a concern. And you need to make backups anyway.
- timothy-quinn 7y agoThat was the ethos behind the app I wrote, https://screwnotes.com https://screwnotes.com - I just wanted a note taking tool that syncs everywhere and I there's only one way to add items. I don't want to wait for a product to load, or to have to make any mental decisions about organisation, due dates, or relationships between items.
- azhenley 7y agoI like the idea but I wish your website showed me what the app looked like and a rough idea of what features were available before I create an account.
- timothy-quinn 7y agoHi, there have been some updates to it and the landing page does have a short explanation, but I agree - something a bit more interactive would probably be better. The app itself is something tightly coupled to having an account to operate (so no data is lost), but I might try adding in an interactive demo on the landing page so you get that feel of how it works straight away.
- geospeck 7y ago> it cracks open Emacs on the notes file, adds a timestamp, appends the optional text Do you mind sharing how you have setup Emacs to do that? Thanks!
- giansegato 7y agoUpvoted. Trying to setup that as well
- e19293001 7y agoI had been following some of the set-up from "Org Mode - Organize Your Life In Plain Text!"[0]. [0] - http://doc.norang.ca/org-mode.html http://doc.norang.ca/org-mode.html
- markc 7y agoThis isn't exactly what was asked for, but because I live in emacs I don't get much value being able invoke it from the command line. If that's ok, try this.. (defvar org-journal-file "~/Dropbox/org/engjournal.org" "Path to OrgMode journal file.") (defvar org-journal-date-format "<%Y-%m-%d %a %I:%M %p>" "Date format string for journal headings.") (defun org-journal-entry () "Create a new diary entry for today or append to an existing one." (interactive) (switch-to-buffer (find-file org-journal-file)) (widen) (let ((today (format-time-string org-journal-date-format))) (beginning-of-buffer) (unless (org-goto-local-search-headings today nil t) ((lambda () (org-insert-heading) (insert today) (insert " ")))) (beginning-of-buffer) (org-show-entry) (org-narrow-to-subtree) (end-of-buffer))) (global-set-key "\C-cj" 'org-journal-entry) So, C-cj will open the file, create a timestamp entry at the top, and narrow to the subtree. Great for creating timestamped notes. I keep a journal this way (multiple entries per day are fine), but it could be used for any note taking.
- qorrect 7y agoLove this. Running it outside of the file though is truncating my file though ?
- codesections 7y ago> it cracks open Emacs on the notes file, adds a timestamp, appends the optional text, and then I can just type or paste something in. Do you do that with a shell script or an elisp function? Either way, I'd be interested in taking a look at your implementation if you don't mind sharing.
- iscrewyou 7y agoThis is the best thing I’ve ever read. The answer has been right in front of my eyes. I’ve been searching for a good note/things to know/knowledge storage app for decades. And a single text file seems like the best option. I’ve already started transferring stuff today to a text file.
- kajmagnusmobile 7y agoWhat about the drawings or photos -- you have any way to connect them with the relevant daily notes?
- deleted 7y ago[deleted]
- progman32 7y agoWas inspired by this, threw together this hack for vim users. #! /usr/bin/env bash cd ~/share # or wherever echo >> notes.txt date >> notes.txt if [[ $# -ne 0 ]]; then echo $@ >> notes.txt fi vim "+normal Go" +startinsert notes.txt Enough to see if this will work for me. I also aliased this to something short so I can quickly view notes starting at the bottom: vim "+normal G" ~/share/notes.txt
- deleted 7y ago[deleted]
- ernie24 7y agoI also would like to use something similar but I wish to add new text on the top of the file (so oldest notes go to the bottom). I ended with something like this: nvim -c "+normal ggO# $(date)" -c ':s/$/\r/' -c 'se nohlsearch' notes.md Would be interested in knowing if I can make this nicer/more efficient.
- akouri 7y agoWhat do you do for when you're on the go? iOS?
- jdshaffer 7y agoI'm late to the conversation here as I've been pondering it for a few days. I'm not a very good programmer or a bash user, but I can usually understand a script when I see it. What script or bash alias are you using to do your "note (maybe some text here)"? I'd love to be able to do something similar.