Closed oalders closed 7 years ago
It would be helpful to see what is the generated popclipextz file for each of those.
You should also probably check these into somewhere for distribution anyway so people can install the popclip extension by double clicking them, without having to install M::P::Q (the popclipextz files are standalone)
It looks like the last one that got saved is always in extension.popclipext
. When I install the other extension, it replaces the content of the previous extension.popclipext
.
Olafs-MacBook-Pro:Extensions olaf$ tree
.
├── CharCount.popclipext
│ ├── Config.plist
│ └── _Signature.plist
├── Extensions.plist
├── GoogleTranslate.popclipext
│ ├── Config.plist
│ ├── _Signature.plist
│ └── gtrans.png
└── extension.popclipext
├── Config.plist
└── script.pl
Olafs-MacBook-Pro:Extensions olaf$ cat extension.popclipext/Config.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Actions</key>
<array>
<dict>
<key>Script Interpreter</key>
<string>/usr/bin/perl</string>
<key>Shell Script File</key>
<string>script.pl</string>
<key>Title</key>
<string>CPAN Module</string>
</dict>
</array>
<key>Extension Identifier</key>
<string>org.metacpan.module-lookup</string>
<key>Extension Name</key>
<string>CPAN Module</string>
<key>Required Software Version</key>
<string>701</string>
</dict>
</plist>
Olafs-MacBook-Pro:Extensions olaf$ cat extension.popclipext/script.pl
#!/usr/bin/perl
use strict;
use warnings;
BEGIN{$INC{'Mac/PopClip/Quick.pm'}=1}sub popclip_text(){$ENV{POPCLIP_TEXT}} use Mac::PopClip::Quick (
extension_identifier => 'org.metacpan.module-lookup',
extension_name => 'CPAN Module',
);
system( 'open', 'https://metacpan.org/pod/' . popclip_text );
__END__
=pod
=head1 SYNOPSIS
INSTALL_POPCLIP_EXTENSION=1 ./bin/module-lookup.pl
=cut
This is addressed in 1.0002
I've set up a couple of scripts here: https://github.com/CPAN-API/metacpan-popclip If I install one, it works. But if I install a second one, the first stops doing what it is supposed to do. Each has a unique
extension_name
andextension_modifier
.