-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathphotoElement.py
More file actions
32 lines (25 loc) · 872 Bytes
/
photoElement.py
File metadata and controls
32 lines (25 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from datetime import datetime, date
class PhotoElement():
"""A Object holding the information of the photo"""
_path = ""
_date = datetime.today().date()
_tags = []
_rating = 0
def __init__(self, path, date, tags, rating):
"""path: path of photo including filename, date: date photo was taken [datetime.date], tags: xmp tags [list], rating: 0-5"""
self._path = path
self._date = date
self._tags = tags
self._rating = rating
def path(self):
"""returns the path of the photo"""
return self._path
def date(self):
"""returns the date of the photo"""
return self._date
def tags(self):
"""returns the tags of the photo"""
return self._tags
def rating(self):
"""returns the rating of the photo"""
return self._rating