Skip to content

Commit

Permalink
backup standard icons for macos keyboard layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
andreineculau committed Nov 9, 2021
1 parent 6240537 commit fb3fd50
Show file tree
Hide file tree
Showing 364 changed files with 99 additions and 0 deletions.
5 changes: 5 additions & 0 deletions macos-standard-icons/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
```
curl https://raw.githubusercontent.com/phible/scripts/master/apple-kbd-dat-icon-extract.py -O
python apple-kbd-dat-icon-extract.py -o ./
for f in *.icns; do sips -s format png ${f} --out ${f/.icns/.png}; done
```
94 changes: 94 additions & 0 deletions macos-standard-icons/apple-kbd-dat-icon-extract.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#!/usr/bin/env python
#
# Copyright (C) 2012 Philip Belemezov <philip@belemezov.net>
#
# Public domain
#


import struct
import optparse
import sys
import os

prog = os.path.basename(sys.argv[0])

DEFAULT_DATFILE = "/System/Library/Keyboard Layouts/AppleKeyboardLayouts.bundle/Contents/Resources/AppleKeyboardLayouts-L.dat"

parser = optparse.OptionParser(usage="Usage: %prog [options] DATFILE")
parser.add_option("-o", "--output", dest="output",
help="Output directory", metavar="OUTPUT")

(opts, args) = parser.parse_args()
if not opts.output:
parser.error("Please specify output dir using `-o'")


ICNS_HEADER = '\x69\x63\x6e\x73'


def bufferToHex(buffer):
accumulator = ''
for i in range(len(buffer)):
accumulator += '%02x' % ord(buffer[i]) + ' '
return accumulator


def findNextIcon(data, pos):
while pos < len(data):
if data[pos:pos + len(ICNS_HEADER)] == ICNS_HEADER:
pos += len(ICNS_HEADER)
break
pos += len(ICNS_HEADER)
return pos


def readIconData(data, pos, length):
if pos + length >= len(data):
return None
return data[pos:pos + length]


def writeIcon(filename, iconData):
with open(filename, 'wb') as f:
f.write(ICNS_HEADER)
f.write(struct.pack('>I', len(iconData)))
f.write(iconData)


def processIcons(data, outputDir):
if not os.path.exists(outputDir):
print "%s: Output directory %s doesn't exist, please create it first" \
% (prog, outputDir)
return 1

iconIndex = 1
pos = findNextIcon(data, 0)
while pos < len(data):
iconLen = struct.unpack('>I', data[pos:pos+4])[0]
pos += 4
iconData = readIconData(data, pos, iconLen)
assert iconLen == len(iconData)

filename = os.path.join(outputDir, 'icon%d.icns' % iconIndex)
print "%s: Writing icon file %s" % (prog, filename)
writeIcon(filename, iconData)

iconIndex += 1
pos = findNextIcon(data, pos)
return 0

def main():
if not args:
filename = DEFAULT_DATFILE
else:
filename = args[0]

print "%s: Reading %s" % (prog, filename)
data = None
with open(filename, "rb") as f:
data = f.read()
return processIcons(data, outputDir=opts.output)

