2020-07-14 21:36:01 +10:00
#+TITLE : Cadmus ToDo List
* Main Executable
2020-07-15 01:08:18 +10:00
** TODO [#B] Add support for different configs
Basically I would like to be able to change the note directory to manage seperate knowledge bases, for example:
+ Personal Wiki
+ Static Site
+ Wiki for Project
+ School Project public knowledge base
etc.
This should be fed in as a ~-c~ option.
2020-07-15 01:14:19 +10:00
[[file:bin/cadmus::NOTES_DIR="~/Notes/MD" ## TODO Global Variables are bad ][Refer to this line here ]]
2020-07-14 21:36:01 +10:00
** Main Help
*** TODO [#C] Move Emojis
I should move the emojis to the end so that they don't interfere when using tty
2020-07-14 21:36:41 +10:00
*** TODO [#B] Should interactive elements of scripts be preserved and use the clipboard
As opposed to having no feedback and just operating on STDIN and STDOUT.
Could a similar effect be acheived using /tmp or /dev/shm?
*** TODO [#A] Should subscripts be exptected to be relative or absolute?
*** TODO [#A] Should the Notes directory be a global variable or an argument
2020-07-14 21:36:01 +10:00
**** TODO Should we set the Notes directory in a TOML?
see [[https://github.com/freshautomations/stoml ][the stoml package ]].
*** TODO Why do I keep getting Argument has no definition?
2020-07-14 21:37:43 +10:00
** Aliases
*** [#B] Readme
Add Recommended Aliases to the [[file:README.md::Recommended Aliases ][readme ]] as well as fish functions.
2020-07-14 21:03:09 +10:00
* SubFunctions
** TODO Restructure
should I restructure the subfunctions to accept only 1 argument either help or directory and fail in the absence of any given argument?
*** Pros
+ Much Simpler to implement and maintain
*** Cons
+ Less clean to pass in functions
+ Less Extensible
2020-07-17 00:14:49 +10:00
* WAIT Switch back to MDCat
When [[https://github.com/lunaryorn/mdcat/issues/155 ][this issue ]] is resolved switch back to MDCat
2020-09-06 17:22:11 +10:00
* TODO Add Dokuwiki Export
2020-09-06 15:30:06 +10:00
2020-09-06 17:22:11 +10:00
just like ~html-dir~ add ~dw-dir~ using this script:
2020-07-14 21:03:09 +10:00
2020-09-06 17:22:11 +10:00
- =~/bin/ImportHtml2Dokuwiki.sh=
2020-09-06 15:31:00 +10:00
2020-09-06 17:26:05 +10:00
* TODO Fix Media Wiki Export
The links in the html-dir export are absolute, a second pass is needed to make them relative, this will be necessary for everything except for self-contained stuff.
Make a seperate function for self contained and relative stuff.
Currently html-dir CANNOT be used to import into mediawiki because even thtough the files get pulled in the links are broken.
calling ~pandoc ./file.html --extract-media='./media' -o ./file.html~ is necessary to import a zip file into mediawiki.
2020-09-06 15:42:11 +10:00
2020-07-15 01:11:57 +10:00
* HOLD [#A] NoteFind.sh
2020-07-14 21:36:01 +10:00
** KeyBindings
*** TODO [#B] Should Implement keybindings for Exports
[[file:NoteFind.sh::ramtmp="$(mktemp -p /dev/shm/)" ][In the SkimAndGrep ]] function there should be export options for HTML mathml [fn: 1 ] as well as odt[fn: 2 ]
*** TODO [#C] Should call emacsclient not emacs
I should change the [[file:NoteFind.sh::--bind 'alt-v:execute-silent(code {}),alt-e:execute-silent(emacs {}),ctrl-o:execute-silent(xdg-open {})' \\ ][emacs call ]] to open ~emacsclient~ instead of ~emacs~
2020-07-15 00:41:55 +10:00
** DONE ~cadmus find~ Should print help when no arguments
Completed this by calling help and exiting if the arguments are empty in cadmus.
[[file:bin/cadmus::function NoteFind() { ][See here ]]
2020-07-15 01:09:59 +10:00
* TODO [#A] Search
2020-07-15 00:55:54 +10:00
** recoll should use seperate config
Recoll should be called with regard to a config, the idea being i could run:
+ =cadmus -c personal=
+ =cadmus -c uni=
+ =cadmus -c work=
and have different note bases
2020-07-15 16:18:18 +10:00
** TODO Pipe preview through ripgrep to highlight any occuring words.
Take the command query and change white spaces into =|= characters, this way search terms will be highlighted in matches.
2020-07-15 01:09:59 +10:00
* TODO [#A] tags
2020-07-16 06:37:31 +10:00
** TODO Standardise
These desperately need to be standardised like search and NoteFind have been
2020-07-16 07:35:35 +10:00
** TODO Move the scripts into PATH
Currently all the tag scripts call a relative script, not in the PATH, maybe this is actually OK? it means 0 install...
2020-07-16 08:33:05 +10:00
** TODO [#A] Add support for WikiJS Tags
2020-07-16 08:32:55 +10:00
WikiJS uses a broken yaml implementation but they can be extracted with some ripgrep, this should represent a further option in FilterNotesByTMSUTag.sh.
#+begin_src bash
rg --pcre2 '(?<=[---\n[\s\S]ags:).*[,\s|:\s][a-z]+' -t markdown -o | sd -s ':' ' ' | sd -s ',' ' ' | sed s/^/tmsu\ tag\ /
#+end_src
2020-07-16 07:35:35 +10:00
2020-07-15 01:09:59 +10:00
* TODO [#A] tools
2020-07-15 15:23:30 +10:00
** Link Markdown Notes
Should this do grep or recoll?
Probably grep just in case recoll ever brakes.
2020-07-16 09:03:23 +10:00
** TODO [#B] Link should really use NoteFind or NoteSearch
As opposed to using its own implementation.
2020-07-16 19:57:53 +10:00
** TODO [#C] All the tools should print to STDOUT
Cadmus should deal with the clipboard as a frontend, relying on scripts that
print to STDOUT, this will promote modularity.
2020-07-16 09:03:23 +10:00
** TODO [#C] If fixLink used skim not fzf I could remove a dependency
2020-07-16 09:33:17 +10:00
** TODO [#B] LinkMarkdown
If a notename that you point to (like choose from fzf) has the same name as a folder (think julia.md) then the link you get back is a fucking mess.
2020-07-16 09:37:39 +10:00
** TODO page-import
This doesn't work for $$, fix that.
2020-07-16 23:33:45 +10:00
** TODO Have tool to open random note
2020-07-16 09:03:23 +10:00
2020-07-15 01:09:59 +10:00
* TODO [#A] export
2020-07-16 23:33:45 +10:00
** TODO Should Be able to handle multiple markded selection
** DONE Should Exit on empty selection
Fixed this by changing this
#+begin_src bash
FILE="$(basename ${FILEPATH})"
#+end_src
to this
#+begin_src bash
[[ -f "${FILEPATH}" ]] && FILE="$(basename ${FILEPATH})" || exit 0
#+end_src
** TODO Exported Paths should be relative not absolute
2020-07-16 23:36:30 +10:00
I had some notes on my mediawiki that might help me figure this out.
2020-07-16 23:33:45 +10:00
** TODO Help Needs to reflect how it works
2020-07-15 01:09:59 +10:00
* TODO [#A] convert
* TODO [#A] misc
* TODO [#A] publish
* TODO [#A] preview
2020-07-16 08:50:00 +10:00
* TODO [#A] AutoComplete in Fish
[[https://stackoverflow.com/questions/20838284/how-can-i-provide-tab-completions-to-fish-shell-from-my-own-script ][See this Stack Answer ]]
* TODO [#A] Write a set of Fish Functions for Aliases
2020-07-14 22:29:10 +10:00
* Packaging
** TODO Make a Package
Use [[https://fpm.readthedocs.io/en/latest/source/dir.html ][FPM ]] to make multiple packages bundling everything together.
Consider also just using ~install --help~ and doing something [[https://www.reddit.com/r/archlinux/comments/4gsg9i/how_would_i_package_a_simple_bash_script/ ][like this ]] or [[https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=split2flac-git ][like this ]].
2020-07-15 00:41:55 +10:00
* Exit Codes
| Number | Description |
| 3 | File not found |
| 4 | directory not found |
| 5 | unrecognized option |
| 6 | Missing Dependency |
2020-07-14 22:29:10 +10:00
2020-07-15 00:41:55 +10:00
#+begin_quote
Exit Code Number ∉ {1, 2, 126, 127, 128, 130, 255}
#+end_quote
2020-07-14 21:36:01 +10:00
* Footnotes
[fn:2] This could so something like ~pandoc -o /tmp/myfile.odt; xdg-open /tmp/myfile.odt~
[fn:1] Think for using *Thunderbird*