A shared note from Juhis

Note share demo

This demonstration note is for internal testing and demoing of https://share.hamatti.org functionality.

It can show code

function shareNote(editor: Editor) {
	const file = editor.file;
	if (!file) {
		new Notice('No file open to share');
	}

	const path = `${file.vault.adapter.basePath}/${file.path}`;
	const filename = crypto.randomUUID().split('-')[0];
	const outpath = `/Users/juhis/code/share.hamatti.org/notes/${filename}.md`;

	exec(`/usr/local/bin/,share_note "${path}" "${outpath}"`, handleExecOutput);

	let proc = spawn('pbcopy');
	proc.stdin.write(`https://share.hamatti.org/notes/${filename}`);
	proc.stdin.end();
}

and images get copied over from the original notes.

(photo by Kedar Gadge on Unsplash)

And I'm quite satisfied with the styling of my blockquotes

“I've learned that people will forget what you said, people will forget what you did, but people will never forget how you made them feel.” — Maya Angelou