Skip to content

Instantly share code, notes, and snippets.

@beauraines
Last active April 10, 2024 23:49
Show Gist options
  • Save beauraines/85a8e12572b19502f756bddf417578a8 to your computer and use it in GitHub Desktop.
Save beauraines/85a8e12572b19502f756bddf417578a8 to your computer and use it in GitHub Desktop.
Useful set of nb commands

Objective:

Date/Time:

:::::: {.columns .ragged} ::: column

Invited

  • Beau

::: ::: column

Attended

  • Beau

::: :::::

Summary

Agenda

  1. Review prior meeting action items

Prior Meeting Action Items

Notes

Action Items

  • [ ]
#!/bin/bash
#set -x
# Adds a note in edit mode in the default notebook, using a meeting notes template
TEMPLATE_URL=https://gist.githubusercontent.com/beauraines/85a8e12572b19502f756bddf417578a8/raw/2782b738744d8be06b68eebd521a4ac446e94b1c/meeting_notes_template.md
TITLE=$1
if [[ -z ${TITLE:+x} ]]; then
echo Title is not set
{ echo "# Meeting Title" ; echo ; echo ; curl -s $TEMPLATE_URL; } | nb add --edit &
else
echo Title is set to $TITLE
curl -s $TEMPLATE_URL | nb add --title "$TITLE $(gdate -I)" --edit &
fi
#!/bin/bash
set -x
FILE=$1
FILENAME=$(basename -- "$FILE")
OUTPUTFILE="${FILENAME%.*}".pdf
nb export pandoc $FILE --to=pdf --variable colorlinks=true --template eisvogel -o /tmp/$OUTPUTFILE

Export note to PDF

nb export pandoc <notebook>:<id> --to=pdf --variable colorlinks=true --template eisvogel -o /tmp/<filename>.pdf

Open nb note with Marked

cat $(nb ls 154 --paths --no-id --no-indicator) | open -f -a Marked\ 2

Start meeting notes from template

cat /tmp/meeting_notes_template.md | nb add --title "My meeting title" --tags ms-cloud --edit

curl https://gist.githubusercontent.com/beauraines/85a8e12572b19502f756bddf417578a8/raw/2782b738744d8be06b68eebd521a4ac446e94b1c/meeting_notes_template.md | nb add --title "meeting" --edit

PDF slide to Image

pdftk Virtual\ CSM\ Course\ Slides-A\ Druckman\ 3-2020\ \ PRINTABLE.pdf cat 15 output - | convert -density 300 - -resize 25% Slide_15.png ; nb import Slide_15.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment