some enhancements
Closed this issue · 5 comments
@tomlockwood
added some enhancements in my fork: https://github.com/djwgit/dn
-
dno yesterday "add this note to yesterday"
-
dno tomorrow "a note for tomorrow"
-
dno +2 "a note for 2 days later"
-
dno -2 "a note for 2 days ago"
-
moved notes into a subfolder:
the notes folder can be auto-snyn'ed with some online services or into the repo (a private repo) -
install script: not copying dn script into .zshrc/.bashrc directly. add
source ~/dn/.dn
instead.
this way, when update dn functions, no need to update it in .zshrc/.bashrc
little bit big change, kind of personal preference, not planning a PR into your repo... but feel free to copy over part if makes sense to you.. thanks for this nice idea again...
Interesting! Sorry for my lack of attention, I'll have a look at this more closely soon. Thanks!
I learnt things from reading this code!
Also I did the environment variable thing after you - even using the same name DN_PATH
.
I should rename dnview
to dnv
.
The conditional logic for dno
and dnoe
is very cool.
I don't think clear
should be done first in dnv
- this seems like it may be unexpected to some users - and is not consistent with dnt
.
The "tomorrow" and "yesterday" detection is good - but I think it would appear to succeed if I accidentally mistyped as say dno yesty "hello friend"
and then I get a yesty.txt
. This could be hard to diagnose if I'm not observant. dno +1
is a lot less keystrokes, and I'd probably discard tomorrow
in favour of that.
I also am not sure that adding .txt
to filenames is something I'd do. Yes, it adds more semantic information, but I think that semantic information is already understood by the notes being in a folder. I can't think of a scenario it makes easier from the command line.
I think I should probably save the command used to generate the filename in an environment variable that we eval
- so it can be changed once and run everywhere.
Thanks heaps for your contribution!
- I changed to .txt, that makes the file viewable in onedrive web. otherwise, it could auto-sync to OneDrive, but could not view the content...
otherwise, dont want to have .txt extension name for sure... - one question, for dno, what "o" means here? just trying to understand it, make it easy to remember... :-)
- btw, I am adding a todo command, for managing TODOs,
so much fun and easy to use :-)
Awesome! A todo command sounds cool!
For dno
my thinking was it stood for "daily note other". Its not super clear though.
That txt extension now makes sense to me. Thanks again!
Thanks for your input!