
Ask HN: Any advice for note/scratchpad/idea dumping during the day? - mtc2018
I find that during a normal day, besides just straight programming, I&#x27;ll need to run sql, create a quick report, jot down an error message, create several small cli scripts, etc.  All of which end up in a big mess typically in a single editor(some gui-notepad like gedit), left open and unsaved in multiple tabs for later reference until the day my battery runs out.  Then I&#x27;m pretty much sol if I ever need to reference those from then on.<p>I&#x27;m wondering if anyone has a good process that has worked for them to control this in a somewhat automated way.  I understand it&#x27;s partly my fault for being lazy and not saving my notes, but I&#x27;m looking for a system that could keep a daily&#x2F;weekly scratchpad-type git repo that I can easy search and always have up and ready when I need to dump in something.  What do you guys use for dumping various info&#x2F;data&#x2F;code like this that may or may not be used in the future?
======
yesenadam
A bash script for a note-taker was given here:
[https://news.ycombinator.com/item?id=18902255](https://news.ycombinator.com/item?id=18902255)
based on the one here
[https://news.ycombinator.com/item?id=16358837](https://news.ycombinator.com/item?id=16358837)
Thanks for the motivation! I incorporated some improvements -

My version, n: 'n' displays notes with less, 'n [your text here]' to enter a
line of text, 'n i' to enter input mode, where input continues until Ctrl-D.
'n date' adds date. 'n cat' prints notes. 'n -h' shows commands.

    
    
        #! /bin/bash #n note-taker
        fpath=$HOME/notes.txt
        [[ -e "$fpath" ]] || touch "$fpath" #create file if doesn't exist
        if [ "$1" == "cat" ]; then
            cat "$fpath"
            exit 0
        elif [ "$1" == "rg" ]; then
            rg "$2" "$fpath"
        elif [ "$1" == "nano" ]; then
            nano "$fpath"
        elif [ "$1" == "--help" ] || [ "$1" == "-h" ]; then
            printf '\n    n \t\t\t- display notes
        n --help\t\t- display this help
        n date\t\t- add date row to notes
        n <text>\t\t- add new entry
        n i \t\t- input mode, end input with ^D
        n cat\t\t- print notes using cat
        n rg <pattern>\t- ripgrep notes
        Use #tags (for easier grepping).\n\n'
        elif [ "$1" == "date" ]; then {
            echo
            echo '# '$(date +"%d-%m-%Y - %T")
        } >> "$fpath"
        elif [ "$1" == "" ]; then
            less +G "$fpath"
        elif [ "$*" == "i" ]; then {
            echo 
            while read line
            do 
                echo $line 
            done
        } >> "$fpath"
        else {
            echo
            echo "$@"
        } >> "$fpath"
        fi

------
yesenadam
One of (I assume) many Asks on this: Favorite note-taking software?
[https://news.ycombinator.com/item?id=17532094](https://news.ycombinator.com/item?id=17532094)

------
rcoder26
[https://www.giuspen.com/cherrytree/](https://www.giuspen.com/cherrytree/)

------
x0hm
Build yourself a command line app that saves your tasks.

Start small and iterate on it until it's what you need.

------
rcoder26
Use cherry tree

------
mimixco
Trello would certainly work.

