System Programming - Project
Using FUSE, implement a file system that will make a photo collection easier to navigate. The file system will analyze a directory which contains photo files with IPTC tags and display a hierarchy of these files based on their subject and keyword tag values.
- The top-level directory will contain two-directories: SUBJECTS and KEYWORDS.
- The SUBJECTS directory will display a subdirectory for every subject used in the «Subject Reference» tags of the original photo files. Note that a photo file can have multiple Subject Reference tags. You can find example values for subject references on this page: https://cv.iptc.org/newscodes/subjectcode. A subject directory will list all photo files that have that subject reference tag.
- The KEYWORDS directory will display a subdirectory for every keyword by collecting data from the «Keywords» tags of the original photo files. Again, a photo file can have multiple Keywords tags. A keyword directory will list all photo files that have that keyword tag.
- The file system will not keep any photo files on its own, it will only provide an interface for the underlying directory.
- You can assume that the underlying directory does not have any subfolders.
- Any changes to the tags in the original photo files will be instantly visible through the FUSE-based file system.
- Copying a photo file to a keyword/subject folder in the FUSE-based file system will add that keyword/subject tag to the original photo file.
- Deleting a photo file from a keyword/subject folder in the FUSE-based file system will delete that keyword/subject tag from the original photo file.
For reading IPTC tag data, you can use the following library: https://libiptcdata.sourceforge.net/
This library contains a utility called iptc which can be used to manipulate the tags of photo files.