QuickWho

Check-in [bc7443adb5]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Cleanup for Mac NSServices
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:bc7443adb519548259f66d1eaf89d1e390882911
User & Date: kevin 2018-03-02 04:37:31
Context
2018-03-02
04:55
Add Wish sdef check-in: 068a1d9f57 user: kevin tags: trunk
04:37
Cleanup for Mac NSServices check-in: bc7443adb5 user: kevin tags: trunk
2018-02-24
23:16
Updates for Windows check-in: ab476807e5 user: kevin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Added QuickWho - Get Domain Info.workflow/Contents/Info.plist.

            1  +<?xml version="1.0" encoding="UTF-8"?>
            2  +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
            3  +<plist version="1.0">
            4  +<dict>
            5  +	<key>NSServices</key>
            6  +	<array>
            7  +		<dict>
            8  +			<key>NSMenuItem</key>
            9  +			<dict>
           10  +				<key>default</key>
           11  +				<string>QuickWho - Get Domain Info</string>
           12  +			</dict>
           13  +			<key>NSMessage</key>
           14  +			<string>runWorkflowAsService</string>
           15  +			<key>NSSendTypes</key>
           16  +			<array>
           17  +				<string>public.utf8-plain-text</string>
           18  +			</array>
           19  +		</dict>
           20  +	</array>
           21  +</dict>
           22  +</plist>

Added QuickWho - Get Domain Info.workflow/Contents/QuickLook/Thumbnail.png.

cannot compute difference between binary files

