Re: Batch editing media object paths

Deborah Bennett <[email protected]>
Newsgroups gmane.comp.genealogy.gramps.user,gmane.comp.genealogy.gramps.devel
Message-ID <[email protected]>
This sounds like a a job for a shell script, which would be simpler than a python program. Have you written a shell script before? I did a quick search and found this link which may be helpful. https://unix.stackexchange.com/questions/121570/rename-multiples-files-using-bash-scripting

-deborah

Send email to [email protected]
Share files to [email protected]
Sent from my iPad

> On Apr 4, 2022, at 10:00 AM, 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-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gramps-users
> https://gramps-project.org
-------------- 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.