update hedgedoc update scripts
This commit is contained in:
parent
0063600c66
commit
0628fc7bea
@ -4,9 +4,12 @@ server='https://live.kladjes.nl'
|
||||
main_index_id="tPb3Up1fQEuZ86yrJSkYRQ"
|
||||
|
||||
cli_url="https://raw.githubusercontent.com/hedgedoc/cli/refs/heads/master/bin/hedgedoc"
|
||||
hd_cli="./hedgedoc"
|
||||
# HEDGEDOC_SERVER="https://live.kladjes.nl"
|
||||
hd="$hd_cli"
|
||||
HEDGEDOC_SERVER="$server"
|
||||
if [ ! -f "./hedgedoc" ]; then
|
||||
curl $cli_url -o "./hedgedoc"
|
||||
chmod +x "./hedgedoc"
|
||||
fi
|
||||
. ./hedgedoc --import
|
||||
|
||||
function download_cli() {
|
||||
if [ ! -f "$hd_cli" ]; then
|
||||
@ -19,7 +22,7 @@ function get_md() {
|
||||
local note_id="$1"
|
||||
local out_path="$2"
|
||||
echo "get_md: '$note_id' '$out_path'"
|
||||
$hd export --md "$note_id" "$out_path"
|
||||
export_note --md "$note_id" "$out_path"
|
||||
}
|
||||
|
||||
function get_index() {
|
||||
@ -42,7 +45,5 @@ function get_index() {
|
||||
done
|
||||
}
|
||||
|
||||
download_cli
|
||||
|
||||
# mkdir -p "./out"
|
||||
get_index "$main_index_id" "./markdown"
|
||||
|
||||
@ -4,29 +4,25 @@ server='https://live.kladjes.nl'
|
||||
main_index_id="tPb3Up1fQEuZ86yrJSkYRQ"
|
||||
|
||||
cli_url="https://raw.githubusercontent.com/hedgedoc/cli/refs/heads/master/bin/hedgedoc"
|
||||
hd_cli="./hedgedoc"
|
||||
# HEDGEDOC_SERVER="https://live.kladjes.nl"
|
||||
hd="$hd_cli"
|
||||
|
||||
function download_cli() {
|
||||
if [ ! -f "$hd_cli" ]; then
|
||||
curl $cli_url -o "$hd_cli"
|
||||
chmod +x "$hd_cli"
|
||||
fi
|
||||
}
|
||||
HEDGEDOC_SERVER="$server"
|
||||
if [ ! -f "./hedgedoc" ]; then
|
||||
curl $cli_url -o "./hedgedoc"
|
||||
chmod +x "./hedgedoc"
|
||||
fi
|
||||
. ./hedgedoc --import
|
||||
|
||||
function get_md() {
|
||||
local note_id="$1"
|
||||
local out_path="$2"
|
||||
echo "get_md: '$note_id' '$out_path'"
|
||||
$hd export --md "$note_id" "$out_path"
|
||||
export_note --md "$note_id" "$out_path"
|
||||
}
|
||||
|
||||
function push_md() {
|
||||
local note_id="$1"
|
||||
local src_path="$2"
|
||||
echo "push_md: '$note_id' '$src_path'"
|
||||
$hd import "$note_id" "$out_path"
|
||||
echo "push_md: '$src_path' '$note_id'"
|
||||
import_note "$src_path" "$note_id"
|
||||
}
|
||||
|
||||
function get_index() {
|
||||
@ -49,7 +45,6 @@ function get_index() {
|
||||
done
|
||||
}
|
||||
|
||||
download_cli
|
||||
user_login --email kladjes@finnvanreenen.nl
|
||||
|
||||
# mkdir -p "./out"
|
||||
get_index "$main_index_id" "./markdown"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user