Usando Quartz e Cloudflare Pages . É uma boa alternativa gratuita ao Obsidian Publish .
Shell no diretório do projeto de notas públicas para rodar o script que faz a copia dos arquivos do vault original para o projeto de notas públicas.
O arquivo copy_from_vault.py
descrito abaixo faz a rotina de copiar os arquivos do meu vault de origem do Obsidian para o diretório content
do meu projeto no Quartz .
#!/bin/bash
# Run the Python script
/usr/bin/python3 /Users/my-user/project/copy_from_vault.py
# Check if the Python script executed successfully
if [ $? -eq 0 ]; then
echo "Python script executed successfully."
# Add all changed files to the Git commit index
git add .
# Commit the changes with a message
git commit -m "Automated commit: changes after running copy_from_vault.py"
# Push the changes to the origin remote
git push origin
else
echo "Python script execution failed."
fi
Exemplo de plist para execução de shell:
<? xml version = "1.0" encoding = "UTF-8" ?>
<! DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
< plist version = "1.0" >
< dict >
< key >Label</ key >
< string >com.alisson.publicnotes</ string >
< key >ProgramArguments</ key >
< array >
< string >/Users/my-user/run.sh</ string >
</ array >
< key >StartCalendarInterval</ key >
< array >
< dict >
< key >Hour</ key >
< integer >9</ integer >
< key >Minute</ key >
< integer >35</ integer >
</ dict >
< dict >
< key >Hour</ key >
< integer >10</ integer >
< key >Minute</ key >
< integer >0</ integer >
</ dict >
< dict >
< key >Hour</ key >
< integer >13</ integer >
< key >Minute</ key >
< integer >0</ integer >
</ dict >
< dict >
< key >Hour</ key >
< integer >18</ integer >
< key >Minute</ key >
< integer >0</ integer >
</ dict >
< dict >
< key >Hour</ key >
< integer >20</ integer >
< key >Minute</ key >
< integer >0</ integer >
</ dict >
</ array >
< key >StandardOutPath</ key >
< string >/tmp/com.alisson.publicnotes.out</ string >
< key >StandardErrorPath</ key >
< string >/tmp/com.alisson.publicnotes.err</ string >
< key >UserName</ key >
< string >my-user-name</ string >
</ dict >
</ plist >