• Stars
    star
    103
  • Rank 331,220 (Top 7 %)
  • Language
    Python
  • Created over 12 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A small Python module that gives you nice human readable Macintosh model names, e.g. "iMac (27-inch, Late 2009)", when given a serial number or model code.

MacModelShelf

What?

A small Python module that gives you nice human readable Macintosh model names, e.g. "iMac (27-inch, Late 2009)", when given a serial number or model code. It uses shelve to keep a persistent dictionary of model codes, and looks up unknown model codes from Apple's servers.

How?

In your code:

import macmodelshelf
macmodelshelf.model_code("W12345825RU") # Returns the model code "5RU"
macmodelshelf.model("5RU")              # Returns "iMac (27-inch, Late 2009)"

On the commandline:

% ./macmodelshelf.py 5RU
iMac (27-inch, Late 2009)

Dump?

% ./macmodelshelf.py dump-json
macmodelshelfdump = {
    "000": "Power Mac G5",
    "00W": "Xserve (Late 2006)",
    "01P": "MacBook (13-inch, Late 2007)",
...
}
% ./macmodelshelf.py dump-markdown
Code | Model
:--- | :---
`000` | Power Mac G5
`00W` | Xserve (Late 2006)
`01P` | MacBook (13-inch, Late 2007)
...

For a dump of all the models in the current cache, see dump.markdown.

License

Copyright 2012-2018 Per Olofsson, University of Gothenburg. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

More Repositories

1

AutoDMG

Create deployable system images from OS X installer
Python
1,217
star
2

CreateUserPkg

This project has been archived and is no longer maintained
PostScript
262
star
3

Create-Recovery-Partition-Installer

Shell
244
star
4

LoginScriptPlugin

Execute scripts when a user logs in on Mac OS X.
C
113
star
5

u4remastered

Ultima IV Remastered for the C64
Assembly
102
star
6

LoginLog

Display a log window over the login window.
Python
88
star
7

SkipAppleSetupAssistant

Disable OS X first boot Setup Assistant
Shell
63
star
8

AutoDMGUpdateProfiles

Scripts for maintaining AutoDMG's UpdateProfiles.plist
Python
59
star
9

ArcadeGameSelector

Amiga game menu
Eiffel
50
star
10

Scripted-Mac-Package-Creation

This project has been archived and is no longer maintained
Shell
35
star
11

fifogfx

Open source graphics card
KiCad Layout
31
star
12

MVPCStruct

Class for packing and unpacking C structs in Swift
Swift
27
star
13

CGTerm

C/G telnet client for C64 BBS's
C
25
star
14

iLife-repackaging

This project has been archived and is no longer maintained
Python
21
star
15

Profile-Manager-CLI

This project has been archived and is no longer maintained
Python
17
star
16

AutoDSNBI

This project has been archived and is no longer maintained
Shell
16
star
17

AsmAstar

A* pathfinding in 6502 assembler.
C
13
star
18

MacTech-2016

Build your first Mac app with Xcode
Objective-C
9
star
19

Ptolemy

Shell
8
star
20

extractinstalls

Generate installs key for Munki pkginfo files given an installer package.
Python
7
star
21

u4talk

Ultima IV Dialogue
HTML
7
star
22

AsmHeap

Heap data structure in 6502 assembler
C
5
star
23

MunkiReport-Python

Shell
5
star
24

magervalp.github.com

GitHub Pages
CSS
3
star
25

SimpleCLI

Command line interface for SimpleMDM script jobs
Python
3
star
26

DAFGU-Migration-Status

This project has been archived and is no longer maintained
Objective-C
3
star
27

SimpleMDMTools

Python
2
star
28

vbcc-conio

conio library for vbcc 6502 targets
C
2
star
29

DAFGU-rsync-wrapper

This project has been archived and is no longer maintained
Python
1
star
30

CHeap

Experimenting with priority queues using heaps for A*
Objective-C
1
star
31

MTB

Köpråd för din första mountainbike
1
star
32

SwiftHeap

Testing Swift's performance with my heap priority queue.
Swift
1
star