doc.go 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. Package office converts between the ArozOS Office suite (the Docs, Sheets
  3. and Slides webapps in src/web/Office) and office file formats.
  4. This package is the front door: it opens and saves the suite's own files -
  5. .docx, .xlsx and .pptx with the editor's copy embedded (native.go) - keeps
  6. the snapshot containers the editors use for sessions (packed.go), and maps
  7. every format the suite can open onto the converter that reads it
  8. (formats.go). Each file format lives in a package of its own:
  9. model the editor document models: the Docs, Sheets and Slides
  10. body JSON and the helpers that belong to them
  11. docx Word 2007+ (.docx) import and export
  12. xlsx Excel 2007+ (.xlsx) import and export
  13. pptx PowerPoint 2007+ (.pptx) import and export
  14. odf OpenDocument (.odt / .ods / .odp) import and export
  15. doc Word 97-2003 (.doc) import, by conversion to .docx
  16. xls Excel 97-2003 (.xls) import, by conversion to .xlsx
  17. ppt PowerPoint 97-2003 (.ppt) import, by conversion to .pptx
  18. pdf real-text PDF export of documents and sheet print models
  19. metafile WMF / EMF pictures rendered into something a browser shows
  20. with the plumbing they share under internal/: the OOXML tree and package
  21. relationships (xmltree), data URLs and media links (media), the editors'
  22. HTML (htmlutil), unit conversions (units), font naming (fonts), the Slides
  23. text model (slidetext), test fixtures (officetest), and for the legacy
  24. binary formats the OLE2 compound file reader (cfb), the Office drawing
  25. records (officeart), Windows code pages (codepage) and the writer of the
  26. OOXML packages they convert into (opc).
  27. Everything is a pure []byte / string transformation with no file I/O and
  28. no globals, which is what lets the same code run behind the "office" AGI
  29. library (src/mod/agi/agi.office.go) and, compiled to WebAssembly, in the
  30. standalone web edition (src/wasm/office).
  31. Author: tobychui
  32. */
  33. package office