Latest 1.3
Homepage https://github.com/levigroker/GRKHTMLSummary
License Creative Commons Attribution 3.0 Unported License
Platforms ios 7.0, osx 10.9
Frameworks Foundation
Authors

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.

Latest podspec

{
    "name": "GRKHTMLSummary",
    "version": "1.3",
    "summary": "Creates a plaintext rendering of HTML body content.",
    "description": "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.",
    "homepage": "https://github.com/levigroker/GRKHTMLSummary",
    "license": "Creative Commons Attribution 3.0 Unported License",
    "authors": {
        "Levi Brown": "[email protected]"
    },
    "social_media_url": "https://twitter.com/levigroker",
    "source": {
        "git": "https://github.com/levigroker/GRKHTMLSummary.git",
        "tag": "1.3"
    },
    "platforms": {
        "ios": "7.0",
        "osx": "10.9"
    },
    "source_files": "GRKHTMLSummary/**/*.{h,m}",
    "frameworks": "Foundation"
}

Pin It on Pinterest

Share This