cry/platypus/Platypus.app/Contents/Resources/Examples/TarGzipper.platypus
John Doty e8c91189c0 Vendor platypus.app
Let's see if it can be made to work.
2024-09-14 18:18:14 -07:00

101 lines
2.2 KiB
XML

<?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>Authentication</key>
<false/>
<key>AcceptsFiles</key>
<true/>
<key>AcceptsText</key>
<false/>
<key>Author</key>
<string>Sveinbjorn Thordarson</string>
<key>BundledFiles</key>
<array/>
<key>Creator</key>
<string>Platypus-5.4.1</string>
<key>Overwrite</key>
<false/>
<key>DevelopmentVersion</key>
<false/>
<key>Example</key>
<true/>
<key>ScriptName</key>
<string>TarGzipper.pl</string>
<key>Script</key>
<string>#!/usr/bin/perl
use strict;
use File::Basename;
if (!scalar(@ARGV) or ! -e $ARGV[0])
{
print &quot;Drop some files to create a tgz archive\n&quot;;
exit;
}
my $cmd = &quot;/usr/bin/tar cvfz &quot;;
# Get enclosing folder of first file
my($fn, $directory) = fileparse($ARGV[0]);
# Change to that directory
chdir($directory);
# Archive is created there
my $dest_path = &quot;Archive.tgz&quot;;
my $files;
foreach(@ARGV)
{
if (!$_ or ! -e $_) { next; }
my($filename, $directory) = fileparse($_);
$files .= &quot;&apos;$filename&apos; &quot;;
}
print $cmd . &quot;\n&quot;;
system(&quot;$cmd $dest_path $files&quot;);
</string>
<key>DocIconPath</key>
<string></string>
<key>Droppable</key>
<true/>
<key>IconPath</key>
<string></string>
<key>Identifier</key>
<string>org.sveinbjorn.TarGzipper</string>
<key>InterpreterPath</key>
<string>/usr/bin/perl</string>
<key>Name</key>
<string>TarGzipper</string>
<key>OptimizeApplication</key>
<false/>
<key>InterfaceType</key>
<string>Text Window</string>
<key>InterpreterArgs</key>
<array/>
<key>RemainRunning</key>
<true/>
<key>RunInBackground</key>
<false/>
<key>StatusItemDisplayType</key>
<string>Text</string>
<key>StatusItemIcon</key>
<data></data>
<key>StatusItemTitle</key>
<string>MyApp</string>
<key>Suffixes</key>
<array>
<string>*</string>
</array>
<key>TextBackground</key>
<string>#ffffff</string>
<key>TextFont</key>
<string>Monaco</string>
<key>TextForeground</key>
<string>#000000</string>
<key>TextSize</key>
<real>10</real>
<key>Version</key>
<string>1.0</string>
</dict>
</plist>