Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
xHayden committed Nov 28, 2023
2 parents b2e1592 + 0b8fff1 commit 03fd01f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ Update: It's [on the obsidian plugin store](https://obsidian.md/plugins?search=m

Obsidian is almost entirely run locally, so uploading images just saves them to your Obsidian vault. It doesn't create a url on Obsidian's servers like Notion does. So, if I take a screenshot and want it in my flashcards, I have to find a URL that hosts that image.

One of the more annoying things about MacOS, coming from Windows, is that the screenshot utilities are just not as good as [ShareX](https://getsharex.com/). A few years ago, I wrote code for a custom image hosting endpoint at [img.hayden.gg](img.hayden.gg). ShareX allows me to take screenshots and automatically send them to my image server to be processed and then sends me back the image url as a response. Isn't that amazing? As far as I can tell, there's no MacOS app that does quite the same for free. But that's exactly what I need!
One of the more annoying things about MacOS, coming from Windows, is that the screenshot utilities are just not as good as [ShareX](https://getsharex.com/). A few years ago, I wrote [code for a custom image hosting endpoint](https://github.com/xHayden/lightweight-img-host) at [img.hayden.gg](img.hayden.gg). ShareX allows me to take screenshots and automatically send them to my image server to be processed and then sends me back the image url as a response. Isn't that amazing? As far as I can tell, there's no MacOS app that does quite the same for free. But that's exactly what I need!

So, to deal with this issue, I thought of an alternative. I could just use a quick script to read my screenshots folder and upload whatever's there to my image server! I asked ChatGPT to write a script to do just that and it worked (after some trial and error). Now, all I have to do is take a screenshot with the default MacOS screenshot utility and the URL is sent to my clipboard. Yay!

Now, I simply take a screenshot, the url gets added to my clipboard, and I add the image to my note with Markdown. So cool!

![Image upload to clipboard](https://img.hayden.gg/2332c5b9bc331ba80db482f0abf57821.gif)

The server code and script code will be published here once I make it presentable 🤪
[MacOS Screenshot Script](https://github.com/xHayden/lightweight-img-host/blob/main/screenshot_sync.py)

## Conclusion: My New Setup

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dev:11ty": "eleventy --watch",
"dev:css": "tailwindcss -i blog/assets/css/tailwind.css -o _site_blog/assets/css/tailwind.css --watch --postcss",
"dev:server": "node dev-server.js",
"dev": "npx tinacms dev -c 'npm run dev-link'",
"dev": "npx tinacms dev -c \"npm run dev-link\"",
"dev-link": "run-p dev:*",
"build:11ty": "eleventy",
"build:css": "tailwindcss -i blog/assets/css/tailwind.css -o _site_blog/assets/css/tailwind.css --postcss",
Expand Down

0 comments on commit 03fd01f

Please sign in to comment.