jgstew / bigfix-content

a repo to store some example bigfix-content
The Unlicense
29 stars 24 forks source link

Create content to automate SSA icons #13

Open jgstew opened 4 years ago

jgstew commented 4 years ago

Look at automating the addition of Icons to content for display within the Self Service Application using REST API or Dashboard or other methods.

Can get an Icon from the content's prefetch statement on windows using: https://github.com/jgstew/tools/blob/master/CSharp/ExtractAssociatedIcon.bat

ToDo:

Examples:

Console Dashboard for SSA Icons:

PNG Image MIMEField:

<MIMEField>
    <Name>action-ui-metadata</Name>
    <Value>{"version":"66.208.49227","size":46641152,"icon":"data:image/png;base64,iVB....CC"}</Value>
</MIMEField>

Fixlet with SSA Icon:

https://github.com/jgstew/bigfix-content/blob/master/fixlet/Open%20Monitor%20Manual%20-%20PG279Q%20-%20Windows.bes

Client Relevance:

Session Relevance:

Mac Icon File Info:

Get Magic Literal:

Q: concatenations of (characters it) of (bytes 0 of it; bytes 1 of it; bytes 2 of it; bytes 3 of it) of files "/Applications/App Store.app/Contents/Resources/AppIcon.icns"
A: icns

Related:

jgstew commented 4 years ago

To get Mac App Icons in BigFix Console:

  1. Only run this on a few machines: https://github.com/jgstew/bigfix-content/blob/master/fixlet/Get%20PNG%20From%20All%20Applications%20ICNS%20Files%20-%20MacOS.bes
  2. Import and activate: https://github.com/jgstew/bigfix-content/blob/master/analyses/App%20Icons%20for%20SSA%20-%20Mac.bes
  3. Load Wizard/add to site: https://github.com/jgstew/bigfix-content/blob/master/dashboards/MacAppIconsForSSA.ojo

ToDo:

jgstew commented 4 years ago

wow, this built-in command seems to do EXACTLY what I need to get the default icon out of an icns file into PNG format: https://www.macworld.com/article/1060156/sipsicns.html

sips -s format png --resampleHeightWidthMax 128 Calendar.icns --out /tmp/Calendar.icns128.png

I thought I had to use https://github.com/sveinbjornt/osxiconutils but it doesn't get the correct default icon: https://github.com/sveinbjornt/osxiconutils/issues/5

jgstew commented 3 years ago

Interesting PDF icon:

https://www.iconpacks.net/free-icon/pdf-download-2617.html

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAH0lEQVQ4T2NkoBAwUqifYdQAhtEwYBgNA1A+Gvi8AAAmmAARf9qcXAAAAABJRU5ErkJggg=="/>