logseq-to-org-roam/add_title
2024-04-20 09:53:57 +00:00

9 lines
172 B
Bash
Executable file

#!/bin/bash
graphdir=$1
pagepath=$(sed 's/^\///' <<<"${2#"$graphdir"}")
title=${pagepath%.org}
echo "#+title: $title" > "$2".temp
cat "$2" >> "$2".temp
mv "$2".temp "$2"