When refreshing feeds on DTPro, the only format that seems to present a nice clutter-free format and keep images (pulled from their URLs) from the article is “automatic” which produces an HTML Text file. For the particular feed I’m working on (Caasimada Online), the other formats lose the images and include more clutter.
I’d like to be able to convert these files to markdown on import, pull the linked image(s) saving them in an assets folder or similar and delete the original html file.
[As they are in Somali I also want to insert an English translation of the Somali text — using the Azure translate API — above the Somali text with a horizontal line dividing the two, but I appreciate that’s a lot to ask for…]
The clutter should be the same if the clutter-free option is enabled in Preferences > RSS.
Due to a bug this doesn’t work while the converted Markdown file is located in a feed but a smart rule could move the news to a new group, convert them to Markdown and finally delete the originals. Just ensure that the option to import Markdown images (see Preferences > Files > Markdown) is enabled.
Thank you! It does indeed work when I move it to a new group.
Would anyone be able to help with the translation code? I want to translate both the filename and contents of the MD using an Azure API.
I’ve spent hours trying to modify AppleScripts with the help of AI and been able to translate the filename but not the contents. I’ve also tried various ways of triggering Python or Java scripts with mixed results. I imagine it would be cleanest to keep it all within a single AppleScript if possible?
What I want to do is translate the filename but then insert a copy of the translated plain text within the markdown (in English) above the original Somali text so if articles are important I can manually check the translation (given imperfections with both Google and Microsoft Somali translations).
I’ve used a Wordpress plugin to achieve this for past few years but it only produces the translation result and loses the original text.
And this wouldn’t just be for use with RSS feeds but other documents received in Somali. I would imagine I’m not the only one that could make use of a solution to translate text within DT?
I have no idea what this translation API looks like. Perhaps opening a new thread with an appropriate heading and an explanation of the API might produce suggestions.
This is likely to produce poor and unusable results, especially since you’re asking unusual and rare questions of it. AI does not think and doesn’t extrapolate from generic concepts to highly specific ones. It guesses (and I use that term figuratively as even guessing truly requires actual knowledge).
Here’s a simple example, that is actually a more general concept for a DEVONthink script: in applescript, how do i color selected text in devonthink? Does the resulting code look reasonable? Sure. And it’s still wrong.