if __name__ == "__main__":
sys.exit(main())
Binary file added macos-standard-icons/icon1.icns
Binary file not shown.
Binary file added macos-standard-icons/icon1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon10.icns
Binary file not shown.
Binary file added macos-standard-icons/icon10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon100.icns
Binary file not shown.
Binary file added macos-standard-icons/icon100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon101.icns
Binary file not shown.
Binary file added macos-standard-icons/icon101.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon102.icns
Binary file not shown.
Binary file added macos-standard-icons/icon102.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon103.icns
Binary file not shown.
Binary file added macos-standard-icons/icon103.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon104.icns
Binary file not shown.
Binary file added macos-standard-icons/icon104.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon105.icns
Binary file not shown.
Binary file added macos-standard-icons/icon105.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon106.icns
Binary file not shown.
Binary file added macos-standard-icons/icon106.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon107.icns
Binary file not shown.
Binary file added macos-standard-icons/icon107.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon108.icns
Binary file not shown.
Binary file added macos-standard-icons/icon108.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon109.icns
Binary file not shown.
Binary file added macos-standard-icons/icon109.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon11.icns
Binary file not shown.
Binary file added macos-standard-icons/icon11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon110.icns
Binary file not shown.
Binary file added macos-standard-icons/icon110.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon111.icns
Binary file not shown.
Binary file added macos-standard-icons/icon111.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon112.icns
Binary file not shown.
Binary file added macos-standard-icons/icon112.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon113.icns
Binary file not shown.
Binary file added macos-standard-icons/icon113.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon114.icns
Binary file not shown.
Binary file added macos-standard-icons/icon114.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon115.icns
Binary file not shown.
Binary file added macos-standard-icons/icon115.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon116.icns
Binary file not shown.
Binary file added macos-standard-icons/icon116.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon117.icns
Binary file not shown.
Binary file added macos-standard-icons/icon117.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon118.icns
Binary file not shown.
Binary file added macos-standard-icons/icon118.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon119.icns
Binary file not shown.
Binary file added macos-standard-icons/icon119.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon12.icns
Binary file not shown.
Binary file added macos-standard-icons/icon12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon120.icns
Binary file not shown.
Binary file added macos-standard-icons/icon120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos-standard-icons/icon121.icns
Binary file not shown.
Binary file added macos-standard-icons/icon121.png
Binary file added macos-standard-icons/icon122.icns
Binary file not shown.
Binary file added macos-standard-icons/icon122.png
Binary file added macos-standard-icons/icon123.icns
Binary file not shown.
Binary file added macos-standard-icons/icon123.png
Binary file added macos-standard-icons/icon124.icns
Binary file not shown.
Binary file added macos-standard-icons/icon124.png
Binary file added macos-standard-icons/icon125.icns
Binary file not shown.
Binary file added macos-standard-icons/icon125.png
Binary file added macos-standard-icons/icon126.icns
Binary file not shown.
Binary file added macos-standard-icons/icon126.png
Binary file added macos-standard-icons/icon127.icns
Binary file not shown.
Binary file added macos-standard-icons/icon127.png
Binary file added macos-standard-icons/icon128.icns
Binary file not shown.
Binary file added macos-standard-icons/icon128.png
Binary file added macos-standard-icons/icon129.icns
Binary file not shown.
Binary file added macos-standard-icons/icon129.png
Binary file added macos-standard-icons/icon13.icns
Binary file not shown.
Binary file added macos-standard-icons/icon13.png
Binary file added macos-standard-icons/icon130.icns
Binary file not shown.
Binary file added macos-standard-icons/icon130.png
Binary file added macos-standard-icons/icon131.icns
Binary file not shown.
Binary file added macos-standard-icons/icon131.png
Binary file added macos-standard-icons/icon132.icns
Binary file not shown.
Binary file added macos-standard-icons/icon132.png
Binary file added macos-standard-icons/icon133.icns
Binary file not shown.
Binary file added macos-standard-icons/icon133.png
Binary file added macos-standard-icons/icon134.icns
Binary file not shown.
Binary file added macos-standard-icons/icon134.png
Binary file added macos-standard-icons/icon135.icns
Binary file not shown.
Binary file added macos-standard-icons/icon135.png
Binary file added macos-standard-icons/icon136.icns
Binary file not shown.
Binary file added macos-standard-icons/icon136.png
Binary file added macos-standard-icons/icon137.icns
Binary file not shown.
Binary file added macos-standard-icons/icon137.png
Binary file added macos-standard-icons/icon138.icns
Binary file not shown.
Binary file added macos-standard-icons/icon138.png
Binary file added macos-standard-icons/icon139.icns
Binary file not shown.
Binary file added macos-standard-icons/icon139.png
Binary file added macos-standard-icons/icon14.icns
Binary file not shown.
Binary file added macos-standard-icons/icon14.png
Binary file added macos-standard-icons/icon140.icns
Binary file not shown.
Binary file added macos-standard-icons/icon140.png
Binary file added macos-standard-icons/icon141.icns
Binary file not shown.
Binary file added macos-standard-icons/icon141.png
Binary file added macos-standard-icons/icon142.icns
Binary file not shown.
Binary file added macos-standard-icons/icon142.png
Binary file added macos-standard-icons/icon143.icns
Binary file not shown.
Binary file added macos-standard-icons/icon143.png
Binary file added macos-standard-icons/icon144.icns
Binary file not shown.
Binary file added macos-standard-icons/icon144.png
Binary file added macos-standard-icons/icon145.icns
Binary file not shown.
Binary file added macos-standard-icons/icon145.png
Binary file added macos-standard-icons/icon146.icns
Binary file not shown.
Binary file added macos-standard-icons/icon146.png
Binary file added macos-standard-icons/icon147.icns
Binary file not shown.
Binary file added macos-standard-icons/icon147.png
Binary file added macos-standard-icons/icon148.icns
Binary file not shown.
Binary file added macos-standard-icons/icon148.png
Binary file added macos-standard-icons/icon149.icns
Binary file not shown.
Binary file added macos-standard-icons/icon149.png
Binary file added macos-standard-icons/icon15.icns
Binary file not shown.
Binary file added macos-standard-icons/icon15.png
Binary file added macos-standard-icons/icon150.icns
Binary file not shown.
Binary file added macos-standard-icons/icon150.png
Binary file added macos-standard-icons/icon151.icns
Binary file not shown.
Binary file added macos-standard-icons/icon151.png
Binary file added macos-standard-icons/icon152.icns
Binary file not shown.
Binary file added macos-standard-icons/icon152.png
Binary file added macos-standard-icons/icon153.icns
Binary file not shown.
Binary file added macos-standard-icons/icon153.png
Binary file added macos-standard-icons/icon154.icns
Binary file not shown.
Binary file added macos-standard-icons/icon154.png
Binary file added macos-standard-icons/icon155.icns
Binary file not shown.
Binary file added macos-standard-icons/icon155.png
Binary file added macos-standard-icons/icon156.icns
Binary file not shown.
Binary file added macos-standard-icons/icon156.png
Binary file added macos-standard-icons/icon157.icns
Binary file not shown.
Binary file added macos-standard-icons/icon157.png
Binary file added macos-standard-icons/icon158.icns
Binary file not shown.
Binary file added macos-standard-icons/icon158.png
Binary file added macos-standard-icons/icon159.icns
Binary file not shown.
Binary file added macos-standard-icons/icon159.png
Binary file added macos-standard-icons/icon16.icns
Binary file not shown.
Binary file added macos-standard-icons/icon16.png
Binary file added macos-standard-icons/icon160.icns
Binary file not shown.
Binary file added macos-standard-icons/icon160.png
Binary file added macos-standard-icons/icon161.icns
Binary file not shown.
Binary file added macos-standard-icons/icon161.png
Binary file added macos-standard-icons/icon162.icns
Binary file not shown.
Binary file added macos-standard-icons/icon162.png
Binary file added macos-standard-icons/icon163.icns
Binary file not shown.
Binary file added macos-standard-icons/icon163.png
Binary file added macos-standard-icons/icon164.icns
Binary file not shown.
Binary file added macos-standard-icons/icon164.png
Binary file added macos-standard-icons/icon165.icns
Binary file not shown.
Binary file added macos-standard-icons/icon165.png
Binary file added macos-standard-icons/icon166.icns
Binary file not shown.
Binary file added macos-standard-icons/icon166.png
Binary file added macos-standard-icons/icon167.icns
Binary file not shown.
Binary file added macos-standard-icons/icon167.png
Binary file added macos-standard-icons/icon168.icns
Binary file not shown.
Binary file added macos-standard-icons/icon168.png
Binary file added macos-standard-icons/icon169.icns
Binary file not shown.
Binary file added macos-standard-icons/icon169.png
Binary file added macos-standard-icons/icon17.icns
Binary file not shown.
Binary file added macos-standard-icons/icon17.png
Binary file added macos-standard-icons/icon170.icns
Binary file not shown.
Binary file added macos-standard-icons/icon170.png
Binary file added macos-standard-icons/icon171.icns
Binary file not shown.
Binary file added macos-standard-icons/icon171.png
Binary file added macos-standard-icons/icon172.icns
Binary file not shown.
Binary file added macos-standard-icons/icon172.png
Binary file added macos-standard-icons/icon173.icns
Binary file not shown.
Binary file added macos-standard-icons/icon173.png
Binary file added macos-standard-icons/icon174.icns
Binary file not shown.
Binary file added macos-standard-icons/icon174.png
Binary file added macos-standard-icons/icon175.icns
Binary file not shown.
Binary file added macos-standard-icons/icon175.png
Binary file added macos-standard-icons/icon176.icns
Binary file not shown.
Binary file added macos-standard-icons/icon176.png
Binary file added macos-standard-icons/icon177.icns
Binary file not shown.
Binary file added macos-standard-icons/icon177.png
Binary file added macos-standard-icons/icon178.icns
Binary file not shown.
Binary file added macos-standard-icons/icon178.png
Binary file added macos-standard-icons/icon179.icns
Binary file not shown.
Binary file added macos-standard-icons/icon179.png
Binary file added macos-standard-icons/icon18.icns
Binary file not shown.
Binary file added macos-standard-icons/icon18.png
Binary file added macos-standard-icons/icon180.icns
Binary file not shown.
Binary file added macos-standard-icons/icon180.png
Binary file added macos-standard-icons/icon181.icns
Binary file not shown.
Binary file added macos-standard-icons/icon181.png
Binary file added macos-standard-icons/icon19.icns
Binary file not shown.
Binary file added macos-standard-icons/icon19.png
Binary file added macos-standard-icons/icon2.icns
Binary file not shown.
Binary file added macos-standard-icons/icon2.png
Binary file added macos-standard-icons/icon20.icns
Binary file not shown.
Binary file added macos-standard-icons/icon20.png
Binary file added macos-standard-icons/icon21.icns
Binary file not shown.
Binary file added macos-standard-icons/icon21.png
Binary file added macos-standard-icons/icon22.icns
Binary file not shown.
Binary file added macos-standard-icons/icon22.png
Binary file added macos-standard-icons/icon23.icns
Binary file not shown.
Binary file added macos-standard-icons/icon23.png
Binary file added macos-standard-icons/icon24.icns
Binary file not shown.
Binary file added macos-standard-icons/icon24.png
Binary file added macos-standard-icons/icon25.icns
Binary file not shown.
Binary file added macos-standard-icons/icon25.png
Binary file added macos-standard-icons/icon26.icns
Binary file not shown.
Binary file added macos-standard-icons/icon26.png
Binary file added macos-standard-icons/icon27.icns
Binary file not shown.
Binary file added macos-standard-icons/icon27.png
Binary file added macos-standard-icons/icon28.icns
Binary file not shown.
Binary file added macos-standard-icons/icon28.png
Binary file added macos-standard-icons/icon29.icns
Binary file not shown.
Binary file added macos-standard-icons/icon29.png
Binary file added macos-standard-icons/icon3.icns
Binary file not shown.
Binary file added macos-standard-icons/icon3.png
Binary file added macos-standard-icons/icon30.icns
Binary file not shown.
Binary file added macos-standard-icons/icon30.png
Binary file added macos-standard-icons/icon31.icns
Binary file not shown.
Binary file added macos-standard-icons/icon31.png
Binary file added macos-standard-icons/icon32.icns
Binary file not shown.
Binary file added macos-standard-icons/icon32.png
Binary file added macos-standard-icons/icon33.icns
Binary file not shown.
Binary file added macos-standard-icons/icon33.png
Binary file added macos-standard-icons/icon34.icns
Binary file not shown.
Binary file added macos-standard-icons/icon34.png
Binary file added macos-standard-icons/icon35.icns
Binary file not shown.
Binary file added macos-standard-icons/icon35.png
Binary file added macos-standard-icons/icon36.icns
Binary file not shown.
Binary file added macos-standard-icons/icon36.png
Binary file added macos-standard-icons/icon37.icns
Binary file not shown.
Binary file added macos-standard-icons/icon37.png
Binary file added macos-standard-icons/icon38.icns
Binary file not shown.
Binary file added macos-standard-icons/icon38.png
Binary file added macos-standard-icons/icon39.icns
Binary file not shown.
Binary file added macos-standard-icons/icon39.png
Binary file added macos-standard-icons/icon4.icns
Binary file not shown.
Binary file added macos-standard-icons/icon4.png
Binary file added macos-standard-icons/icon40.icns
Binary file not shown.
Binary file added macos-standard-icons/icon40.png
Binary file added macos-standard-icons/icon41.icns
Binary file not shown.
Binary file added macos-standard-icons/icon41.png
Binary file added macos-standard-icons/icon42.icns
Binary file not shown.
Binary file added macos-standard-icons/icon42.png
Binary file added macos-standard-icons/icon43.icns
Binary file not shown.
Binary file added macos-standard-icons/icon43.png
Binary file added macos-standard-icons/icon44.icns
Binary file not shown.
Binary file added macos-standard-icons/icon44.png
Binary file added macos-standard-icons/icon45.icns
Binary file not shown.
Binary file added macos-standard-icons/icon45.png
Binary file added macos-standard-icons/icon46.icns
Binary file not shown.
Binary file added macos-standard-icons/icon46.png
Binary file added macos-standard-icons/icon47.icns
Binary file not shown.
Binary file added macos-standard-icons/icon47.png
Binary file added macos-standard-icons/icon48.icns
Binary file not shown.
Binary file added macos-standard-icons/icon48.png
Binary file added macos-standard-icons/icon49.icns
Binary file not shown.
Binary file added macos-standard-icons/icon49.png
Binary file added macos-standard-icons/icon5.icns
Binary file not shown.
Binary file added macos-standard-icons/icon5.png
Binary file added macos-standard-icons/icon50.icns
Binary file not shown.
Binary file added macos-standard-icons/icon50.png
Binary file added macos-standard-icons/icon51.icns
Binary file not shown.
Binary file added macos-standard-icons/icon51.png
Binary file added macos-standard-icons/icon52.icns
Binary file not shown.
Binary file added macos-standard-icons/icon52.png
Binary file added macos-standard-icons/icon53.icns
Binary file not shown.
Binary file added macos-standard-icons/icon53.png
Binary file added macos-standard-icons/icon54.icns
Binary file not shown.
Binary file added macos-standard-icons/icon54.png
Binary file added macos-standard-icons/icon55.icns
Binary file not shown.
Binary file added macos-standard-icons/icon55.png
Binary file added macos-standard-icons/icon56.icns
Binary file not shown.
Binary file added macos-standard-icons/icon56.png
Binary file added macos-standard-icons/icon57.icns
Binary file not shown.
Binary file added macos-standard-icons/icon57.png
Binary file added macos-standard-icons/icon58.icns
Binary file not shown.
Binary file added macos-standard-icons/icon58.png
Binary file added macos-standard-icons/icon59.icns
Binary file not shown.
Binary file added macos-standard-icons/icon59.png
Binary file added macos-standard-icons/icon6.icns
Binary file not shown.
Binary file added macos-standard-icons/icon6.png
Binary file added macos-standard-icons/icon60.icns
Binary file not shown.
Binary file added macos-standard-icons/icon60.png
Binary file added macos-standard-icons/icon61.icns
Binary file not shown.
Binary file added macos-standard-icons/icon61.png
Binary file added macos-standard-icons/icon62.icns
Binary file not shown.
Binary file added macos-standard-icons/icon62.png
Binary file added macos-standard-icons/icon63.icns
Binary file not shown.
Binary file added macos-standard-icons/icon63.png
Binary file added macos-standard-icons/icon64.icns
Binary file not shown.
Binary file added macos-standard-icons/icon64.png
Binary file added macos-standard-icons/icon65.icns
Binary file not shown.
Binary file added macos-standard-icons/icon65.png
Binary file added macos-standard-icons/icon66.icns
Binary file not shown.
Binary file added macos-standard-icons/icon66.png
Binary file added macos-standard-icons/icon67.icns
Binary file not shown.
Binary file added macos-standard-icons/icon67.png
Binary file added macos-standard-icons/icon68.icns
Binary file not shown.
Binary file added macos-standard-icons/icon68.png
Binary file added macos-standard-icons/icon69.icns
Binary file not shown.
Binary file added macos-standard-icons/icon69.png
Binary file added macos-standard-icons/icon7.icns
Binary file not shown.
Binary file added macos-standard-icons/icon7.png
Loading

0 comments on commit fb3fd50

Please sign in to comment.