I am a relative novice in KM and want to put together a macro to automate my newsletter creation. I will be scouring many news stories and turning them into one sentence summaries with link at end.
After highlighting text in a story, I’d to be able to:
Paste that text into a dialogue box where I can rewrite to one sentence.
Hold that edited text.
Pull the article link into another dialogue box where I could reformat into a markdown link
Merge the two pieces (edited text)(markdown link) into a single block and save to clipboard.
Is something like that possible and what type actions would be best place to start?
The demo runs forever with a feature-set comparable with but superior to TextWrangler (which is being phased-out).
BBEdit is designed for editing text and is enormously scriptable, so it is a really good platform doing this kind of work. (It runs 24/7 on my system.)
Here's a very simple example:
Copy Selected-Text and send to a new BBEdit document:
The ⌘⎋ keyboard shortcut is supremely easy for me to slap and return to the last application I was working in, so I can use a macro like send-to-BBEdit and instantly return to the app I was working in.
It is possible to append text to an existing document and all kinds of other good stuff.
Working with and transforming the text in a BBEdit is fairly straightforward, but you'll have to learn a little bit of AppleScript.
Here is a simple macro to get you started.
It uses Chrome, but can be easily changed to Safari.
Just select some text on a web page, and trigger the macro.
It puts everything you asked for on the clipboard, where you can paste into any app.
##Macro Library Get Selected Text, Title & URL from Web Page
####DOWNLOAD:
<a class="attachment" href="/uploads/default/original/2X/d/d5cbf866720c55162f3d5884b11e6fb6685f22a3.kmmacros">Get Selected Text- Title & URL from Web Page.kmmacros</a> (2.6 KB)
---
###ReleaseNotes
HOW TO USE:
1. In Google Chrome web page, select text you want to copy.
2. Trigger this macro
3. Switch you any app that accepts text, and paste.
---
<img src="/uploads/default/original/2X/8/8a46046cd3ce1fe6abdb1c251e5e80283655b410.png" width="467" height="976">
Further question: I’ve got first half of equation done. Extract text into clipboard that is useful to me. Is there a way to send the clipboard contents to a particular “sheet” in Ulysses. I think U. stores files in a package if I’m not mistaken.