As a way of not using so much paper in keeping daily notes on existence as well as technical notes, I created a folder in ~/ [home directory] called notes.
Before listing the details that should be placed in .bashrc (.profile if on a Mac - see
this link), I will explain its usage so you might determine whether or not you would appreciate such a simple method of keeping a digital diary. This will not work in Microsoft Windows without "cygwin", or - better still "
Linux Bash Shell on Windows 10 ".
It needs the UNIX-like bash capabilities.
I type the command,
notes, at the command line.
Then I begin typing my notes. When done I press enter a couple times for some blank lines. Then I press Ctrl+D which takes me back to the command line prompt.
No need for an editor or word processor. Another few tips will also allow you to search for content. This is a very grass roots solution, which is why I like it - very minimalistic. If you need to edit what you typed, you can open as a text file with your editor of choice (nano, emacs, or any word processor such as LibreOffice Writer).
----------------------------------------------------------------------------
OK. Now, the basics:
In ~/.bashrc (or your .profile in Mac), you would replace /home/mwh/notes with the path on your machine.
alias notes='cd /home/mwh/notes && date +%c | cat >> `date +%F` ;
cat >> `date +%F` ; echo | tac >> `date +%F`'
[thanks
Tami]
________________________________________________________________
If you want to be able to search your notes with a command, "wherein," add the following to the .bashrc (or .profile):
wherein ()
{
for i in $(find "$1" -type f 2> /dev/null);
do
if grep --color=auto -i "$2" "$i" 2> /dev/null; then
echo -e "\033[0;32mFound in: $i \033[0m\n";
grep --color=always -in "$2" "$i" {} 2>/dev/null +
fi;
done
}
---------------------------------------------------------------------------
example:
wherein ~/notes "mathematics"
would print on the screen what it finds and where:
Found in: /home/mwh/notes/2017-07-02
/home/mwh/notes/2017-07-02:215:Well, another day filled with studying mathematics. The money I invested in this extensive library symbolizes my commitment to revisiting high school and undergraduate mathematics curriculum. It sometimes seems impossible that I will be able to continue to devote all these hours to such rigorous study over the next five to ten years, but I am doing it.
/home/mwh/notes/2017-07-02:231:I will not even attempt to plan how long that will take or how I will proceed. My hope is also to put some attention into the advanced mathematics of writing proofs and experiment with a great deal of computational physics.
/home/mwh/notes/2017-07-02:239:I am actually very proud of myself for having the courage to re-learn high school mathematics, taking the approach of those who had taken part in "New Mathematics" - using axioms, set builder notation, formality, and rigor.
---------------------------------------------------------------------------------------
This solution allows me to ramble on and repeat things without wasting paper or wasting other peoples attention on a message board or blog.
_________________________________________________________________
Note: If you don't want to mess around with defining "wherein()" in your .bashrc file or .profile, there is "ack" which does the same thing.
You can find the version for your operating system at
BEYOND GREP. (for Micronuts Windows, you need to first install
chocolately and then choco install ack
It's a cool way to search for text within files.
Like I said, it takes the same arguments at the command line as our above self-defined function, wherein(), but in different order.
ack "Schopenhauer" ~/websites/whybother
____________________________________________________________
For Windows users, you may prefer install
jrnl.sh. I tried with
pip install jrnl as well as downloading source "jrnl-master" and running
pyhton setup.py install in the jrnl-master directory, but it still did not run.
So, as I am sometimes in Windows to use TI-Nspire Software, I am going to try to get some kind of command line digital diary working there as well.
I will tinker around with
Linux Bash Shell on Windows 10 and see what I can learn.
-------------------------------------------------------------------
For Linux Bash on Windows 10 users:
Your .bashrc is in the directory you land in after typing cd ~
It should be /root if you installed with lxrun /install /y in cmd.exe (with administrative priviledges).
Add this to .bashrc then "source .bashrc":
alias notes='cd /mnt/c/Users/YourNameHere/notes && cat >> `date +%F` && date +%c | tac >> `date +%F`'
Of course, you would want to update that folder regularly to be sure it is in sync with other operating systems. Sorry Holden. I know this all sounds like it is not worth the trouble, and you could just type your notes into a word processor.
I just like the idea of being able to do this.
--------------------------------------------------------------------------------------
Until then, Holden, if you are using Mac OSX, there should not be a problem with the simple method I mention at the start of this post, of placing in .profile
alias notes='cd /home/mwh/notes && date +%c | cat >> `date +%F` ;
cat >> `date +%F` ; echo | tac >> `date +%F`'PS: Don't think I have abandoned the
horror of existence theme. I'm just losing myself in math and computing. That's all I can do. I also ordered some Gingko Biloba for my brain and Tumeric for the body's little aches and pains.
Rereading this post, I see that, especially when I am trying to leave precise technical instructions, unless someone were actually interested in doing this, it must appear to be so much gibberish. When it works, it's like magic.