diff --git a/Structure-of-the-code.md b/Structure-of-the-code.md index d6d9d34..d372f50 100644 --- a/Structure-of-the-code.md +++ b/Structure-of-the-code.md @@ -1 +1,30 @@ -blah \ No newline at end of file +osxphotos is built around a set of classes that each handle a particular aspect of the Photos library: + +* PhotosDB: reads the Photos library database and extract all relevant metadata about each photo. This is starting point for any use of osxphotos. +* PhotoInfo: represents an individual photo in the library and all associated metadata. +* AlbumInfo: represents an album in the library. +* FolderInfo: represents a folder in the library. +* PlaceInfo: represents the reverse geolocation info (e.g. the address or place name) associated with a photo. +* ExifTool: provides an interface to the [exiftool](https://exiftool.org/) tool for manipulating EXIF information associated with a photo. + +The package code is organized in osxphotos thusly: + +``` +osxphotos +├── __init__.py # this is what gets read by "import osxphotos" +├── __main__.py # the command line interface, what gets executed with python3 -m osxphotos +├── _applescript # contains a copy of pyapplescript from https://github.com/rdhyee/py-applescript +├── _constants.py # constants used by the other modules +├── _version.py # version string +├── albuminfo.py # AlbumInfo and FolderInfo classes +├── datetime_formatter.py # utility methods for formatting datetime objects +├── exiftool.py # ExifTool class +├── photoinfo.py # PhotoInfo class +├── photosdb.py # PhotosDB class +├── placeinfo.py # PlaceInfo class +├── template.py # constants used by the PhotoInfo.render_template() method +├── templates # contains mako templates, see https://www.makotemplates.org/ +│ └── xmp_sidecar.mako +└── utils.py +``` +