Debian Codegraph @

util/find_argl_profiles.py

raw
1 #!/usr/bin/env python3
2 import os
3 import sys
4
5 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
6
7 from DisplayCAL import ICCProfile as iccp
8 from DisplayCAL.defaultpaths import ICCPROFILES, ICCPROFILES_HOME
9
10 for p in set(ICCPROFILES_HOME + ICCPROFILES):
11 if os.path.isdir(p):
12 for f in os.listdir(p):
13 try:
14 profile = iccp.ICCProfile(os.path.join(p, f))
15 except Exception:
16 pass
17 else:
18 if profile.creator == b"argl":
19 print(f)
20 print("")