Added QuickWho - Get Domain Info.workflow/Contents/document.wflow.

            1  +<?xml version="1.0" encoding="UTF-8"?>
            2  +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
            3  +<plist version="1.0">
            4  +<dict>
            5  +	<key>AMApplicationBuild</key>
            6  +	<string>444.4</string>
            7  +	<key>AMApplicationVersion</key>
            8  +	<string>2.8</string>
            9  +	<key>AMDocumentVersion</key>
           10  +	<string>2</string>
           11  +	<key>actions</key>
           12  +	<array>
           13  +		<dict>
           14  +			<key>action</key>
           15  +			<dict>
           16  +				<key>AMAccepts</key>
           17  +				<dict>
           18  +					<key>Container</key>
           19  +					<string>List</string>
           20  +					<key>Optional</key>
           21  +					<true/>
           22  +					<key>Types</key>
           23  +					<array>
           24  +						<string>com.apple.cocoa.string</string>
           25  +					</array>
           26  +				</dict>
           27  +				<key>AMActionVersion</key>
           28  +				<string>2.0.3</string>
           29  +				<key>AMApplication</key>
           30  +				<array>
           31  +					<string>Automator</string>
           32  +				</array>
           33  +				<key>AMParameterProperties</key>
           34  +				<dict>
           35  +					<key>COMMAND_STRING</key>
           36  +					<dict/>
           37  +					<key>CheckedForUserDefaultShell</key>
           38  +					<dict/>
           39  +					<key>inputMethod</key>
           40  +					<dict/>
           41  +					<key>shell</key>
           42  +					<dict/>
           43  +					<key>source</key>
           44  +					<dict/>
           45  +				</dict>
           46  +				<key>AMProvides</key>
           47  +				<dict>
           48  +					<key>Container</key>
           49  +					<string>List</string>
           50  +					<key>Types</key>
           51  +					<array>
           52  +						<string>com.apple.cocoa.string</string>
           53  +					</array>
           54  +				</dict>
           55  +				<key>ActionBundlePath</key>
           56  +				<string>/System/Library/Automator/Run Shell Script.action</string>
           57  +				<key>ActionName</key>
           58  +				<string>Run Shell Script</string>
           59  +				<key>ActionParameters</key>
           60  +				<dict>
           61  +					<key>COMMAND_STRING</key>
           62  +					<string>domain=$1; osascript -e "tell app \"QuickWho\" to do script \"getDomain $domain\""</string>
           63  +					<key>CheckedForUserDefaultShell</key>
           64  +					<true/>
           65  +					<key>inputMethod</key>
           66  +					<integer>1</integer>
           67  +					<key>shell</key>
           68  +					<string>/bin/bash</string>
           69  +					<key>source</key>
           70  +					<string></string>
           71  +				</dict>
           72  +				<key>BundleIdentifier</key>
           73  +				<string>com.apple.RunShellScript</string>
           74  +				<key>CFBundleVersion</key>
           75  +				<string>2.0.3</string>
           76  +				<key>CanShowSelectedItemsWhenRun</key>
           77  +				<false/>
           78  +				<key>CanShowWhenRun</key>
           79  +				<true/>
           80  +				<key>Category</key>
           81  +				<array>
           82  +					<string>AMCategoryUtilities</string>
           83  +				</array>
           84  +				<key>Class Name</key>
           85  +				<string>RunShellScriptAction</string>
           86  +				<key>InputUUID</key>
           87  +				<string>F8F6FD91-7B52-4292-B7A4-362537C13811</string>
           88  +				<key>Keywords</key>
           89  +				<array>
           90  +					<string>Shell</string>
           91  +					<string>Script</string>
           92  +					<string>Command</string>
           93  +					<string>Run</string>
           94  +					<string>Unix</string>
           95  +				</array>
           96  +				<key>OutputUUID</key>
           97  +				<string>279AF479-66AB-4EE4-992C-0F7D947A9ABD</string>
           98  +				<key>UUID</key>
           99  +				<string>3E73C973-ACA2-4384-B306-E7A9AC52DA99</string>
          100  +				<key>UnlocalizedApplications</key>
          101  +				<array>
          102  +					<string>Automator</string>
          103  +				</array>
          104  +				<key>arguments</key>
          105  +				<dict>
          106  +					<key>0</key>
          107  +					<dict>
          108  +						<key>default value</key>
          109  +						<integer>0</integer>
          110  +						<key>name</key>
          111  +						<string>inputMethod</string>
          112  +						<key>required</key>
          113  +						<string>0</string>
          114  +						<key>type</key>
          115  +						<string>0</string>
          116  +						<key>uuid</key>
          117  +						<string>0</string>
          118  +					</dict>
          119  +					<key>1</key>
          120  +					<dict>
          121  +						<key>default value</key>
          122  +						<string></string>
          123  +						<key>name</key>
          124  +						<string>source</string>
          125  +						<key>required</key>
          126  +						<string>0</string>
          127  +						<key>type</key>
          128  +						<string>0</string>
          129  +						<key>uuid</key>
          130  +						<string>1</string>
          131  +					</dict>
          132  +					<key>2</key>
          133  +					<dict>
          134  +						<key>default value</key>
          135  +						<false/>
          136  +						<key>name</key>
          137  +						<string>CheckedForUserDefaultShell</string>
          138  +						<key>required</key>
          139  +						<string>0</string>
          140  +						<key>type</key>
          141  +						<string>0</string>
          142  +						<key>uuid</key>
          143  +						<string>2</string>
          144  +					</dict>
          145  +					<key>3</key>
          146  +					<dict>
          147  +						<key>default value</key>
          148  +						<string></string>
          149  +						<key>name</key>
          150  +						<string>COMMAND_STRING</string>
          151  +						<key>required</key>
          152  +						<string>0</string>
          153  +						<key>type</key>
          154  +						<string>0</string>
          155  +						<key>uuid</key>
          156  +						<string>3</string>
          157  +					</dict>
          158  +					<key>4</key>
          159  +					<dict>
          160  +						<key>default value</key>
          161  +						<string>/bin/sh</string>
          162  +						<key>name</key>
          163  +						<string>shell</string>
          164  +						<key>required</key>
          165  +						<string>0</string>
          166  +						<key>type</key>
          167  +						<string>0</string>
          168  +						<key>uuid</key>
          169  +						<string>4</string>
          170  +					</dict>
          171  +				</dict>
          172  +				<key>isViewVisible</key>
          173  +				<true/>
          174  +				<key>location</key>
          175  +				<string>309.000000:253.000000</string>
          176  +				<key>nibPath</key>
          177  +				<string>/System/Library/Automator/Run Shell Script.action/Contents/Resources/English.lproj/main.nib</string>
          178  +			</dict>
          179  +			<key>isViewVisible</key>
          180  +			<true/>
          181  +		</dict>
          182  +	</array>
          183  +	<key>connectors</key>
          184  +	<dict/>
          185  +	<key>workflowMetaData</key>
          186  +	<dict>
          187  +		<key>serviceInputTypeIdentifier</key>
          188  +		<string>com.apple.Automator.text</string>
          189  +		<key>serviceOutputTypeIdentifier</key>
          190  +		<string>com.apple.Automator.nothing</string>
          191  +		<key>serviceProcessesInput</key>
          192  +		<integer>0</integer>
          193  +		<key>workflowTypeIdentifier</key>
          194  +		<string>com.apple.Automator.servicesMenu</string>
          195  +	</dict>
          196  +</dict>
          197  +</plist>

Changes to QuickWho.py.

cannot compute difference between binary files

Changes to QuickWho.sdef.


Changes to buildapp.

    24     24   <plist version="1.0">
    25     25   <dict>
    26     26   	<key>CFBundleDevelopmentRegion</key>
    27     27   	<string>English</string>
    28     28   	<key>CFBundleDisplayName</key>
    29     29   	<string>QuickWho</string>
    30     30   	<key>CFBundleExecutable</key>
    31         -	<string>_quickWho</string>
           31  +	<string>_quickwho</string>
    32     32   	<key>CFBundleGetInfoString</key>
    33     33   	<string>QuickWho $1</string>
    34     34   	<key>CFBundleIconFile</key>
    35     35   	<string>QuickWho.icns</string>
    36     36   	<key>CFBundleIdentifier</key>
    37     37   	<string>com.codebykevin.quickwho</string>
    38     38   	<key>CFBundleInfoDictionaryVersion</key>
