OK: I am starting from scratch and will give you an update, You are very patient !
Thank you!! This works for me, with the caveat that I had to change the macro name and bundle reference to "com.cocoatech.PathFinder-setapp" because I use the Setapp version of PathFinder.
Added support for Opera browser.
Up to date copy at:
Why can't import macros?
That's not a question that can be answered without a lot more context
- Where are you obtaining the file from ?
- How are you obtaining it ?
- How are you doing the import ?
- What version of Keyboard Maestro are you using ?
Answers in line:
- Where are you obtaining the file from? RobTrew github: copy-as-md-link/MD Link tools Macros.kmmacros at main ยท RobTrew/copy-as-md-link ยท GitHub
- How are you obtaining it? Double-click on downloaded .kmmacros to import in KM.
- How are you doing the import ? Yes, tried doubleclicking and File - Import - Import macros safely
- What version of Keyboard Maestro are you using ? Latest (10.2) on Macbook M1.
Thanks.
At this stage on the https://github.com/RobTrew/copy-as-md-link
page,
- you should be using the green Code button,
- clicking on
Download Zip
- and unzipping the
copy-as-md-link-main.zip
file - before double-clicking the
MD Link tools Macros.kmmacros
file in the unzipped folder
Is that what you are doing ?
Thanks it worked!
I am testing it and it is really comfortable. However, I have a few questions:
- Is it possible in DEVONthink to copy only the file name and not also the page number, as is the case with pdf? How should I modify the script?
- What is the difference between
bookends
andbookends2
, and how can I give priority to one of them? - How come it doesn't work in Obsidian as it should? Error (-192).
Sorry to bother you with this.
Would it be possible to add the file manager called Forklift ?
thanks very much
It doesn't seem to offer a very rich textual clipboard (just a public.file-url
pasteboard) so the MD link would essentially just be [fileName](fullURL)
I'll aim to take a look at the weekend, if no one else has done it before then.
The public.file-url
pasteBoard item in the ForkLift clipboard already pastes well, as a live link, into Jesse Grosjean's Bike Outliner, incidentally.
I don't understand and will read on both subjects. thanks very much
I've added com.binarynights.ForkLift
to GitHub - RobTrew/copy-as-md-link: macOS Keyboard Maestro macro group โ single keystroke to copy MD links from different applications.
Download with the green Code button.
(It just copies a simple [ fileName ]( fileSystemURL )
link โ ForkLift has a private URL Scheme for favourites, but not, I think, for general files, so when you click the copied links, they will open a Finder window and select the targeted file, but they won't open a ForkLift window.
If you are adding com.binarynights.ForkLift
to an existing installation, you will need to start by running (just once) the included macro called:
- Update map from bundleIDs to KM UUIDs (after new sub-macro added)
Thank you for this.
One side note: to get this to work with the Setapp version of ForkLift, I had to rename the macro:
com.binarynights.forklift-setapp
with ForkLift all in lowercase and then run the "update map..." macro. It then works as you described.
Hi, @ComplexPoint. Would you consider adding support for the Arc browser (company.thebrowser.Browser
)?
Thanks!
Reluctantly
Not because (unusually among browser applications ?) its business model requires a sign-up even to test it (I don't really like that, to be honest)
but because its AppleScript support is a mess โ imitates most but not all of the Chrome method and property names (.title
where Chrome uses .name
), and then gets some of the types wrong (depriving us of basic methods like .exists()
, and turning activeTab
into a property where a method is expected)
i.e. adding it to the browserLinkLR
function, which should be a trivial triage of WebKit vs Chromium, instead involves making all the other browser cases wait around for the teenager to sort itself out. ยฏ\_(ใ)_/ยฏ
( and, of course, with a more consistent and less type-muddled imitation of the Chrome osascript
interface, Arc would be also be accessible to Keyboard Maestro browser tokens )
I'll see what I can do.
I've now updated the copy on Github at:
It should, I think, now support the Arc browser.
I see from some discussion elsewhere that something called "Little Arc windows" do not (yet ?) support osascript
at all, and require, if anything, some UI script fudging.
I won't do that myself โ Arc is not a browser that I expect to make any use of โ but if you want to write something like that yourself for the "Little Arc" complication, I would be very happy to test and merge a GitHub pull request.
My initial testing indicates that the changes you have made to Copy as Markdown link have indeed added Arc support. Thanks, @ComplexPoint!
Yes, I noticed that the AppleScript is unique when I was updating Activate, Reload, or Open Browser Tab to support Arc.
Thanks for working through theses issues!
Arc and Little Arc are generally problematic* with Keyboard Maestro; but the Little Arc anomalies can largely be marginalized but adjusting the Arc Settings.
Or if one wants to use Little Arc, โ-O can be used to move a Little Arc window to Arc before triggering this revised version of Copy as Markdown link.
*Arc and Little Arc issues with Keyboard Maestro
Keyboard Maestro Tokens โ Correctly Reported (yes/no)
Arc Window | Little Arc Window | |
---|---|---|
%FrontBrowserName% | no | no |
%FrontBrowserWindow% | no | no |
%FrontBrowserTitle% | no | no |
%FrontBrowserURL% | no | no |
%FrontWindowName% | yes | yes |
%Application%1% | yes | no, returns Arc |
%FrontWindowFrame% | yes | yes |
This macro continues to be one of the coolest Macros in the KM world.
Two apps, I'm curious about tweaking it for:
- OmniFocus4 - The link generate: [Inbox](file:///Users/marklevison/Library/Containers/com.omnigroup.OmniFocus4/Data/Library/Application%20Support/OmniFocus/OmniFocus.ofocus/) -- looks wrong
- Obsidian - The Current implementation doesn't appear to be working, it is getting called - an alert proves that, it's just doing anything.
Happy to help, debug code. My JXA skills are less than 0.
OmniFocus 4, Obsidian
Just pushed a draft update aiming to add OmniFocus 4 and improve Obsidian support.
Please test and report.
( Remember that before using a new or updated install, you need to rebuild the map of app bundle IDs to Keyboard Maestro macro ids by running the included macro with the name:
Update map from bundleIDs to KM UUIDs
)