GithubHelp home page GithubHelp logo

tarsbase / readabilitykit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from exyte/readabilitykit

0.0 1.0 0.0 17.37 MB

Preview extractor for news, articles and full-texts in Swift

License: MIT License

Swift 96.20% Ruby 1.44% Objective-C 2.35%

readabilitykit's Introduction

ReadabilityKit

CI Status Version Carthage Compatible License Platform

NOTE: ReadabilityKit is in maintenance mode. We recommend using SwiftLinkPreview in the new code. We will continue to provide new releases with the latest versions of Xcode.

ReadabilityKit helps you to extract a relevant preview (title, description, image and video) from the URL.

The goal is to try and get the best extraction from the article for servicing applications that need to show a preview of a web URL along with an image.

Inspired by snacktory and newspaper.

Demo

Features

Extracts:

  • Title
  • Description
  • Top image
  • Top video
  • Keywords

Requirements

  • iOS 8.0+ / Mac OS X 10.10+ / tvOS 9.0+ / watchOS 2.0+

Usage

let articleUrl = URL(string: "https://someurl.com/")!
Readability.parse(url: articleUrl, completion: { data in
  let title = data?.title
  let description = data?.description
  let keywords = data?.keywords
  let imageUrl = data?.topImage
  let videoUrl = data?.topVideo
})

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

To install ReadabilityKit, simply add the following line to your Podfile

swift 4.x:

pod 'ReadabilityKit'

swift 3.2:

pod "ReadabilityKit", "0.6.0"

Legacy swift 2.3:

pod "ReadabilityKit", "0.5.4"

Legacy swift 2.2:

pod "ReadabilityKit", "0.5.2"

To integrate ReadabilityKit into your Xcode project using Carthage, specify it in your Cartfile

swift 4.x:

github "exyte/ReadabilityKit"

swift 3.2:

github "exyte/ReadabilityKit" "0.6.0"

Legacy swift 2.3:

github "exyte/ReadabilityKit" "0.5.4"

Legacy swift 2.2:

github "exyte/ReadabilityKit" "0.5.2"

Manually

  1. Install Ji XML parser
  2. Download and drop all files from Sources folder in your project
  3. Congratulations!

Author

This project is maintained by exyte. We design and build mobile and VR/AR applications.

License

ReadabilityKit is available under the MIT license. See the LICENSE file for more info.

readabilitykit's People

Contributors

vhailor13 avatar zapletnev avatar elland avatar lfarah avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.