................................................................................
    66     66   	<string>YES</string>
    67     67   	<key>NSHumanReadableCopyright</key>
    68     68   	<string>Copyright (c) 2018 WordTech Communications LLC</string>
    69     69   	<key>NSMainNibFile</key>
    70     70   	<string>MainMenu</string>
    71     71   	<key>NSPrincipalClass</key>
    72     72   	<string>NSApplication</string>
    73         -	<key>NSServices</key>
    74         -	<array>
    75         -		<dict>
    76         -			<key>NSMenuItem</key>
    77         -			<dict>
    78         -				<key>default</key>
    79         -				<string>QuickWho: Display Domain Information</string>
    80         -			</dict>
    81         -			<key>NSMessage</key>
    82         -			<string>provideService</string>
    83         -			<key>NSPortName</key>
    84         -			<string>QuickWho</string>
    85         -			<key>NSSendTypes</key>
    86         -			<array>
    87         -				<string>NSStringPboardType</string>
    88         -			</array>
    89         -		</dict>
    90         -	</array>
    91     73   	<key>OSAScriptingDefinition</key>
    92         -	<string>QuickWho.sdef</string>
           74  +	<string>Wish.sdef</string>
    93     75   </dict>
    94     76   </plist>
    95     77   EOT
    96     78   
    97         -gcc main.m -o _quickwho -framework Carbon -framework Cocoa
           79  +gcc main.m -o _quickwho -framework Carbon -framework Cocoa -framework CoreFoundation
    98     80   
    99     81   mkdir dist
   100     82   mkdir dist/QuickWho.app
   101     83   mkdir dist/QuickWho.app/Contents
   102     84   mkdir dist/QuickWho.app/Contents/MacOS
   103     85   mkdir dist/QuickWho.app/Contents/Resources
   104     86   mkdir dist/QuickWho.app/Contents/Frameworks
   105     87   
   106     88   cp Info.plist dist/QuickWho.app/Contents/Info.plist
   107     89   cp _quickwho dist/QuickWho.app/Contents/MacOS/_quickwho
   108     90   cp launcher dist/QuickWho.app/Contents/Resources/launcher
   109     91   cp QuickWho.icns dist/QuickWho.app/Contents/Resources/QuickWho.icns
   110         -cp QuickWho.sdef dist/QuickWho.app/Contents/Resources/QuickWho.sdef
           92  +cp Wish.sdef dist/QuickWho.app/Contents/Resources/Wish.sdef
   111     93   cp QuickWho.py  dist/QuickWho.app/Contents/Resources/QuickWho.py
   112     94   cp ToolTip.py  dist/QuickWho.app/Contents/Resources/ToolTip.py
           95  +cp -R  -f "QuickWho - Get Domain Info.workflow" dist/QuickWho.app/Contents/Resources/"QuickWho - Get Domain Info.workflow"
   113     96   
   114     97   #copy the frameworks
   115     98   cp -R -f /Library/Frameworks/Tcl.framework  dist/QuickWho.app/Contents/Frameworks/Tcl.framework
   116     99   cp -R -f /Library/Frameworks/Tk.framework  dist/QuickWho.app/Contents/Frameworks/Tk.framework
   117    100   cp -R -f /Library/Frameworks/Python.framework  dist/QuickWho.app/Contents/Frameworks/Python.framework
   118    101   cp -f dist/QuickWho.app/Contents/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python dist/QuickWho.app/Contents/Resources/QuickWho
   119    102   cp -f /usr/local/lib/libcrypto.42.dylib  dist/QuickWho.app/Contents/Frameworks/libcrypto.42.dylib

Changes to scriptlibs/machelp/help.txt.

    62     62      end tell
    63     63   
    64     64   Then, run the script in Script Editor or as part of a larger AppleScript package.
    65     65   
    66     66   As an example of integrating a QuickWho AppleScript with other applications, here is another sample script:
    67     67    
    68     68      tell application "QuickWho"
    69         -      set thetext to (get domain "apple.com")
           69  +      set thetext to (do script "getDomain \"apple.com\"")
    70     70         tell application "TextEdit"
    71     71            make new document with properties {text:thetext}
    72     72         end tell
    73     73      end tell
    74     74   
    75     75   QuickWho can also be called from the Mac's Services menu. To call QuickWho from the services menu, highlight a domain name in a Services-aware application (such as Safari, Mail or TextEdit) and select "QuickWho: Display Domain Information" from the Services menu. That domain name will be passed to QuickWho and the domain information displayed in QuickWho's main window.
    76     76