diff --git a/404.html b/404.html index 5d8c252..e1d7e27 100644 --- a/404.html +++ b/404.html @@ -215,6 +215,30 @@ + + + + + +
  • + + New Note + +
  • + + + + + + + +
  • + + Print Web Title + +
  • + + diff --git a/Tools/New.html b/Tools/New.html index ffa27bc..e3ee04a 100644 --- a/Tools/New.html +++ b/Tools/New.html @@ -231,6 +231,30 @@ + + + + + +
  • + + New Note + +
  • + + + + + + + +
  • + + Print Web Title + +
  • + + @@ -357,13 +381,13 @@ - diff --git a/tags/create.html b/tags/create.html index c992a22..a73ae53 100644 --- a/tags/create.html +++ b/tags/create.html @@ -220,6 +220,30 @@ + + + + + +
  • + + New Note + +
  • + + + + + + + +
  • + + Print Web Title + +
  • + + diff --git a/tools/New.html b/tools/New.html new file mode 100644 index 0000000..c0fe758 --- /dev/null +++ b/tools/New.html @@ -0,0 +1,568 @@ + + + + + + + + + + + + + + + + + + New + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + Skip to content + + +
    +
    + +
    + +
    + +
    + +
    + + + + + + +
    +
    + + +
    +
    +
    + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    + + + + + + +

    New Note

    + +
    +

    Note

    +

    Start this with cadmus tools new

    +
    +

    What does it do

    +

    This provides a dialog that sets the title, heading and filename of a note, offers tags to apply and offers fuzzy search for the appropriate directory to save the note in.

    +

    How Do I use it

    +

    After running the command multiple tags will be displayed, filter the tags by typing and use Tab to selet multiple tags and Enter to continue.

    +

    Next a directory list will be presented, search through the directories by typing in the name of a directory.

    +

    Finally a dialog to type in a name for the title, heading and filename (which will be made to be identical) will be offered, type in title:

    +
      +
    • Spaces are fine
    • +
    • No extension
    • +
    +

    The file name will be slugified with - and the extension .md will be applied.

    +

    When Would This Be Used

    +

    This is great when you want to quickly make a new note in the right place with the right tags.

    +

    Example

    +

    +

    How does it Work

    +

    This just uses TMSU and Skim to choose the directories and tags.

    + + + + + + + + + +
    +
    +
    +
    + + + + +
    + + + + + + + + + + + \ No newline at end of file diff --git a/tools/webtitle.html b/tools/webtitle.html new file mode 100644 index 0000000..d1313f0 --- /dev/null +++ b/tools/webtitle.html @@ -0,0 +1,580 @@ + + + + + + + + + + + + + + + + + + Web Title + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + Skip to content + + +
    +
    + +
    + +
    + +
    + +
    + + + + + + +
    +
    + + +
    +
    +
    + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    + + + + + + +

    Print Web Title

    + +
    +

    Note

    +

    Start this with cadmus tools webtitle

    +
    +

    What does it do

    +

    This transforms a URL in the clipboard into a formatted link

    +

    How Do I use it

    +

    Copy / Paste a URL then type cadmus tools webtitle, the clipboard should be transformed into a formatted link with the right title.

    +

    When Would This Be Used

    +

    This is great for footnotes.

    +

    Example

    +

    +

    How does it Work

    +

    So essentially this just uses skim and bat to filter/preview the notes, the interactive command is used with ripgrep and piping (that took me forever to figure out!!) to highlight the match in the preview.1 This is the code that achieves it:

    +
            sk -m -i -c 'recoll -b -t -q "ext:md" {}                 |\
    +                cut -c 8- | sed s/^/realpath\ \"/                     |\
    +                sed s+\$+\"\ --relative-to\ \"./\"+ | bash'            \
    +            --bind pgup:preview-page-up,pgdn:preview-page-down    \
    +            --preview "bat --color=always --line-range :500           \
    +                    --terminal-width 80 --theme=TwoDark {+}           \
    +                    --italic-text=always                              \
    +                    --decorations=always"                             \
    +            --color=fg:#f8f8f2,bg:-1,matched:#6272a4,current_fg:#50fa7b,current_bg:#381070,border:#ff79c6,prompt:#bd93f9,query:#bd93f9,marker:#f1fa8c,header:#f1fa8c
    +
    + +
    +
    +
      +
    1. +

      This highlighting works with both bat and MDCat, I prefer MDCat but there is a bug with footnotes preventing me from being able to use it right at the moment. 

      +
    2. +
    +
    + + + + + + + + + +
    +
    +
    +
    + + + + +
    + + + + + + + + + + + \ No newline at end of file