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