MediaInfo by JAS

See also Tools (for Media / Photo / Video / …) – /mlabs/lib/tools/ – for more on mediainfo original tool, and other tools.

 

on run {input, parameters}

  display dialog (“Another Service by J&P”) buttons {“Ok”} default button “Ok”

end run

 

  1. Open text editor with source…txt – file
  2. Open Automator
  3. Editing of source, in Automator,
    1. Copy from latest source…txt file into <Utilitity>.app automator – app file
    2. Develop and test
    3. Once finished
      1. Copy source code to new source…txt file
      2. Clean up any comments, debug printouts, … et c from this
      3. Copy source to corresponding <Utilitity>.workflow Atomator – service file
    4. (Opt) Close Automator / or file inside Automator
  4. IF using custom app icon
    1. Open ###
    2. Ensure have your own .icns file, with name ‘AutomatorApplet.icns’
    3. Copy this into and confirm that you DO WANT to replace
  5. Copy
  6. C

Gen 1

Gen Date App Svc Notes
1 2019-08-01 Called medianinfo-processing.app.
Full path to media in created <input>.txt – file
1 2019-10-01 Added json formatted file as well,
output to <input>.json
1 2019-11-05 Created the MediaInfo by JAS logo
1 2020-08-18 ### Change output names to include ‘.mediainfo’
<input>.mediainfo.txt and <input>.mediainfo.json
1 2020-11-20 Creating a logo, MediaInfo-icon.tiff
Which is manually copied onto icon field (Finder > Info….)
1 2020-11-24 Start using mediastats.sh if available
1 2020-11-24 Also creating a Service, standalone from the App,
just copy and past of AppleScript code.
2 2021-01-19 Work started 2021-01-15, Created custom icon as part of of .app itself 

 

  1. Create proper macOS icon
    1. Image2icon.app is easiest! Free (img2icnsapp.com/, and in macOS App Store, Family Sharing)
      1. From a ‘MediaInfo-icon.tiff’
      2. To a ‘MediaInfo-icon.icns’ file
  2. Using in Automator .app – application, general process as found at derflounder 2015/07/19/
    1. “Right-click on the Automator application
    2. Click on Show Package Contents
    3. Navigate to Contents/Resources
    4. Locate an existing file named AutomatorApplet.icns
    5. Remove the existing AutomatorApplet.icns file
    6. Copy the Mac OS icns file generated by iConvert Icons to the Resources folder
      J&P: Copied my MediaInfo-icon.icns into folder
    7. Rename the Mac OS icns file to AutomatorApplet.icns
      J&P: Yepp, renamed
    8. Fix permissions as needed for the new AutomatorApplet.icns file, to match those that have been set for the Automator application
      J&P: checked, no need for any tweaks
    9. Close the Finder window
      Once the new AutomatorApplet.icns file is in place, the chosen application icon should appear in dialog windows instead of the generic Automator icons.”
  3. But, new icon just didn’t start being used on the Automator-created .app. Tried a a few things which did the trick:
    1. Making a copy
    2. Compress (e.g. to zip) and Uncompress
  4. And YES (as expected, wanted) THIS process DO make an app with icon that correctly is “passed across” synchronized computers (e.g. IM2720, MBP17)