0

I have a bunch of Apple .pages files stored in a directory structure that I want to convert to .docx or .odt formats. I want some kind of command line script, program, etc which will recursively search the directory structure and convert any .pages files to .docx or .odt formats. Any suggestions? Thanks.

kjakeb
  • 263
  • Which distro and version of Linux are you using? – user68186 Mar 28 '21 at 00:48
  • Ubuntu 20.04.2 LTS – kjakeb Mar 28 '21 at 01:11
  • Have you seen this ? https://askubuntu.com/questions/43430/how-to-open-mac-documents-page-on-libreoffice – mondotofu Mar 28 '21 at 01:29
  • @mondotofu yes, as far as I can tell the answer to that question only allows one to manually convert each document. I have many .pages documents so this is not feasible for me – kjakeb Mar 28 '21 at 01:36
  • Have you learned that you can rename the .page file to a ZIP format and open it with a ZIP utility? There could be a folder with a preview of the first page in JPEG format, and if you're lucky you may find a PDF to preview the document if the author saved the Pages doc with a preview. – mondotofu Mar 28 '21 at 01:46
  • @mondotofu Yes. I need to convert the document into an editable format. – kjakeb Mar 28 '21 at 01:47
  • Some site says that LibreOffice can read the native format now. https://www.phoronix.com/scan.php?page=news_item&px=LibreOffice-Apple-Pages-Numbers – mondotofu Mar 28 '21 at 01:59
  • Do you need to maintain the directory structure? For example, if you had folder1 that contained file1.pages and folder2, and folder2 contained file2.pages, should they all end up in the same folder or should the covered file end up in the same place as the original, eg file2.odt would be in folder2 and file1.odt would be in folder1? – Pixelated Fish Mar 28 '21 at 02:58

1 Answers1

0

I would use a command line option to handle this

libreoffice --convert-to odt  *.pages

it would find any matching Apple pages documents in the current directory and begin the conversion to the desired format, e.g. odt

Good luck.

Note this doesn't work if you have the libreoffice application already open and running somewhere else... this is meant to run in a headless mode.

You may want to try viewing the output from the command

libreoffice --help

to get an idea of other command line options such as formats and working directories to solve your document conversion problem.

mondotofu
  • 777