Files
dotfiles/.local/bin/setup/setupjoplin

31 lines
763 B
Plaintext
Raw Normal View History

2021-05-23 20:32:50 +01:00
#! /bin/bash
TOWER=$(enpasscli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort show "Scarif: Tower" 2>&1)
TOWERUN=$(echo "$TOWER" | grep -Po "(?<=login: )\w+")
TOWERPW=$(echo "$TOWER" | grep -Po "(?<=pass : ).+(?=\")")
2021-06-13 11:43:14 +01:00
path="https://tower.scarif.space/remote.php/dav/files/chris/Joplin"
2021-05-23 20:32:50 +01:00
joplin config sync.target 5
2021-06-13 11:43:14 +01:00
joplin config sync.5.path "$path"
2021-05-23 20:32:50 +01:00
joplin config sync.5.username "$TOWERUN"
joplin config sync.5.password "$TOWERPW"
2021-06-14 22:27:12 +01:00
joplin sync
2021-06-13 11:43:14 +01:00
2021-06-14 22:27:12 +01:00
# echo "$path" | xclip -selection clipboard -i
2021-06-13 11:43:14 +01:00
2021-06-14 22:27:12 +01:00
# joplin-desktop &
2021-06-13 11:43:14 +01:00
2021-06-14 22:27:12 +01:00
# clipnotify
2021-06-13 11:43:14 +01:00
2021-06-14 22:27:12 +01:00
# echo "$TOWERUN" | xclip -selection clipboard -i
2021-06-13 11:43:14 +01:00
2021-06-14 22:27:12 +01:00
# clipnotify
2021-06-13 11:43:14 +01:00
2021-06-14 22:27:12 +01:00
# echo "$TOWERPW" | xclip -selection clipboard -i
2021-06-13 11:43:14 +01:00
2021-06-14 22:27:12 +01:00
# read -n 1 -r -s -p $'Press enter when you have synced Joplin...\n'
2021-06-13 11:43:14 +01:00
2021-06-14 22:27:12 +01:00
# echo "" | xclip -selection clipboard -i
2021-06-13 11:43:14 +01:00