| 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 |
|
| 11 |
for p in set(ICCPROFILES_HOME + ICCPROFILES): |
| 12 |
if os.path.isdir(p): |
| 13 |
for f in os.listdir(p): |
| 14 |
try: |
| 15 |
profile = iccp.ICCProfile(os.path.join(p, f)) |
| 16 |
except Exception: |
| 17 |
pass |
| 18 |
else: |
| 19 |
if profile.version >= 4: |
| 20 |
print(os.path.join(p, f)) |
| 21 |
print( |
| 22 |
"Descriptions:", |
| 23 |
profile.tags.desc.keys(), |
| 24 |
profile.tags.desc.values()[0].keys(), |
| 25 |
) |
| 26 |
print("") |