OODoc::Manifest(3pm)

πŸ“¦
version 2.125 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

πŸ’– OODoc::Manifest β€” aka OODoc::Manifest(3pm) πŸ’–

User Contributed Perl Documentation, bestie. Yes we're reading the docs, yes it's giving ✨responsible✨, and yes I'm gonna make it fun.


🌸 NAME 🌸

OpenOffice::OODoc::Manifest β€” Access to document file descriptor 🫢


✨ DESCRIPTION ✨

okay so, the OpenOffice::OODoc::manifest class is a specialist derivative of OpenOffice::OODoc::XPath, and what it does is give you access to the content descriptor of an OpenDocument or OpenOffice.org file. no cap. πŸ¦‹

For your ordinary, everyday content-processing applications? Controlling the manifest is not absolutely necessary. Like, member imports or deletions β€” think createImageElement() in OpenOffice::OODoc::Image, or raw_delete() in OpenOffice::OODoc::File β€” can lowkey make the real content inconsistent with the manifest. And up to now? The OpenOffice.org desktop suite literally does not care. πŸ™ˆ But OpenOffice::OODoc::Manifest hands you a few easy-to-use methods to get or set any entry in the manifest, so that's slay. On top of that, it lets users (at their own risk, bestie) create or update any kind of special entry or mime type, with no control whatsoever. There is no automatic consistency check between the manifest and the real content. (But that check, and others, could easily be developed by combining this module with the other ones. just saying. πŸ‘€)

The manifest β€” i.e. the "META-INF/manifest.xml" part of an ODF package β€” is a special member that describes the MIME types and the full internal paths of the other members. iconic, honestly.


πŸŽ€ Methods πŸŽ€

Constructor : OpenOffice::OODoc::Manifest->new(<parameters>)

Short Form: odfManifest(<parameters>)

See OpenOffice::OODoc::XPath->new

The XML member loaded by default is 'META-INF/manifest.xml'.

Example:

    $my manifest = OpenOffice::OODoc::Manifest>new
                        (
                        file    => 'document.odt'
                        );

This returns a new object which represents the member list of an ODF-compliant "document.odt" file. 🫢


getEntry($entry)

Returns the element (if any) corresponding to the given member. ✨

Example:

my $element = $manifest->getEntry("content.xml");

So that returns the element describing the "content.xml" member of the file, if this element is defined. πŸ’…


getMainType()

Returns the main MIME type of the document. For example, this type is

"application/vnd.oasis.opendocument.text"

for an OpenDocument text file, or

"application/vnd.oasis.opendocument.presentation"

for an OpenDocument presentation, or

"application/vnd.sun.xml.writer"

for an OpenOffice.org 1.0 text file, etc. 🌈

See the Appendix C in the OASIS OpenDocument 1.0 specification for a complete list of OpenDocument-compliant MIME types. iykyk πŸ“š


getType($entry)

Returns the media (mime) type of the given member. πŸŽ€


removeEntry($entry)

Deletes the named entry. bye bestie πŸ‘‹


setEntry($entry, $type)

Sets the mime type of an entry element. If the element was not previously existing, it's created. Returns the new element in case of success, undef otherwise.

Example:

my $element = $manifest->setEntry
                        ("content.xml", "text/xml");

This instruction first creates (if needed) an entry for the member "content.xml" and sets its media type to "text/xml". periodt. πŸ’…


setMainEntry($type)

Sets the main MIME type of the document.

Risky; not for ordinary use. ⚠️ But hey β€” nobody prevents you from giving a presentation or spreadsheet MIME type to a Writer document! main character energy, truly unhinged, we love to see it. πŸ”₯

🌟 Properties 🌟

As for OpenOffice::OODoc::XPath. that's it, that's the section 🫢


🌸 Exported functions 🌸

None. zero. zilch. nada. πŸ’€


πŸ¦‹ NOTES πŸ¦‹

See OpenOffice::OODoc::Notes(3) for the footnote citations ([n]) included in this page. yes the little bracketed numbers are a whole thing, go look πŸ‘€


  • Developer/Maintainer: Jean-Marie Gouarne <http://jean.marie.gouarne.online.fr>
  • Contact: jmgdoc@cpan.org
  • Copyright 2004-2008 by Genicorp, S.A. <http://www.genicorp.com>
  • Initial English version of the reference manual by Graeme A. Hunter (graeme.hunter@zen.co.uk).
  • License: GNU Lesser General Public License v2.1

and that's the whole page, bestie!! πŸ’– written for perl v5.34.0, dated 2022-06-16, and filed under OODoc::Manifest(3pm) β€” go forth and manifest (literally) βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from