Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #60 from stuartbreckenridge/main
Browse files Browse the repository at this point in the history
RSParser as a swift package
  • Loading branch information
vincode-io authored Jul 30, 2020
2 parents 93ccfb0 + ec7dc53 commit d7b10ca
Show file tree
Hide file tree
Showing 123 changed files with 255 additions and 250 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/build.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "RSParser",
platforms: [.macOS(SupportedPlatform.MacOSVersion.v10_15), .iOS(SupportedPlatform.IOSVersion.v13)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "RSParser",
type: .dynamic,
targets: ["RSParser"]),
.library(
name: "RSParserObjC",
type: .dynamic,
targets: ["RSParserObjC"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "RSParser",
dependencies: ["RSParserObjC"],
path: "Sources/Swift"),
.target(
name: "RSParserObjC",
dependencies: [],
path: "Sources/ObjC",
cSettings: [
.headerSearchPath("include")
]),
.testTarget(
name: "RSParserTests",
dependencies: ["RSParser"],
exclude: ["RSDateParserTests.m", "Info.plist"],
resources: [.copy("Resources")]),
]
)
5 changes: 0 additions & 5 deletions Sources/FeedServices/README.md

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
// Copyright © 2017 Ranchero Software, LLC. All rights reserved.
//

#import <RSParser/NSData+RSParser.h>
#import "NSData+RSParser.h"




/* TODO: find real-world cases where the isProbably* cases fail when they should succeed, and add them to tests.*/

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
// Copyright © 2015 Ranchero Software, LLC. All rights reserved.
//

#import "NSString+RSParser.h"
#import <CommonCrypto/CommonDigest.h>
#import <RSParser/NSString+RSParser.h>




@interface NSScanner (RSParser)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 11 additions & 9 deletions Sources/Feeds/XML/RSAtomParser.m → Sources/ObjC/RSAtomParser.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@
// Copyright (c) 2015 Ranchero Software LLC. All rights reserved.
//


#import "RSAtomParser.h"
#import "RSSAXParser.h"
#import "RSParsedFeed.h"
#import "RSParsedArticle.h"
#import "NSString+RSParser.h"
#import "RSDateParser.h"
#import "ParserData.h"
#import "RSParsedEnclosure.h"
#import "RSParsedAuthor.h"

#import <libxml/xmlstring.h>
#import <RSParser/RSAtomParser.h>
#import <RSParser/RSSAXParser.h>
#import <RSParser/RSParsedFeed.h>
#import <RSParser/RSParsedArticle.h>
#import <RSParser/NSString+RSParser.h>
#import <RSParser/RSDateParser.h>
#import <RSParser/ParserData.h>
#import <RSParser/RSParsedEnclosure.h>
#import <RSParser/RSParsedAuthor.h>

@interface RSAtomParser () <RSSAXParserDelegate>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
//


#import "RSDateParser.h"
#import <time.h>
#import <RSParser/RSDateParser.h>


