Commit Graph

477 Commits

Author SHA1 Message Date
Brent Simmons 5ffe3bb948 Move existingToolbarItem function to NSToolbar category in RSCore. 2018-02-17 20:45:15 -08:00
Brent Simmons 2325e7edbc Move the isOpen property from specific window controllers to the NSWindowController extension in RSCore. 2018-02-17 18:22:57 -08:00
Brent Simmons 8e7863c66d Add isDisplayingSheet calculated readonly property to NSWindow and NSWindowController. 2018-02-17 18:14:24 -08:00
Brent Simmons c80e3e86de Don’t save an Account to disk during a refresh session. Wait till it’s over. 2018-02-17 18:02:40 -08:00
Brent Simmons 3a94cf9a51 Create CoalescingQueue.standard, a shared instance. 2018-02-17 17:42:57 -08:00
Brent Simmons 64647c73c6 Use a coalescing queue (instead of a Timer) in Account for saving to disk. 2018-02-17 15:38:54 -08:00
Brent Simmons 4e7fc8efcb Remove rs_performSelectorCoalesced, since it’s been replaced by the CoalescingQueue. 2018-02-17 15:18:42 -08:00
Brent Simmons d9cba50c89 Remove DiskSave from RSCore, since it’s unused. 2018-02-17 15:17:08 -08:00
Brent Simmons 0951b525f1 Add CoalescingQueue, a FIFO queue of target/selector pairs, used for things like updating table row cells — things that should be coalesced and can be delayed minimally. 2018-02-17 15:14:00 -08:00
Brent Simmons 0e2e0f7eea Do a case-insensitive match when checking for special-case feed URLs. 2018-02-16 13:15:20 -08:00
Brent Simmons 891416e7b7 Add a special case to the JSON Feed parser for feeds that include HTML entities in their titles. At the moment this is used for kottke.org and pxlnv.com. More could be added later, and these feeds could be removed if fixed. 2018-02-16 13:13:00 -08:00
Brent Simmons f8f78810ef When detecting and parsing a potential JSON Feed, allow for the version URL to have the wrong scheme, as it does (at this writing) in https://pxlnv.com/feed/json/
Fix #347.
2018-02-14 20:56:02 -08:00
Brent Simmons 2f21dbf6be Remove extraneous get { from a bunch of read-only accessors. 2018-02-14 13:14:25 -08:00
Brent Simmons 192439abe7 Make Folder watch for children-did-change notifications — when its own children change, update the unread count. Fix #322. 2018-02-12 22:22:06 -08:00
Brent Simmons 2b6c2eb5ba Create a PasteboardWriterOwner protocol and an NSPasteboard extension that references it. 2018-02-11 21:55:32 -08:00
Brent Simmons a13d21395e Fetch starred articles for the Starred smart feed. 2018-02-11 12:07:55 -08:00
Brent Simmons 5aeb914ab6 Fetch articles for the Today smart feed. 2018-02-10 17:37:47 -08:00
Brent Simmons 863de80281 Add convenience method to Set<Article> for just getting unread articles. 2018-02-10 13:21:43 -08:00
Brent Simmons 00cf3934e5 Add fetchUnreadArticles method to Account, which will be used by the All Unread smart feed. 2018-02-10 13:00:16 -08:00
Brent Simmons c77866c4d7 Add takeItems: method to a new NSMenu extension. 2018-02-09 22:10:36 -08:00
Brent Simmons dcf758acc5 Pass menuForEvent: to the enclosing tableview. This gets contextual menus to appear in e timeline. 2018-02-09 21:40:09 -08:00
Brent Simmons 839780303f Add needed cast to return value in rs_enclosingTableView. 2018-02-09 21:39:33 -08:00
Brent Simmons 1b09d35c77 Add rs_enclosingTableView method as NSView category. 2018-02-09 21:33:13 -08:00
Brent Simmons a6db249ab6 Add ArticleFetcher protocol. Add Feed and Folder extensions for it. 2018-02-04 10:57:41 -08:00
Brent Simmons 50dcf436d9 Change Cocoa imports to AppKit imports, because we don’t need CoreData imported (which Cocoa imports). 2018-02-02 22:51:32 -08:00
Olof Hellman e038fb0fb5 convert Evergreen frameworks projects to use .xcconfig files. 2018-02-02 03:24:13 -08:00
Daniel Jalkut 56a39042f3 Remove Garbage-Collection-specific finalize method overrides, which were flagged by new deprecated OBJC methods warning. 2018-01-29 11:20:38 -05:00
Daniel Jalkut 3507313f84 Accept Xcode 9.3 recommended build settings. 2018-01-29 11:20:30 -05:00
Daniel Jalkut 68a8437ea2 It appears that libxml/parser.h must be explicitly imported as of Xcode 9.3. 2018-01-29 11:20:24 -05:00
Daniel Jalkut d7f13ca4be Change from flatMap to new compactMap rename in Xcode 9.3. 2018-01-29 11:19:54 -05:00
Brent Simmons fb45ae11eb Add URLPasteboardWriter to RSCore. It takes a string and writes a URL (if possible) and a string to the pasteboard. 2018-01-28 16:08:38 -08:00
Brent Simmons ef8f508ee4 Add NSOutlineView extension methods: canSelectItem and selectItemAndScrollToVisible. 2018-01-27 12:34:53 -08:00
Brent Simmons 7ba2fe72dd Add descendantNodeRepresentingObject to Node.swift. 2018-01-27 12:03:17 -08:00
Brent Simmons cf0d5cdc51 Remove unwanted debugging print statement. 2018-01-24 21:48:20 -08:00
Brent Simmons f109237bfa Handle feed renames in the inspector. Handle multiple selection. Fix #137. 2018-01-23 21:49:33 -08:00
Brent Simmons 2cf0dbd96e Extend Notification.Name, not NSNotification.Name. 2018-01-22 22:00:01 -08:00
Brent Simmons 02ad70097e Send a Notification when a Folder’s name changes. 2018-01-22 21:59:13 -08:00
Brent Simmons 786138d6e7 Create postDisplayNameDidChangeNotification, so that a DisplayNameProvider can post a Notification when its name changes. 2018-01-22 21:58:53 -08:00
Brent Simmons c692d357d2 Adjust for < 0 x origin. 2018-01-21 13:10:42 -08:00
Brent Simmons ca5703e14f Keep the inspector’s top-left origin steady on changing views. 2018-01-21 12:46:22 -08:00
Brent Simmons 394274f1e5 Continue progress on inspector. 2018-01-21 11:35:50 -08:00
Brent Simmons d3a0d8b8b7 Remove Inspector stuff from RSCore on YAGNI basis. Start work on inspector in Evergreen. 2018-01-20 19:06:07 -08:00
Brent Simmons 6b059671f5 Make progress on reloading timeline when feed updates. 2018-01-17 17:28:09 -08:00
Brent Simmons d1e915394e Use properties rather than strings and KVC. Duh. 2018-01-15 12:28:35 -08:00
Brent Simmons f4aca068ea Make SendToBlogEditorApp public in RSCore. 2018-01-15 12:21:54 -08:00
Brent Simmons 77bc330d8c Create SendToBlogEditorApp, which implements the sending side of the external blog editor interface: http://ranchero.com/netnewswire/developers/externalinterface 2018-01-15 12:11:28 -08:00
Brent Simmons c63303f05a Add UserApp.targetDescriptor. 2018-01-15 12:10:57 -08:00
Brent Simmons eaeb333120 Add NSAppleEventDescriptor category method: +descriptorWithRunningApplication:. 2018-01-15 12:10:31 -08:00
Brent Simmons 7a8e0ec4aa Increase the sleep interval for waiting for an app to launch. I’m sure there’s a better way to do this, but I don’t know what it is yet. 2018-01-14 11:19:19 -08:00
Brent Simmons 39d6086e0c Use %20 instead of + when encoding for URL query strings, since it appears to be more compatible. (Well, it works better with Micro.blog.) 2018-01-14 11:11:53 -08:00
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