aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoott <joshott16@gmail.com>2026-01-26 16:57:46 -0500
committerjoott <joshott16@gmail.com>2026-01-26 16:57:46 -0500
commit4b56db7b3d851ac1732ed27381eb6bf64335762a (patch)
tree245d407b6058d7d51ea4b193a88cd16bca6d5a21
parent175a2bdafc838a403d6dc138235f42af3be014ce (diff)
downloadbin-4b56db7b3d851ac1732ed27381eb6bf64335762a.tar.gz
bin-4b56db7b3d851ac1732ed27381eb6bf64335762a.zip
recordings and notes
-rwxr-xr-xget_recordings13
-rwxr-xr-xnotepicker35
2 files changed, 23 insertions, 25 deletions
diff --git a/get_recordings b/get_recordings
index 23dfdba..6f71d52 100755
--- a/get_recordings
+++ b/get_recordings
@@ -1,11 +1,14 @@
+#!/usr/bin/env bash
+
convert_audio () {
- target_dir=$HOME/Documents/recordings
+ target_dir=$HOME/nextcloud/recordings/$2/
filename="$(date -r $1 +%F_%T.mp3 | tr ':' '-')"
- ffmpeg -i $1 $target_dir/$filename
- rip $1
+ ffmpeg -n -v 8 -i $1 $target_dir/$filename
}
export -f convert_audio
-sudo mount -o uid=1000,gid=1000 /media/rec
-find /media/rec -name \*.WMA -exec bash -c 'convert_audio "{}"' \;
+sudo mount --onlyonce -o uid=1000,gid=1000 /media/rec
+find /media/rec/DSS_FLDA -name \*.WMA -exec bash -c 'convert_audio "{}" music' \;
+find /media/rec/DSS_FLDB -name \*.WMA -exec bash -c 'convert_audio "{}" bird' \;
+find /media/rec/DSS_FLD{C,D,E} -name \*.WMA -exec bash -c 'convert_audio "{}" other' \;
sudo umount /media/rec
diff --git a/notepicker b/notepicker
index f9edeb8..c7a77df 100755
--- a/notepicker
+++ b/notepicker
@@ -3,35 +3,30 @@
# I love picking my notes
# pass in notes directory as parameter
-NOTEDIR=$1
-SUFFIX=''
opennote () {
- kitty --directory $NOTEDIR$SUFFIX nvim "$notefile"
-}
-
-journal () {
- cd journal
- SUFFIX=/journal
- choice=$(echo -e "New\n$(ls -t1 *.md)" | rofi -dmenu -p "Entries") || exit 0
-
- case $choice in
- New) notefile=$(date +%F_%T.md | tr ':' '-'); opennote ;;
- *.md) notefile=$choice; opennote ;;
- *) exit 0 ;;
- esac
+ kitty --directory $PWD nvim "$notefile"
}
pick () {
- cd $NOTEDIR
- choice=$(echo -e "Journal\n$(ls -t1 *.md)" | rofi -dmenu -p "Notes") || exit 0
+ options="$(ls -td1 */)"
+ if [[ -n "$options" ]]; then
+ options="$options\n"
+ fi
+ options="$options$(ls -t1 *.*)"
+
+ choice=$(echo -e "$options" | rofi -dmenu -p "Notes") || exit 0
case $choice in
- Journal) journal ;;
- *.md) notefile="$choice"; opennote ;;
- *!) notefile="$(echo $choice | tr -d '!').md"; opennote ;;
+ %) notefile=$(date +%F_%T.md | tr ':' '-'); opennote ;;
+ *!/) dirname="$(echo $choice | sed 's/\(.*\)!\//\1/')"; mkdir $dirname; cd $dirname; pick ;;
+ *!t) notefile="$(echo $choice | sed 's/\(.*\)!t/\1/').txt"; opennote ;;
+ *!) notefile="$(echo $choice | sed 's/\(.*\)!/\1/').md"; opennote ;;
+ */) cd $choice; pick ;;
+ *.*) notefile="$choice"; opennote ;;
*) exit 0 ;;
esac
}
+cd $1
pick