Replies: 3 comments
-
If I may ask, what actual command structure did you use for your -o command to manually put it into your vault? |
Beta Was this translation helpful? Give feedback.
-
bumping this -- as I have the same issue/question. Is the .env naming convention still the same as several months ago? FABRIC_OUTPUT_PATH with the destination in quotes? I'd also like it to save to my Obsidian directory. I suppose if it currently isn't possible - to just have a cron job that files .md files in the working directory and moves them over to my Obsidian vault directory. No rush, just curious. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I have just solved this with adding the following into # Define the base directory for Obsidian notes
obsidian_base="/path/to/obsidian"
# Loop through all files in the ~/.config/fabric/patterns directory
for pattern_file in ~/.config/fabric/patterns/*; do
# Get the base name of the file (i.e., remove the directory path)
pattern_name=$(basename "$pattern_file")
# Define a function dynamically for each pattern
eval "
$pattern_name() {
local title=\$1
local date_stamp=\$(date +'%Y-%m-%d')
local output_path=\"\$obsidian_base/\${date_stamp}-\${title}.md\"
# Check if a title was provided
if [ -n \"\$title\" ]; then
# If a title is provided, use the output path
fabric --pattern \"$pattern_name\" -o \"\$output_path\"
else
# If no title is provided, use --stream
fabric --pattern \"$pattern_name\" --stream
fi
}
"
done What this does it creates aliases for all the commands so that you can just use: If you pass in a title for example |
Beta Was this translation helpful? Give feedback.
-
So I'm on the fabric 2.0, Windows, and the save command is not working.
The -o command works but its kinda annoying to always put the full path to the file (obsidian vault).
Here is the question: In the terminal, is there a way so that i can call a variable for the path and only input the name i want for the file ??
Thx for helping !!
(btw, I'm a newbie when it comes to coding)
Beta Was this translation helpful? Give feedback.
All reactions