lu4p / cat Goto Github PK
View Code? Open in Web Editor NEWExtract text from plaintext, .docx, .odt and .rtf files. Pure go.
License: The Unlicense
Extract text from plaintext, .docx, .odt and .rtf files. Pure go.
License: The Unlicense
Untitled.rtf.zip
Unpack the zip to get to the rtf file
This file was generated on Mac by copying chunks of text from Wikipedia to TextEdit.
Using cat.File()
or cat.FromBytes()
the extracted text is incomplete. For example the first 10 words are missing.
I also notice that each new line starts with N
in the extracted text:
Ncommittee and , club president and owner of the land at . After eight years at the stadium, Everton relocated to
Nin 1892 and Houlding founded Liverpool F.C. to play at Anfield.
NOriginally named "Everton F.C. and Athletic Grounds Ltd" (Everton Athletic for short), the club became Liverpool F.C. in March 1892 and gained official recognition three months later, after
Nrefused to recognise the club as Everton.
Liverpool played their first match on 1 September 1892, a pre-season
Nagainst , which they won 7ॡ. The team Liverpool fielded against Rotherham was composed entirely of Scottish players � the players who came from Scotland to play in England in those days were known as the .
Nhad recruited the players after a
Ntrip to Scotland � so they became known as the "team of Macs".
NThe team won the
Nin its debut season and joined the
Nat the start of the 1893翿 season. After the club was promoted to the
Nin 1896,
(snippet from the start of the extracted text)
I'm not sure where changes would need to be made, is it possible to update the library to give a full extraction? I've seen similar issues with odt and docx too. I cannot share those files however.
The go get command no longer works as written. See https://go.dev/doc/go-get-install-deprecation for details. Need to convert to : go install github.com/lu4p/cat@latest
func getUnicode(control string) (bool, string) { if len(control) < 2 || control[0] != '\'' { return false, "" }
This issue provides visibility into Renovate updates and their statuses. Learn more
These problems occurred while renovating this repository.
These updates are pending. To force PRs open, click the checkbox below.
There's a missing break in the loop in retrieveFileContents
:
Lines 57 to 63 in 475e18f
Should be:
func (d *Odt) retrieveFileContents(filename string) ([]byte, error) {
var file *zip.File
for _, f := range d.Files {
if f.Name == filename {
file = f
break
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.