typedef struct {
const char *abbreviation;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
//


#import "RSHTMLLinkParser.h"
#import "RSSAXHTMLParser.h"
#import "RSSAXParser.h"
#import "RSParserInternal.h"
#import "ParserData.h"

#import <libxml/xmlstring.h>
#import <RSParser/RSHTMLLinkParser.h>
#import <RSParser/RSSAXHTMLParser.h>
#import <RSParser/RSSAXParser.h>
#import <RSParser/RSParserInternal.h>
#import <RSParser/ParserData.h>



@interface RSHTMLLinkParser() <RSSAXHTMLParserDelegate>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
//

#import <RSParser/RSHTMLMetadata.h>
#import <RSParser/RSParserInternal.h>
#import <RSParser/RSHTMLTag.h>
#import "RSHTMLMetadata.h"
#import "RSParserInternal.h"
#import "RSHTMLTag.h"



static NSString *urlStringFromDictionary(NSDictionary *d);
static NSString *absoluteURLStringWithRelativeURLString(NSString *relativeURLString, NSString *baseURLString);
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
//

#import "RSHTMLMetadataParser.h"
#import "RSHTMLMetadata.h"
#import "RSSAXHTMLParser.h"
#import "RSSAXHTMLParser.h"
#import "RSSAXParser.h"
#import "RSParserInternal.h"
#import "ParserData.h"
#import "RSHTMLTag.h"

#import <libxml/xmlstring.h>
#import <RSParser/RSHTMLMetadataParser.h>
#import <RSParser/RSHTMLMetadata.h>
#import <RSParser/RSSAXHTMLParser.h>
#import <RSParser/RSSAXParser.h>
#import <RSParser/RSParserInternal.h>
#import <RSParser/ParserData.h>
#import <RSParser/RSHTMLTag.h>


@interface RSHTMLMetadataParser () <RSSAXHTMLParserDelegate>

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
//

#import <RSParser/RSOPMLAttributes.h>
#import <RSParser/RSParserInternal.h>
#import "RSOPMLAttributes.h"
#import "RSParserInternal.h"




NSString *OPMLTextKey = @"text";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
//

@import Foundation;
#import <RSParser/RSOPMLItem.h>

#import "RSOPMLItem.h"




@interface RSOPMLDocument : RSOPMLItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
//

#import <RSParser/RSOPMLDocument.h>

#import "RSOPMLDocument.h"

@implementation RSOPMLDocument

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Sources/OPML/RSOPMLError.m → Sources/ObjC/RSOPMLError.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
//

#import <RSParser/RSOPMLError.h>
#import "RSOPMLError.h"

NSString *RSOPMLErrorDomain = @"com.ranchero.OPML";

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
//

#import <RSParser/RSOPMLFeedSpecifier.h>
#import <RSParser/RSParserInternal.h>
#import "RSOPMLFeedSpecifier.h"
#import "RSParserInternal.h"



@implementation RSOPMLFeedSpecifier
Expand Down
File renamed without changes.
9 changes: 5 additions & 4 deletions Sources/OPML/RSOPMLItem.m → Sources/ObjC/RSOPMLItem.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
//

#import <RSParser/RSOPMLItem.h>
#import <RSParser/RSOPMLAttributes.h>
#import <RSParser/RSOPMLFeedSpecifier.h>
#import <RSParser/RSParserInternal.h>
#import "RSOPMLItem.h"
#import "RSOPMLAttributes.h"
#import "RSOPMLFeedSpecifier.h"
#import "RSParserInternal.h"



@interface RSOPMLItem ()
Expand Down
File renamed without changes.
15 changes: 9 additions & 6 deletions Sources/OPML/RSOPMLParser.m → Sources/ObjC/RSOPMLParser.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@
//

#import "RSOPMLParser.h"
#import "RSSAXParser.h"
#import "RSOPMLItem.h"
#import "RSOPMLDocument.h"
#import "RSOPMLAttributes.h"
#import "RSOPMLError.h"
#import "RSOPMLParser.h"
#import "ParserData.h"

#import <libxml/xmlstring.h>
#import <RSParser/RSSAXParser.h>
#import <RSParser/RSOPMLItem.h>
#import <RSParser/RSOPMLDocument.h>
#import <RSParser/RSOPMLAttributes.h>
#import <RSParser/RSOPMLError.h>
#import <RSParser/ParserData.h>



@interface RSOPMLParser () <RSSAXParserDelegate>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
// Copyright (c) 2014 Ranchero Software LLC. All rights reserved.
//

#import <RSParser/RSParsedArticle.h>
#import <RSParser/RSParserInternal.h>
#import <RSParser/NSString+RSParser.h>
#import <RSParser/RSParsedAuthor.h>
#import <RSParser/RSParsedEnclosure.h>

#import "RSParsedArticle.h"
#import "RSParserInternal.h"
#import "NSString+RSParser.h"
#import "RSParsedAuthor.h"
#import "RSParsedEnclosure.h"



@implementation RSParsedArticle

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
// Copyright © 2017 Ranchero Software, LLC. All rights reserved.
//

#import <RSParser/NSString+RSParser.h>
#import "NSString+RSParser.h"

#import "RSParsedAuthor.h"

@implementation RSParsedAuthor
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2015 Ranchero Software, LLC. All rights reserved.
//

#import <RSParser/RSParsedFeed.h>
#import "RSParsedFeed.h"



@implementation RSParsedFeed

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
//


#import "RSParserInternal.h"
#import <CommonCrypto/CommonDigest.h>
#import <RSParser/RSParserInternal.h>


static BOOL RSParserIsNil(id obj) {
Expand Down
File renamed without changes.
24 changes: 14 additions & 10 deletions Sources/Feeds/XML/RSRSSParser.m → Sources/ObjC/RSRSSParser.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@
// Copyright (c) 2015 Ranchero Software LLC. All rights reserved.
//

#import "RSRSSParser.h"
#import "RSSAXParser.h"
#import "RSParsedFeed.h"
#import "RSParsedArticle.h"
#import "RSParserInternal.h"
#import "NSString+RSParser.h"
#import "RSDateParser.h"
#import "ParserData.h"
#import "RSParsedEnclosure.h"
#import "RSParsedAuthor.h"



#import <libxml/xmlstring.h>
#import <RSParser/RSRSSParser.h>
#import <RSParser/RSSAXParser.h>
#import <RSParser/RSParsedFeed.h>
#import <RSParser/RSParsedArticle.h>
#import <RSParser/RSParserInternal.h>
#import <RSParser/NSString+RSParser.h>
#import <RSParser/RSDateParser.h>
#import <RSParser/ParserData.h>
#import <RSParser/RSParsedEnclosure.h>
#import <RSParser/RSParsedAuthor.h>


@interface RSRSSParser () <RSSAXParserDelegate>

Expand Down
File renamed without changes.
Loading

0 comments on commit d7b10ca

Please sign in to comment.