New Feature: ODT (Open Document Type) Import

Thanks to Brad Payne from BC Campus, who has contributed a new import module to PressBooks: ODT (Open Document Type, the Open Office/Libre Office wordprocessing filetype) import.

The new importer will ingest an ODT file, and decide where new chapters are based on H1 tags in the document. Initial testing has been positive. Known issues include stripping of all styling tags….

To import your file:

  1. Goto Utilities –> Import
  2. Select  ODT file type
  3. Choose your file from your computer
  4. Select which chapters you want to import
  5. Decide whether the chapters are frontmatter, chapters, or backmatter
  6. Start importing.

Update:

Styling now supported. Thanks Brad!

See below for some screenshots.

Utilities-->Import

Utilities–>Import

Select File Type

Select File Type

Choose a File and Upload

Choose a File and Upload

Select Chapters and Import

Select Chapters and Import

Thanks to Brad for the hard work.

 

 

Linkedin

7 thoughts on “New Feature: ODT (Open Document Type) Import

  1. …strips all styling?

    That’s a pretty big “known issue”. This is the 21st Century; simply importing ASCII text without losing any is not much of a thing any more.

    Not ready for prime time IMHO.

  2. bdolor

    Indeed, if you’ve styled your .odt content in with a Comic Sans font, sized it 36pt and coloured it neon green, it will not be preserved. This is good thing even if the last century is your frame of reference. HTML tags (p, ul, li, h1-h6, table, etc) are present after importing content from an .odt file — styling is determined by the .css file on your PB instance. Bold, italic and underline are styles reasonable to consider preserving from an .odt file, and would be relatively low hanging fruit if anyone wants to jump in and contribute some code. If no one else does, I’ll take a look at it in the next few weeks.

Leave a Reply

Your email address will not be published. Required fields are marked *