pratik
pratik

The ideal photo upload to Micro.blog for my workflow would start in Drafts, use an Action to select photo(s), generate alt text with AI, upload it/them to Micro.blog, and then paste the Markdown with alt text at the cursor in Drafts.

I currently have two separate actions/shortcuts for doing this.

|
Embed
jsonbecker
jsonbecker

@pratik all this does is make me sad again that MarsEdit doesn’t exist for iOS.

|
Embed
petebrown
petebrown

@jsonbecker 💯

|
Embed
pratik
pratik

@jsonbecker Now that Black Ink is on iOS, let’s give @danielpunkass another 10 years for MarsEdit ☺️

|
Embed
the
the

@ddanielson @jsonbecker Yes! +1!

|
Embed
Denny
Denny

@the @ddanielson @jsonbecker @pratik It's not MarsEdit but iA Writer is an excellent option for easy publishing of posts with photos.

|
Embed
pratik
pratik

@Denny I’ve to check out iA Writer again but say more about the photos workflow

|
Embed
Denny
Denny

@pratik If one is using iA Writer to write a post it's as simple as tapping the Command Keyboard button (onscreen shortcut) which has an option to add a photo to the current document. That brings up the Photos chooser. That will insert the photo. Done. Unfortunately it only allows one photo at a time.

It's possible to then just publish the draft straight to micro.blog and it will bring up the draft ready to edit in browser.

The only downside of this method is that there is no setting for the save location or quality size of the saved image on the local device. It just places a jpeg into the same directory as the text file you are editing.

|
Embed
pratik
pratik

@Denny How about alt text?

|
Embed
pratik
pratik

@Denny I'm using the Mac version, and I can't see any ability to add images. I'm on version 7.0.6

|
Embed
Denny
Denny

@pratik Looks like they suggest this: ia.net/writer/su...

|
Embed
pratik
pratik

@Denny Ugh! No. That’s why I left WordPress.

|
Embed
Denny
Denny

@pratik Oh, I don't think it's anything like Word Press content blocks. I could be wrong but if it's anything like the iPad it would be just drag and drop from the Finder or Photos app into the document? Or if you want to keep things organized in an images folder or something just type in the path. It looks flexible. On my iPad I use the button shortcut they provide or just type in the Markdown as needed: ![alt text](image.jpeg). I'm surprised they don't offer the similar shortcuts on the Mac but I can't test.

|
Embed
jarrod
jarrod

@pratik I've got this exact workflow using a series of shortcuts and one action that kicks off the shortcuts:

Happy to assist in getting it set up too if you try it and want any help.

|
Embed
pratik
pratik

@jarrod Really? How have I missed this? I’ll look at this tomorrow on the Mac and yup, I’ll reach out for help.

|
Embed
jarrod
jarrod

@pratik It’s not something I’ve posted about because I’ve only recently gotten it all working right, and it’s not super polished yet. But it works!

|
Embed
In reply to
pratik
pratik

@jarrod Cool! Didn’t know you were dabbling with Drafts Actions too

|
Embed
jarrod
jarrod

@pratik “Dabble” is the right verb. This one was fun to do a few years ago.

|
Embed
pratik
pratik

@jarrod Nice. Installed.

|
Embed
esamecar
esamecar

@jarrod @pratik I really need to learn javascript, especially since Obsidian is another app where it could really help. But where to start? 🤔

|
Embed
jarrod
jarrod

@esamecar If you find out, let me know! I just stumble my way through with many web searches.

|
Embed
esamecar
esamecar

@jarrod Sorry, I'm afraid if you haven't already figured it out, it will be impossible for me to do so 🤷‍♂️😆

|
Embed
pratik
pratik

@jarrod Not working. I downloaded the action and the shortcut that the Drafts Action mentions. What other shortcuts does it need since you said, series of shortcuts? Doesn't it need a Micro.blog app token?

|
Embed
jarrod
jarrod

@pratik This is the flow:

|
Embed
pratik
pratik

@jarrod I confirmed that steps 3 - 5 work but can't get step 1 to work.

|
Embed
pratik
pratik

@jarrod Never mind. The name of the second shortcut in the Drafts Upload Helper was wrong. Pointed it out to the right one and it works now. BTW how important is it to open the image in Preview? Also, > 20 MB images throw up an error.

|
Embed
jarrod
jarrod

@pratik Ah, gotcha. Glad it’s working! It’s not important to preview the image, you can delete those steps if you want.

|
Embed
jarrod
jarrod

@pratik Is the error coming from Micro.blog or OpenAI, do you know? I can’t say I’ve tried it with a 20 MB file.

|
Embed
pratik
pratik

@jarrod I should’ve checked the error. I was trying to get it to work. I’ll do that next time. Thanks again.

|
Embed
jarrod
jarrod

@pratik 🙌

|
Embed
pratik
pratik

@jarrod Strangely, the Action is not working from my iMac. It had worked an hour ago on my MBP 😑

Getting the same error as a few people earlier last week:

{"error":{"param":null,"message":"'url' field cannot be empty.","code":null,"type":"invalid_request_error"}}

Or

{"error":{"param":null,"message":"Invalid base64 image_url.","code":null,"type":"invalid_request_error"}}

...for the OpenAI part but strangely, if I run it as a standalone shortcut, it works just fine.

|
Embed
jarrod
jarrod

@pratik How strange! I wonder if it works for that image on your MBP? Like, is it the image or the environment that’s causing the error.

|
Embed
pratik
pratik

@jarrod 🤷🏽‍♂️ If I choose PNG as an image option, it works! But not if I select JPEG. Anyhoo! Time for bed. I'll try again tomorrow from my MBP and then the iMac.

|
Embed
pratik
pratik

@jarrod quick update - it worked on the phone last night but now it won’t work anywhere - phone, MBP, or iMac. Same error as I mentioned earlier. Sigh! I guess, I’ll remove everything and start over later in the evening.

|
Embed
pratik
pratik

@jarrod - Started over
- Deleted the action, shortcuts, Mb token, OpenAI API key
- Reinstalled all with new token and key first on my iMac.
- First try - uploading a JPG image gave the same error.
- Tried uploading as a PNG and it worked perfectly with the alt text and all 🙌🏽
- Retried JPG and this time it worked but the alt text was for the previous PNG 🫠
- Same alt text with any other image uploaded as JPG.
- Tried with a new image and uploaded PNG and worked perfectly.

Worked as described above also on iPhone. On MBP (work laptop but have admin privileges and had worked last night), the Action throws up an error 😵‍💫

Potential reasons: I have another OpenAI API key saved as part of Drafts credentials for another AI-related shortcut by FlohGro. It works just fine and always has.

|
Embed
jarrod
jarrod

@pratik Wow, that is frustratingly inconsistent. I’ve never gotten that error from OpenAI. I’ll have to do some digging when I’m back at my Mac.

I don’t think the other OpenAI API key would interfere because it doesn’t uses the API in Drafts at all, just in Shortcuts.

|
Embed
pratik
pratik

@jarrod Thanks. Let me know if you find something. You're right about the OpenAI API key. I was wondering since that's the part that's failing. I'll try to do some digging at my end, too. It's frustrating coz it clearly works when we upload as PNG files but not JPEG. Perhaps something about the encoding, etc., on my computer.

|
Embed