Changing font unattended in writer docs

I have a certain number of writer files, and I would like to change the font at once w/o opening each file for this, either from shell or using api.

My apologies if this has been done, however I am not acquainted about the libreoffice API.