https://github.com/gocaio/metagopenoffice
OpenOffice Metadata Extractor for Goca
https://github.com/gocaio/metagopenoffice
go goca golang hacking metadata openoffice osint
Last synced: 12 months ago
JSON representation
OpenOffice Metadata Extractor for Goca
- Host: GitHub
- URL: https://github.com/gocaio/metagopenoffice
- Owner: gocaio
- License: apache-2.0
- Created: 2019-04-24T18:13:05.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-24T18:50:39.000Z (about 7 years ago)
- Last Synced: 2024-06-20T17:33:49.838Z (about 2 years ago)
- Topics: go, goca, golang, hacking, metadata, openoffice, osint
- Language: Go
- Homepage:
- Size: 817 KB
- Stars: 2
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# metagopenoffice
[](https://travis-ci.org/kevinborras/metagopenoffice)
[](https://goreportcard.com/badge/github.com/kevinborras/metagopenoffice)
Open Office metadata extractor written in Go
The main features of metagopenoffice are:
* Read metadata of odt files.
* Read metadata of odp files.
* Read metadata of ods files.
## How to use ?
---
```golang
package main
import (
"fmt"
"log"
"os"
"github.com/gocaio/metagopenoffice"
)
func main() {
file, err := os.Open("../test/test.odt")
if err != nil {
log.Fatal(err)
}
file.Close()
content, err := gopenoffice.GetMetada(file)
if err != nil {
log.Fatal(err)
}
fmt.Println("Generator: ", content.Meta.Generator)
fmt.Println("InitialCreator: ", content.Meta.InitialCreator)
fmt.Println("CreationDate: ", content.Meta.CreationDate)
fmt.Println("Creator: ", content.Meta.Creator)
fmt.Println("Date: ", content.Meta.Date)
fmt.Println("Language: ", content.Meta.Language)
fmt.Println("EditingCycles: ", content.Meta.EditingCycles)
fmt.Println("EditingDuration: ", content.Meta.EditingDuration)
fmt.Println("Title: ", content.Meta.Title)
fmt.Println("Description: ", content.Meta.Description)
fmt.Println("Subject: ", content.Meta.Subject)
fmt.Println("PrintDate: ", content.Meta.PrintDate)
fmt.Println("Keyword: ", content.Meta.Keyword)
fmt.Println()
fmt.Println("PageCount: ", content.Meta.Stats.PageCount)
fmt.Println("ImageCount: ", content.Meta.Stats.ImageCount)
fmt.Println("ObjectCount: ", content.Meta.Stats.ObjectCount)
fmt.Println("ParagraphCount: ", content.Meta.Stats.ParagraphCount)
fmt.Println("WordCount: ", content.Meta.Stats.WordCount)
fmt.Println("CharCount: ", content.Meta.Stats.CharCount)
}
```
Output
```bash
Generator: StarOffice/8_Beta$Linux OpenOffice.org_project/680m66$Build-8852$CWS-sdksample
InitialCreator: Jürgen Schmidt
CreationDate: 2002-12-18T12:28:35
Creator: Jürgen Schmidt
Date: 2002-12-18T12:31:15
Language: en-US
EditingCycles: 3
EditingDuration: PT2M40S
Title:
Description:
Subject:
PrintDate:
Keyword:
PageCount: 1
ImageCount: 0
ObjectCount: 0
ParagraphCount: 7
WordCount: 77
CharCount: 511
```