libextractor  1.11
About: GNU libextractor is a library used to extract meta-data from files of arbitrary type.
  Fossies Dox: libextractor-1.11.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

odf_extractor.c File Reference

plugin to support ODF files More...

#include "platform.h"
#include <ctype.h>
#include "extractor.h"
#include "unzip.h"
Include dependency graph for odf_extractor.c:

Go to the source code of this file.

Data Structures

struct  Matches
 

Macros

#define MAXFILENAME   256
 
#define METAFILE   "meta.xml"
 

Functions

static char * libextractor_oo_getmimetype (struct EXTRACTOR_UnzipFile *uf)
 
void EXTRACTOR_odf_extract_method (struct EXTRACTOR_ExtractContext *ec)
 

Variables

static struct Matches tmap []
 

Detailed Description

plugin to support ODF files

Author
Christian Grothoff

Definition in file odf_extractor.c.

Macro Definition Documentation

◆ MAXFILENAME

#define MAXFILENAME   256

Maximum length of a filename allowed inside the ZIP archive.

Definition at line 33 of file odf_extractor.c.

◆ METAFILE

#define METAFILE   "meta.xml"

Name of the file with the meta-data in OO documents.

Definition at line 38 of file odf_extractor.c.

Function Documentation

◆ EXTRACTOR_odf_extract_method()

◆ libextractor_oo_getmimetype()

static char* libextractor_oo_getmimetype ( struct EXTRACTOR_UnzipFile uf)
static

Obtain the mimetype of the archive by reading the 'mimetype' file of the ZIP.

Parameters
ufunzip context to extract the mimetype from
Returns
NULL if no mimetype could be found, otherwise the mime type

Definition at line 88 of file odf_extractor.c.

References EXTRACTOR_common_unzip_close_current_file(), EXTRACTOR_common_unzip_get_current_file_info(), EXTRACTOR_common_unzip_go_find_local_file(), EXTRACTOR_common_unzip_open_current_file(), EXTRACTOR_common_unzip_read_current_file(), EXTRACTOR_UNZIP_OK, MAXFILENAME, NULL, and EXTRACTOR_UnzipFileInfo::uncompressed_size.

Referenced by EXTRACTOR_odf_extract_method().

Variable Documentation

◆ tmap

struct Matches tmap[]
static
Initial value:
= {
{ "meta:page-count", EXTRACTOR_METATYPE_PAGE_COUNT },
{ "meta:creation-date", EXTRACTOR_METATYPE_CREATION_DATE },
{ "dc:creator", EXTRACTOR_METATYPE_CREATOR },
{ "dc:language", EXTRACTOR_METATYPE_LANGUAGE },
{ "dc:title", EXTRACTOR_METATYPE_TITLE },
{ "dc:description", EXTRACTOR_METATYPE_DESCRIPTION },
{ "dc:subject", EXTRACTOR_METATYPE_SUBJECT },
{ "meta:keyword", EXTRACTOR_METATYPE_KEYWORDS },
{ "meta:user-defined meta:name=\"Info 1\"", EXTRACTOR_METATYPE_COMMENT },
{ "meta:user-defined meta:name=\"Info 2\"", EXTRACTOR_METATYPE_COMMENT },
{ "meta:user-defined meta:name=\"Info 3\"", EXTRACTOR_METATYPE_COMMENT },
{ "meta:user-defined meta:name=\"Info 4\"", EXTRACTOR_METATYPE_COMMENT },
{ NULL, 0 }
}
#define NULL
Definition: getopt1.c:60
@ EXTRACTOR_METATYPE_UNKNOWN_DATE
Definition: extractor.h:195
@ EXTRACTOR_METATYPE_LANGUAGE
Definition: extractor.h:157
@ EXTRACTOR_METATYPE_COMMENT
Definition: extractor.h:131
@ EXTRACTOR_METATYPE_TITLE
Definition: extractor.h:134
@ EXTRACTOR_METATYPE_CREATED_BY_SOFTWARE
Definition: extractor.h:194
@ EXTRACTOR_METATYPE_CREATOR
Definition: extractor.h:189
@ EXTRACTOR_METATYPE_CREATION_DATE
Definition: extractor.h:196
@ EXTRACTOR_METATYPE_KEYWORDS
Definition: extractor.h:185
@ EXTRACTOR_METATYPE_PAGE_COUNT
Definition: extractor.h:141
@ EXTRACTOR_METATYPE_SUBJECT
Definition: extractor.h:188
@ EXTRACTOR_METATYPE_DESCRIPTION
Definition: extractor.h:182

NULL-terminated map from ODF meta data strings to LE types.

Definition at line 1 of file odf_extractor.c.

Referenced by EXTRACTOR_odf_extract_method().