Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: modify metadata_enricher to only write relevant metadata found #143

Open
msramalho opened this issue Jun 5, 2024 · 0 comments
Open
Labels
enhancement New feature or request enricher

Comments

@msramalho
Copy link
Contributor

Currently all metadata is extracted from a file, the goal is to have an option in this enricher that only extracts metadata if specified from a list, example: [gps, datetimes, author]

So the gps would only find lat/lon information, example parsing logic from the direct output of exiftool:

def extract_coordinates(metadata):
	d_metadata = {l.split(":")[0].strip(): l.split(":", maxsplit=2)[1].strip() for l in metadata.split("\n") if ":" in l}
	gps_metdata = {}
	for k in d_metadata:
		kl = k.lower()
		if ("gps" in kl or "latitude" in kl or "longitude" in kl) and len(d_metadata[k]):
			gps_metdata[k] = d_metadata[k]
	if len(gps_metdata): return gps_metdata
	return False

Something similar could be designed for create_date!=modify_date or other relevant information found.

@msramalho msramalho added enhancement New feature or request enricher labels Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request enricher
Projects
None yet
Development

No branches or pull requests

1 participant