move from work dir
This commit is contained in:
14
marsh/fromzk.fish
Executable file
14
marsh/fromzk.fish
Executable file
@ -0,0 +1,14 @@
|
||||
for i in (fd '0.*' ~/sparkleup/zk/writing/post-self/marsh/)
|
||||
set o (echo $i | sed -e 's/.\+marsh\///')
|
||||
set d (echo $o | sed -e 's/[0-9x]\+.md//')
|
||||
set t (echo $o | sed -e 's/\.md/.tex/')
|
||||
echo "$o $d"
|
||||
if not test -d src/$d
|
||||
mkdir -p src/$d
|
||||
end
|
||||
if not test -d content/$d
|
||||
mkdir -p content/$d
|
||||
end
|
||||
cp $i src/$o
|
||||
pandoc -f markdown -t latex src/$o --wrap=none --top-level-division=chapter | sed -e 's/\\chapter/\\chapter*/' | sed -e 's/---/—/g' > content/$t; \
|
||||
end
|
||||
Reference in New Issue
Block a user