Commit Graph

477 Commits

Author SHA1 Message Date
Brent Simmons 75d0752a67 Make UserApp properties and methods public. 2018-01-14 11:00:29 -08:00
Brent Simmons fd7c6d07ac Add UserApp class to RSCore. It represents an of the type usually found in /Applications. A UserApp may or may not be running and may or may not exist locally on disk. It could be entirely fictional, even. 2018-01-14 10:56:06 -08:00
Brent Simmons f430d6a095 Add Dictionary and String extensions for creating URL query strings. Add tests. 2018-01-13 17:40:27 -08:00
Olof Hellman 775dbf0852 basic readonly scripting support for account, feed, folder 2018-01-11 00:51:25 -08:00
Brent Simmons 1b0648cd18 Make feed icons show up more promptly and reliably in the timeline. 2018-01-08 21:34:39 -08:00
Brent Simmons e181822c48 Merge, manually, fix and tests for detecting as JSON Feed feeds which do slash-escaping, such as Curt’s feed <http://curtclifton.net/feed.json>. 2018-01-08 13:13:15 -08:00
Brent Simmons 0d4a58e2ab Create and use an NSTableView extension method: indexesOfAvailableRowsPassingTest. 2018-01-06 12:12:31 -08:00
Brent Simmons 2938cc718d Check /index.xml when finding a feed when there are no other leads. Fix #235. 2018-01-05 22:54:28 -08:00
Brent Simmons e970caf459 Freeze the user agent as Evergreen (macOS; RSS Reader; https://ranchero.com/evergreen/). (An iOS version would say iOS rather than macOS, but would be the same otherwise.) 2017-12-31 10:09:40 -08:00
Brent Simmons 1968986d64 Make User-Agent of the form: Evergreen/1.0d28 (Macintosh; RSS Reader; ranchero.com/evergreen/)
The idea is that anyone looking at their stats can quickly find out what it is. It’s a Mac RSS reader. They can open that URL for even more info. (Before 1.0 ships, at that link will be a link to an article for publishers about RSS readers and lowering bandwidth use. Will talk about conditional GET, etc.)
2017-12-30 12:51:37 -08:00
Brent Simmons f4b33c6afb Add the OS to the User-Agent header, as in Macintosh or iOS. 2017-12-30 11:23:35 -08:00
Brent Simmons d093bf9a21 Add rs_debugStringWithData — to use when debugging. A quick way to turn data into a string. It will work most of the time. Good enough for debugging. 2017-12-30 11:23:04 -08:00
Brent Simmons 1e90237e7e Fix bug decoding &#39; entities.
1. Fix typo in the entities dictionary — add the actual ' character.
2. Add EntityDecodingTests.swift and a test for this.
2017-12-30 10:24:44 -08:00
Brent Simmons 20dccb1060 Add license and Readme from RSParser’s separate open source project. Just part of keeping these both in sync. 2017-12-30 10:24:04 -08:00
Brent Simmons 8f9575ee84 Remove assertion that wasn’t valid in some situations. Fix #283. 2017-12-29 10:13:11 -08:00
Brent Simmons a8bd15e9b4 Add method to convert HTML to plain text suitable for copying to text-based apps. It could be much improved, but it’s better than nothing for right now. 2017-12-26 16:17:57 -08:00
Brent Simmons 0b2d7c6733 Validate unread counts on fetching articles. Fix #274. 2017-12-26 11:27:55 -08:00
Brent Simmons 288f203bea Add setPointAndSizeAdjustingForScreen for placing windows without (usually) going offscreen. Use it for positioning the Keyboard Shortcuts window. Fix #263. 2017-12-22 11:13:20 -08:00
Brent Simmons a4c82739b6 Implement next and previous subscription navigation. Also: on first-run, position and size the window a bit nicer. 2017-12-21 14:43:29 -08:00
Brent Simmons 84845c21b3 Make sidebar expand/collapse keyboard shortcuts work. 2017-12-21 11:09:07 -08:00
Brent Simmons 70000c1d31 Progress on keyboard shortcuts. Add link to Technotes in Help menu. Fix #266. 2017-12-20 21:23:48 -08:00
Brent Simmons 035702d403 Add KeyboardKey and KeyboardShortcut structs. 2017-12-20 12:54:01 -08:00
Brent Simmons 23769bc391 Add AccountDelegate.accountDidInitialize method, so that the delegate can set the account’s nameForDisplay before anything else happens. Fix #247. 2017-12-19 17:48:30 -08:00
Brent Simmons 705efcb7e8 Add keyboard utilities to RSCore. 2017-12-19 15:23:42 -08:00
Brent Simmons dd89f2dea7 Add test for Macworld authors — make sure they appear as names instead of email addresses, even though they’re using RSS. 2017-12-19 13:28:33 -08:00
Brent Simmons 6c5566e184 Parse Atom authors. Fix #260. 2017-12-19 13:24:19 -08:00
Brent Simmons 0317196cf6 Add test for Atom authors. Currently failing. 2017-12-19 13:03:35 -08:00
Brent Simmons ccd87040c3 Support multiple authors in RSS and Atom feeds. 2017-12-19 13:03:05 -08:00
Brent Simmons 83c49bf428 Add two tests for parsing Atom attachments. Thanks to Marco for finding some examples (they’re very rare). 2017-12-19 11:52:12 -08:00
Brent Simmons b380d0597f Test Omni Show and Macworld unique IDs. The Omni Show ids should come from the feed’s guids. Macworld’s unique IDs should be calculated, since the feed doesn’t have guids. 2017-12-19 11:20:40 -08:00
Brent Simmons fefa96d259 Prefer permalink to link when creating a calculated unique ID. 2017-12-19 11:19:46 -08:00
Brent Simmons a3dde79b84 Add test to make sure RSS parser is using guid for article.uniqueID. 2017-12-19 11:02:05 -08:00
Brent Simmons a82cee29b8 Make RSParsedArticle calculate a unique ID only when there’s no guid. Otherwise use the guid. Do not attempt to create a globally-unique ID — that’s out of scope for the parser and should be (and is) handled at the app’s model layer. 2017-12-19 10:59:24 -08:00
Brent Simmons 7ccb531f0c Parse Atom enclosures. However, I couldn’t find any in the wild, so there are no tests yet. 2017-12-19 10:17:09 -08:00
Brent Simmons 5b01f04afe Save to disk right after importing OPML. Fix #249. 2017-12-18 21:46:35 -08:00
Brent Simmons fcda565d91 Remove references to tags. Fix #259. 2017-12-18 18:20:13 -08:00
Brent Simmons fb9a1d610c Parse enclosures in RSS. 2017-12-18 15:35:50 -08:00
Brent Simmons adf5a5e784 Add NSImage extension method to tint an image with a color. 2017-12-17 10:48:24 -08:00
Brent Simmons 0221eda956 Add Node.existingOrNewChildNode — recycles an existing node. Creates a new node only when needed. 2017-12-16 11:15:36 -08:00
Brent Simmons 859f479a89 Fix a memory leak that happened every time you added a feed. Use a weak delegate to avoid a retain cycle. 2017-12-13 21:19:12 -08:00
Brent Simmons b04876185d Clean up DownloadWithCacheManager’s cache at most every five minutes — it’s very expensive to do it on every request. This dramatically helps sidebar scrolling performance when you have a couple thousand feeds all trying to get their favicons. 2017-12-13 21:18:20 -08:00
Brent Simmons 3eb95ce63d Fix OPML import performance regression. Fix #238. 2017-12-11 23:12:54 -08:00
Brent Simmons 0b4a9f143e Parse Feedbin articles. 2017-12-11 13:36:16 -08:00
Brent Simmons 8160d8e38e Create Feedbin, FeedbinAccountDelegate, and FeedbinGetSubscriptionsDelegate. 2017-12-10 14:05:01 -08:00
Brent Simmons 6e93cc2718 Create FeedbinSubscription struct. 2017-12-10 14:04:14 -08:00
Brent Simmons 1d956c619d Make APICall.init public. 2017-12-10 14:03:35 -08:00
Brent Simmons 89a74077d9 Create FeedbinSubscription struct. 2017-12-10 13:58:44 -08:00
Brent Simmons 8d7eb910da Make APICall delegate based rather than defining a bunch of protocols. 2017-12-10 13:57:38 -08:00
Brent Simmons de883ce082 Define string constants in JSONFeedParser rather than using literals all over the place. Also: remove a no-longer-needed do/try/catch. 2017-12-10 13:56:40 -08:00
Brent Simmons cc3f77571b Make JSONTypes public. Add JSONUtilities. 2017-12-10 13:53:00 -08:00
Brent Simmons 16b1918580 Continue work on web services client. 2017-12-10 12:31:10 -08:00
Brent Simmons cc918daf37 Start work on web services support in RSWeb. 2017-12-09 11:27:06 -08:00
Brent Simmons 3d72ba4b44 Add case for detecting <https://www.natashatherobot.com/feed/> as an RSS feed.
It’s missing the opening <rss> tag, but it has enough other distinct markers that we can detect it as RSS.

Add two tests to make sure it’s detected and that the parser handles it.
2017-12-07 20:05:58 -08:00
Brent Simmons a488683550 Refresh all after importing OPML. Fix #59. 2017-12-03 12:54:51 -08:00
Brent Simmons 0c176eccd0 Fetch all unread counts at startup. This is done with a single SQL call, and it’s done in the background, so performance hit should not be noticeable. Fix #138. 2017-12-03 11:57:53 -08:00
Brent Simmons c83e0ca68d Do quite a bit less work on resizing the timeline. Fix #175. 2017-12-02 22:18:43 -08:00
Brent Simmons 179c889d9b Fix typo. 2017-12-02 21:35:02 -08:00
Brent Simmons 3da2521e8e When adding a feed, update it right away rather than waiting for the next Refresh. Fix #147. Fix #215. 2017-12-02 17:47:08 -08:00
Brent Simmons f99cd162bb Add support for RSS 1.0 (RDF) feeds. Added so we can handle Pinboard feeds. (Not sure if anyone else is still using RSS 1.0.) Fix #231. 2017-12-02 16:37:24 -08:00
Brent Simmons 35cb0fe078 Get rid of the lock. Add comment that Node is main-thread-only; add precondition to init method. Fix #230. 2017-12-02 16:12:09 -08:00
Brent Simmons e71d763443 Save feed.authors. 2017-12-02 14:20:58 -08:00
Brent Simmons b5d8233955 Fix bug saving related objects for articles — authors, tags, and attachments. 2017-12-02 13:20:27 -08:00
Brent Simmons f28d921aff Avoid skipping parsing Dr. Drang’s JSON Feed, which can’t be detected that it’s a JSON Feed with only partial data, since it has the version element at the end. Add a test for this. 2017-12-01 13:19:30 -08:00
Brent Simmons efcc4fedaa Add tests for Dr. Drang’s JSON Feed. 2017-11-30 13:19:22 -08:00
Brent Simmons 1e528ee8b0 Fix bug detecting Macworld’s RSS feed as an RSS feed. The feed doesn’t start with the standard XML header. 2017-11-28 21:29:09 -08:00
Brent Simmons 6c36107320 Prefer Apple touch icons to other feed icons. 2017-11-26 20:40:07 -08:00
Brent Simmons 82dace2acc Start FeedIconDownloader. 2017-11-26 13:48:40 -08:00
Brent Simmons bfccda8c88 Get twitter:image:src from HTML metadata. 2017-11-26 11:49:01 -08:00
Brent Simmons ff7695c290 Parse Open Graph images when parsing metadata from an HTML page. 2017-11-26 11:38:03 -08:00
Brent Simmons 18f6b177e9 Fix typo. 2017-11-25 20:24:12 -08:00
Brent Simmons e026e159d1 Rebuild the feed dictionary at appropriate times. Fix #169. 2017-11-25 18:05:20 -08:00
Brent Simmons 1047fa5a02 Use the proper index sets and so on to make deleting work from the sidebar again. Fix #192. 2017-11-25 17:44:54 -08:00
Brent Simmons 7d579733f0 Add tests to HTMLFeedFinder for finding the best feed from a web page. 2017-11-25 16:48:42 -08:00
Brent Simmons fce95bb5b6 Pull JSON feed from web page metadata (along with RSS and Atom, which already worked). 2017-11-25 16:48:13 -08:00
Brent Simmons 23af6b4d29 Adjust scoring in FeedSpecifier to slightly prefer JSON feeds. 2017-11-25 16:47:36 -08:00
Brent Simmons 489cf8e29b Start redoing HTMLFeedFinderTests. 2017-11-25 16:34:40 -08:00
Brent Simmons 50f4e46913 Add 'json' as possible-feed match string. 2017-11-25 16:34:20 -08:00
Brent Simmons 68c01491fc Note when feed settings change and update the sidebar cells. 2017-11-25 13:48:14 -08:00
Brent Simmons 9865bd8e51 Fix a crash on startup — detect when there are no feeds and don’t hit database. 2017-11-25 13:11:19 -08:00
Brent Simmons 97079108be Add Atom parser test for getting the home page link. It passed, which means the bug I’m currently hunting (no favicon for Dr. Drang) is somewhere else. 2017-11-25 13:02:21 -08:00
Brent Simmons 0b5f470654 Check "icon" as well as "shortcut icon" when finding the favicon link in a web page. (See Macdrifter.com, for instance.) 2017-11-25 13:01:20 -08:00
Brent Simmons 55166e0979 Update a Feed with settings taken from the raw feed. (Some Feeds had no homePageURL set, which meant, in most cases, no favicons.) 2017-11-25 12:17:49 -08:00
Brent Simmons bd8b7c6ed9 Implement debugDropConditionalGetInfo command. Fix #197. 2017-11-25 11:13:15 -08:00
Brent Simmons e4008b677f Fix two typos in JSONFeedParser which kept the parser from getting the feed’s favicon and icon URLs. Also added a test for this. 2017-11-25 10:34:48 -08:00
Brent Simmons 32973c4c85 Fix an ambiguous call to download in DownloadWithCacheManager. I’m honestly not sure what function would have been called. 2017-11-24 13:11:41 -08:00
Brent Simmons e4f65000b2 Replace Objective-C RSBinaryCache with Swift BinaryDiskCache in RSCore. 2017-11-24 13:10:22 -08:00
Brent Simmons 3282f0ec09 Create NSImage on background queue. 2017-11-23 12:15:33 -08:00
Brent Simmons b4ff1785ab Switch from download to downloadUsingCache where appropriate. 2017-11-23 10:29:00 -08:00
Brent Simmons c9610f1f8e Create DownloadWithCacheManager, for when it’s a good idea to use a cache. 2017-11-23 10:24:36 -08:00
Brent Simmons ca4f4d408f Create downloadUsingCache method — so we don’t download a home page several times in succession, for instance. 2017-11-22 13:37:07 -08:00
Brent Simmons 86907f6aab Create ThreadSafeCache, which FaviconDownloader uses. 2017-11-19 23:58:35 -08:00
Brent Simmons 1864f60e0b Save iconURL and faviconURL in Feed when found in ParsedFeed. 2017-11-19 22:38:42 -08:00
Brent Simmons 0284117bc3 Save and restore iconURL in Feed. 2017-11-19 22:37:59 -08:00
Brent Simmons f457694922 Save and restore faviconURL in Feed. 2017-11-19 21:24:19 -08:00
Brent Simmons ffaa55c50c Implement mark-everywhere-as-read. 2017-11-19 16:28:26 -08:00
Brent Simmons 9c571271e6 Create SmartFeed class. It’s for Unread and Starred pseudo-feeds — and will also be used later on by predicate-based smart feeds. 2017-11-19 15:40:02 -08:00
Brent Simmons 83cee90929 Fix a couple bugs in PseudoFeed. Make callback for fetching unread count @escaping. 2017-11-19 12:45:35 -08:00
Brent Simmons 19673f5c8a Add methods for fetching unread count since a certain date to Database.framework. 2017-11-19 12:44:17 -08:00
Brent Simmons e681007bbe Add TodayFeedDelegate. Start work on fetching unread count for Today pseudo-feed. 2017-11-19 12:12:43 -08:00
Brent Simmons 1cc532faa1 Add startOfToday and nullability annotations to NSCalendar+RSCore. 2017-11-19 12:11:56 -08:00
Brent Simmons 911e992b76 Use a Swift name for rs_performSelectorCoalesced — make it performSelectorCoalesced:with:delay:. 2017-11-19 11:42:22 -08:00
Brent Simmons 200ff61f6a Fix code formatting nit in DisplayNameProvider. 2017-11-19 11:41:27 -08:00
Brent Simmons eff6acba94 Create index on statuses (read) for performance reasons. 2017-11-19 11:40:45 -08:00
Brent Simmons 23ae585b12 Add a group-style row for accounts. 2017-11-18 16:56:36 -08:00
Brent Simmons ca081c41a9 Decode HTML entities in the JSON Feed parser for content_html. Fix #176. 2017-11-18 12:41:15 -08:00
Brent Simmons 828075454e Skip calculating a zero size for empty RSSingleLineView and RSSingleLineRenderer. 2017-11-16 21:10:44 -08:00
Brent Simmons 0e5b400a0c Show Error Log window from Window menu. 2017-11-15 22:40:49 -08:00
Brent Simmons 1d2fe4623b Add Inspector to RSCore. Show/hide inspector via Info command in Window menu. 2017-11-15 22:33:35 -08:00
Brent Simmons 1e713e3bfd Update Account unread count when BatchUpdate did perform. 2017-11-15 13:26:10 -08:00
Brent Simmons 38954448cb Move BatchUpdate.swift to RSCore. 2017-11-15 13:25:43 -08:00
Brent Simmons 3612469954 Make LogItem not crash on init. 2017-11-15 13:13:19 -08:00
Brent Simmons 48ca636796 Make progress on LogWindowController. 2017-11-14 22:04:14 -08:00
Brent Simmons 887e562716 Post a notification when a LogItem is added. 2017-11-14 21:39:24 -08:00
Brent Simmons 60ee139451 Add ability to log items to AppDelegate. 2017-11-14 21:31:17 -08:00
Brent Simmons bf45c3bdd9 Rename Logger to Log. 2017-11-14 21:19:12 -08:00
Brent Simmons 7e2420700c Add Logger and LogItem. Start work on log window. 2017-11-14 21:15:06 -08:00
Brent Simmons 0bc84aa50c Show the Keyboard Shortcuts menu via its new Window menu command. The window’s HTML content remains to be done, though. 2017-11-13 18:33:23 -08:00
Brent Simmons 5d781d1657 Add method to display contents of file in WebViewWindowController. 2017-11-13 18:19:25 -08:00
Brent Simmons 773f660601 Create WebViewWindow, which holds a WKWebView. To be used for keyboard shortcuts and whatever else needs a plain web view in a window. 2017-11-13 13:23:22 -08:00
Brent Simmons 9f56030b79 Calculate the Account’s unread count by looking at the set of flattened feeds — this way a given feed (which can occur more than once) is counted only once. Fix #101. 2017-11-11 19:34:10 -08:00
Brent Simmons 0fe8cbd360 Remove redundant check to see if feed is probably XML. 2017-11-11 14:27:56 -08:00
Brent Simmons a593661ba9 Add feed detection test for DCRainmaker feed. Make sure it’s detected as RSS. Fix #146. 2017-11-11 10:37:28 -08:00
Brent Simmons 2982109f9b Check that data is not XML, rather than that it is HTML, when determining feed type. Fix #144. 2017-11-11 10:30:01 -08:00
Brent Simmons 9818278c9b Make undo deleting feeds/folders work. 2017-11-05 12:14:36 -08:00
Brent Simmons 57296279e4 Switch back to AnyObject from AnyHashable, because of http://openradar.appspot.com/34824398 2017-11-04 23:05:20 -07:00
Brent Simmons e16911b363 Make deleting work. Can’t undo yet. But now everything is messed-up because of an AnyHashable casting bug. Don’t run this build. 2017-11-04 22:51:14 -07:00
Brent Simmons 66c02a6fe1 Fix build errors. 2017-11-04 19:29:43 -07:00
Brent Simmons 17e22fb91a Upgrade to recommended settings everywhere. 2017-11-04 19:16:07 -07:00
Brent Simmons ad3020f13f Upgrade to recommend changes for Data. 2017-11-04 19:14:55 -07:00
Brent Simmons 5c984cbd23 Upgrade to recommend changes for RSTextDrawing. 2017-11-04 19:14:38 -07:00
Brent Simmons 9886ac110a Upgrade to recommend changes for RSFeedFinder. 2017-11-04 19:14:16 -07:00
Brent Simmons ef303c0c38 Make progress on deleting and especially undoing delete. 2017-11-04 19:03:47 -07:00
Brent Simmons c08bbaa970 Use AnyHashable instead of AnyObject as representedObject for tree nodes. 2017-11-04 15:27:32 -07:00
Brent Simmons ef1d95341b Show feeds in Feed Directory sidebar. 2017-11-04 14:53:21 -07:00
Brent Simmons 2bb0cdb0ba Fix build failures in OPMLTests. Tests all still pass in RSParser. 2017-11-04 10:25:13 -07:00
Brent Simmons 911e6b0879 Do some refactoring. 2017-11-01 22:40:28 -07:00
Brent Simmons 17b84ec57c Rename MarkAllReadCommand to MarkReadOrUnreadCommand and make it handle both cases. 2017-10-29 12:09:56 -07:00
Brent Simmons f9b3eeb4d7 Switch macOS deployment target to 10.13. Get MarkAllReadCommand working as an undoable command. 2017-10-29 11:14:10 -07:00
Brent Simmons d16f83c99a Start UndoableCommand as part of undo support. 2017-10-24 09:28:58 -07:00
Brent Simmons c101d9dd04 Maintain url-to-feed and feedID-to-feed dictionaries to make lookups faster. This makes OPML importing very fast. 2017-10-22 11:08:51 -07:00
Brent Simmons 649f62207f Fix OPML importing. 2017-10-21 21:00:21 -07:00
Brent Simmons 8d5e568cde Make folder.account weak and optional. 2017-10-21 16:37:40 -07:00
Brent Simmons d512908b6f Use @discardableResult with addFeed. 2017-10-21 16:32:29 -07:00
Brent Simmons 7bf1847588 Send notification on adding a feed to a folder. Also: Update ToDo. 2017-10-21 16:27:06 -07:00
Brent Simmons c237aed5b8 Rejigger the find-feed scoring to handle bitsplitting.org — we were getting the podcast feed just because it had “RSS” in the title. But we want the blog feed to get the best score. 2017-10-21 16:23:51 -07:00
Brent Simmons da1b7a6c7b Post children-did-change notification after adding a feed. 2017-10-21 16:06:25 -07:00
Brent Simmons edea37dba6 Add TreeController.normalizeSelectedNodes and supporting functions in Node. 2017-10-21 12:14:15 -07:00
Brent Simmons 702559cfb1 Define kDeleteKeyCode for use in key handling. 2017-10-21 10:54:59 -07:00
Brent Simmons aca8acea7c Update sidebar when adding a folder. 2017-10-19 13:27:59 -07:00
Brent Simmons 3812c216b2 Show unread count in window title. 2017-10-18 21:53:45 -07:00