The quick media viewer.
The core of glance is an index of media files for quick CRUD and search operations. sqlite is a natural choice for this index but other options could be explored. Potential columns in the index would include:
hash
- hash of the media file to easily check for existencefilepath
- location of the media on disk (could be made even more general by using url)format
- media format (ie png, jpg, mp4, ...)created
- media creation timelocation
- media creation location in latitude an longitudedevice
- device name used to capture the mediaiso
- the iso setting used when producing the media (this is a useful proxy for if the media was created indoors or outdoors)
The operations on an Index
include:
create
- create a new empty indexread_from_disk
- read an index from diskwrite_to_disk
- write an index to diskvalidate
- validate an index matches the data on diskadd_directory
- given a directory recursively searches for all media in the directory and adds them to an indexcopy_from_directory
- given a directory copies media to a new directory and updates the index- useful for copying images off of a device
- checks that the images do not already exist using the
hash
- should match the directory and file structure of the destination directory
search
- open search across media fields returning an iterator of matchesnormalize_directory_structure
- has a variety of options for standardizing image naming on disk (ex./<year>/<nanosecond_timestamp>.<ext>
)
A CLI wrapper over glance-lib
to create and manage indexes. Its search functionality would output matching filepaths or produce a directory of symlinks.
A UI wrapper over glance-lib
with search functionality and media viewer.