akosbalasko / yarle Public
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_resources - hardcoded path, wikilinks, Obsidian #242
Comments
|
For now, I did the poor man's solution... a bash script that post-processes the output: setup
usage e.g.cd /path/to/outputDir/converted/notes/Note Export/
yarle-postprocess.sh "<filename.md>"script#!/usr/bin/env bash
if [ ! -e "$1" ]; then
echo "$1 not found"
exit 1
fi
shopt -u nullglob
mkdir -p './attach'
for f in ./_resources/unknown_filename*; do
echo "processing $f"
hash=$(md5 -q "$f")
sed -i.bak "s#\!\[\[$f#\!\[\[${hash}.png#g" "$1"
cp -f "$f" "./attach/${hash}.png"
done
shopt -s nullglob |
|
Hi @luckman212 , good to see you here! Huh you've got many feat. requests, great! It looks I'll have time to implement them today. |
|
@akosbalasko thanks for the reply. Yes I agree with making As for hash values as filenames. I am suggesting that ONLY if the resulting filename would have been "untitled.x.png" since that is non-descript and also results in many collisions since every note export would share the same filename. So using the hash would avoid this. See https://github.com/derwish-pro/obsidian-unique-attachments for more about that... |
|
@luckman212 , okok, I get it. |
|
Hi @luckman212 , I created separate stories for your feature requests: So let me close this one, I'll update them according to the progress. |
hey @akosbalasko👋
I'm using Yarle to bring content from Evernote into Obsidian.
Since Obsidian uses wikilinks formatting for attachments:
![[attachment-name]]and does not require a path prefix, I am wondering a few things:_resourcesis a hardcoded path prefix for attachments. Any way to move this to a config option?![[filename.2.png]]instead of![[./_resources/filename.2.png]]would save a lot of hand-editing afterward"unknown_filename.1.png","unknown_filename.2.png"etc. These always have to be renamed and again hand-edited in the md file. Instead of using"unknown_filename-*"could it instead just generate a md5 hash and use that as its reference? This would eliminate the need for renaming/editing and also avoid collisions.If you don't have time for this I can certainly take a crack at it but I should warn you, I've been working with TypeScript for about 5 hours😱
The text was updated successfully, but these errors were encountered: