Re: [Gramps-devel] Batch editing media object paths
Joshua Herman <[email protected]>
| Newsgroups | gmane.comp.genealogy.gramps.user,gmane.comp.genealogy.gramps.devel |
|---|---|
| Message-ID | <CAAfsMHCUGeWMe9xxafFdnvamcD0KWh2ph9=YWyK-0L5DefwGog@mail.gmail.com> |
Wow! This looks like it will do the trick. I have a Python script already to do the renaming part. This is incredibly handy. Thanks all. On Mon, Apr 4, 2022 at 3:10 PM Dave Scheipers <[email protected]> wrote: > There is the Media Verify tool. > > https://gramps-project.org/wiki/index.php/Addon:Media_Verify_Tool > > When you add an image file to Gramps, its checksum information is also > stored with its Gramps record. > > If you rename a file or move it within the base media path set in > preferences, the media verify tool will find the new path and file name and > automatically update the Path field in the Gramps record. > > If you have made edits to the raw image file; edit, crop, etc, there is a > Generate option in the tool to reset all checksums. Do this BEFORE doing > any renaming or moving of the image files so Gramps will be able "find" > them again once you do the renaming/move activity. > > This does not help with the actual renaming of the raw image files, only > updating Gramps once that action is complete. > > Dave > > > On Mon, Apr 4, 2022 at 1:01 PM Joshua Herman <[email protected]> > wrote: > >> Hi everyone, >> >> Currently, my census record names are all in the following format: >> census_<year>_<country>_<province/state>_<town/city>_<head of house last >> name>_<first name>.jpg. This is causing quite a bit of redundancy, since >> there are many census records where more than one head of household >> appears >> in my family tree. I'd like to switch to an individual-agnostic format by >> maybe replacing the last and first names with the page number or something >> like that, but the task of going through and manually changing each media >> object's path is a bit daunting. Therefore, I'd like to know a) what >> format >> you all use to name census record images and b) if there is an automated >> tool to get this done for me. >> >> I'm considering creating a Python tool that takes in a .csv of the >> original >> file name and the desired one and updates both the file name and the >> GRAMPS >> reference, but if something like this already exists then I don't want to >> reinvent the wheel! Plus, I'm not very familiar with best practices when >> it >> comes to editing GRAMPS data programmatically, so any light shed on this >> topic is also much appreciated. >> >> Regards, >> Josh >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> >> _______________________________________________ >> Gramps-devel mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/gramps-devel >> > -------------- next part -------------- An HTML attachment was scrubbed... -- Gramps-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gramps-users https://gramps-project.org