New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full Mac Support? #12
Comments
I regret, but I have no knowledge about Mac, neither do I have access to it.
Both are very OS specific and someone with knowledge about that for Mac will need to jump in ... Camiel B. |
I would support a macOS integration as well. I remember thunderlink had an integration, and I found this: link for instructions which uses an App to handle the links. Worth looking into. I'm going to try and see how this works so we can have cbthunderlink integration as well. |
Update 2023-08-04: cb_thunderlink v0.8.0 works great on macos Catalina and Monterey. Here is how to install it:
Thank you Camiel for this wonderful addon. |
Thanks a lot!
I referred to this description in the documentation.
Camiel B
…------------------------------------------------------------------------
*From:* baerbel2019 ***@***.***
*Sent:* Monday, November 22, 2021, 11:00 AM
*To:* CamielBouchier/cb_thunderlink
*Cc:* Camiel B; Comment
*Subject:* [CamielBouchier/cb_thunderlink] Full Mac Support? (#12)
cb_thunderlink v0.8.0 works great on macos Catalina and Monterey. Here
is how to install it:
1.
Download cb_thunderlink archive
/Using the git repository will allow you to track your changes and
to merge with newer versions easily. Be careful where to place
this repository. The ScriptEditor app that we are going to create
below needs access to that directory. I prefer the home directory
($HOME) as things are not forgotten there./
cd ~
git clonehttps://github.com/CamielBouchier/cb_thunderlink
cd cb_thunderlink
CBDIR="$(pwd)"
2.
Set the execution bit on the python script
cd "${CBDIR}"
chmod +x cb_thunderlink.py
3.
Update location of the python script in the App JSON file
/Just replace the string cb_thunderlink.exe with the full path of
the python script./
cd "${CBDIR}"
sed -i'' -e"s#cb_thunderlink.exe#$CBDIR/cb_thunderlink.py#" cb_thunderlink.json
4.
Register App JSON file
/It took me a while to find the proper directory. After lots of
browsing I found the correct location in the source code of
openwith
<https://github.com/darktrojan/openwith/blob/master/webextension/native/open_with_mac.py#L48>.
In my case the directory did not exist and had to be created first./
mkdir -p~/Library/Mozilla/NativeMessagingHosts
(cd ~/Library/Mozilla/NativeMessagingHosts&& ln -s${CBDIR}/cb_thunderlink.json )
5.
Create User Application Directory
mkdir -p~/Applications
6.
Launch ScriptEditor
7.
In ScriptEditor paste the following script (possibly adapt for
your CBDIR)
/I never used ScriptEditor before. It's very different from other
programming languages. The script here works but this can be
improved for sure./
on open location givenURI
try
set prgpath to POSIX path of (path to home folderas string)& "/cb_thunderlink/cb_thunderlink.py"
set quotedURI to quoted form of givenURI
on error errMsg
display dialog "ERROR: " & (name of me)& " failed to build command: " & errMsg
return
end try
try
do shell script prgpath& " " & quotedURI
on error errMsg
display dialog "ERROR: " & (name of me)& " failed to run: " & prgpath& " " & quotedURI& ": " & errMsg
end try
end open location
8.
In ScriptEditor press the small grey play button to verify the syntax
9.
In Script Editor save the Script as Application
* |File| > |Save...|
* Choose name |CbThunderlink| (extension app will be added
automatically)
* Choose directory |~/Applications|
* Choose File Format |Application|
10.
Register your new AppleScript App for URI scheme name |cbthunderlink|
Use duti <https://github.com/moretension/duti> or SwiftDefaultApps
<https://github.com/Lord-Kamina/SwiftDefaultApps>
/I'm using homebrew <https://brew.sh/> to install additional
software but you can also install both of these manually I guess.
SwiftDefaultApps also has a GUI accessible through |System
Preferences|./
brew install --cask swiftdefaultappsprefpane
SWDA="$(/bin/ls -1 /usr/local/Caskroom/swiftdefaultappsprefpane/*/swda
| tail -1)"
"${SWDA}" setHandler --app"${HOME}/Applications/CbThunderlink.app" --URL cbthunderlink
11.
Download |cb_thunderlink.xpi| from the latest release of
cb_thunderlink
<https://github.com/CamielBouchier/cb_thunderlink/releases>
cd ~/Downloads
CBLATEST="$(curl -s
https://api.github.com/repos/CamielBouchier/cb_thunderlink/releases
| grep browser_download_url | cut -d\" -f4 | head
curl -o - -L "${CBLATEST}" | bsdtar -xvf - --strip-components 1
"cb_thunderlink/cb_thunderlink.xpi"
12.
Install the xpi file
<https://support.mozilla.org/en-US/kb/installing-addon-thunderbird>
|Thunderbird| > |Tools| > |Addons and Themes| > |Gear Wheel
Button| > |Install Addon from File...|
/It is my understanding that you need the original xpi file as
Thunderbird requires Addons to be signed
<https://blog.mozilla.org/addons/2016/01/22/add-on-signing-update/>.
If you manually compose the xpi file (it's just a zip file) you
will only be able to install as temporary addon./
Thank you Camiel for this wonderful addon.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARG7X2OMDZK63FCHVTRFSULUNIIFNANCNFSM4TTW67AQ>.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
|
Hi. I got the below error on macOS Ventura 13.2 with Thunderbird 102 and Python 3.11. This occurs on calling Traceback (most recent call last):
File "/Users/harsh/apps/cb_thunderlink/./cb_thunderlink", line 211, in <module>
send_socket.connect(server_address)
ConnectionRefusedError: [Errno 61] Connection refused For now, I've set the |
@coolharsh55 I am really sorry, but this seems macOS specific. I have no access to a mac, neither do I intend to learn it. I can keep myself busy with Linux(es) and Windows. O wait, if someone would send me a expensive nice mac to investigate and try, I might reconsider this position :) Camiel B. |
@coolharsh55: |
Yes that makes sense of course. I was silently, but probably overly enthusiastically, assuming thunderbird and the extension was running in the first place ... If the error occurs while this is the case, there might be other processes that seized the port, protection software intervening, etc ... |
Hi. Apologies, I should have clarified - thunderbird is running, cbthunderlink extension is running, and links work inside thunderbird i.e. copying the link to clipboard and clicking the cbthunderlink button inside thunderbird does open the email. So there seems to be a connection disruption from the script to the thunderbird/extension process. I can confirm this is macOS specific - the same setup works okay on Linux. I'll keep tinkering to see if I can figure out a solution as well. |
Interesting. So my enthusiastic assumption was correct ...
|
cb_thunderlink works for me on macOS Ventura 13.2 using Thunderbird 102.7. I can paste Check the output of...
|
I followed the instructions but stumbled on step 10 as the SWDA url was not working for me. Turns out that on my mac (running Venture) it is not /usr/local/... but /opt/homebrew/Caskroom/... Might be helpful for somebody.
|
@plur9
|
Sorry, this is beyond my horizon. |
Any chance clickable / OS support could make it into an upcoming release?
Having clickable links / OS support would be HUGE for me and the workflow I currently use!
I'm also having some difficult getting the Keyboard Shortcuts to work or perhaps I don't understand how to use them correctly. If I trigger the shortcut for configurable link 1 it doesn’t seem to copy to clipboard for me?
Lastly, would it be possible to add a shortcut to trigger the cb_thunderlink button action?
Thx
The text was updated successfully, but these errors were encountered: