GRKHTMLSummary 1.3.1

GRKHTMLSummary 1.3.1

TestsTested
LangLanguage Obj-CObjective C
License NOASSERTION
ReleasedLast Release Oct 2020

Maintained by Unclaimed.



GRKHTMLSummary

Build Status Version Platform License

A simple utility, which when given the content of an HTML file, will extract the text content from the body, stripping HTML tags, and format the plaintext in such a way as to be used as a "preview" of the body content.

Installing

If you're using CocoPods it's as simple as adding this to your Podfile:

pod 'GRKHTMLSummary'

otherwise, simply add the contents of the GRKHTMLSummary subdirectory to your project.

Documentation

In the simplest usage, you'll simply want to create a GRKHTMLSummary and then call the summaryOfHTMLString:characterCount: method which will return the fully "summarized" body content.

NSString *html = <your html content>
GRKHTMLSummary *summarizer = [[GRKHTMLSummary alloc] init];
NSString *summary = [summarizer summaryOfHTMLString:html characterCount:-1];

NOTE: in practice, it is best to use this on a background queue as, depending on your content, it could block for a perceptible time.

Disclaimer and Licence

About

A professional iOS engineer by day, my name is Levi Brown. Authoring a blog grokin.gs, I am reachable via:

Twitter @levigroker
Email [email protected]

Your constructive comments and feedback are always welcome.