Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0dec3adf9 | ||
|
|
f7eb63bed9 | ||
|
|
23f4f125db | ||
|
|
b3940f103a | ||
|
|
239527908f |
15
CHANGELOG.md
15
CHANGELOG.md
@@ -8,6 +8,17 @@ and this project does adhere to [Semantic Versioning](https://semver.org/spec/v2
|
|||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
|
||||||
|
## [1.1.3] – 2020-12-18
|
||||||
|
### Fixed
|
||||||
|
- Recognize YouTube channel URLs in the format `/c/channel-name`
|
||||||
|
|
||||||
|
|
||||||
|
## [1.1.2] – 2020-11-27
|
||||||
|
### Fixed
|
||||||
|
- Fixes hidden color option for marking unread entries. Unread menu entries did use `colorStatusIconTint` instead of `colorUnreadIndicator` (thanks @tchek)
|
||||||
|
- Workaround for not displaying status bar highlight color in macOS 11.0 (issue #7)
|
||||||
|
|
||||||
|
|
||||||
## [1.1.1] – 2020-08-31
|
## [1.1.1] – 2020-08-31
|
||||||
### Fixed
|
### Fixed
|
||||||
- Feed indices weren't updated properly which resulted in empty feed menus (issue: #6)
|
- Feed indices weren't updated properly which resulted in empty feed menus (issue: #6)
|
||||||
@@ -142,7 +153,9 @@ and this project does adhere to [Semantic Versioning](https://semver.org/spec/v2
|
|||||||
Initial release
|
Initial release
|
||||||
|
|
||||||
|
|
||||||
[Unreleased]: https://github.com/relikd/baRSS/compare/v1.1.1...HEAD
|
[Unreleased]: https://github.com/relikd/baRSS/compare/v1.1.3...HEAD
|
||||||
|
[1.1.3]: https://github.com/relikd/baRSS/compare/v1.1.2...v1.1.3
|
||||||
|
[1.1.2]: https://github.com/relikd/baRSS/compare/v1.1.1...v1.1.2
|
||||||
[1.1.1]: https://github.com/relikd/baRSS/compare/v1.1.0...v1.1.1
|
[1.1.1]: https://github.com/relikd/baRSS/compare/v1.1.0...v1.1.1
|
||||||
[1.1.0]: https://github.com/relikd/baRSS/compare/v1.0.2...v1.1.0
|
[1.1.0]: https://github.com/relikd/baRSS/compare/v1.0.2...v1.1.0
|
||||||
[1.0.2]: https://github.com/relikd/baRSS/compare/v1.0.1...v1.0.2
|
[1.0.2]: https://github.com/relikd/baRSS/compare/v1.0.1...v1.0.2
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ ToDo
|
|||||||
The following list is not exhaustive but rather a collection of nice things that will be added eventually.
|
The following list is not exhaustive but rather a collection of nice things that will be added eventually.
|
||||||
I may postpone some until demand increases …
|
I may postpone some until demand increases …
|
||||||
|
|
||||||
- [ ] Localizations
|
- [ ] Localizations
|
||||||
- [ ] Feed generator for websites without feeds
|
- [ ] Feed generator for websites without feeds
|
||||||
- [ ] Automatically choose best update interval (e.g., avg)
|
- [ ] Automatically choose best update interval (e.g., avg)
|
||||||
- [ ] Sync with online services
|
- [ ] Sync with online services
|
||||||
@@ -180,7 +180,7 @@ This project uses a modified version of Brent Simmons' [RSXML](https://github.co
|
|||||||
##### Trivia
|
##### Trivia
|
||||||
|
|
||||||
- Start of project: __July 19, 2018__
|
- Start of project: __July 19, 2018__
|
||||||
- Estimated development time: __1953h+__
|
- Estimated development time: __1965h+__
|
||||||
- First prototype used __feedparser python__ library
|
- First prototype used __feedparser python__ library
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -462,7 +462,7 @@
|
|||||||
54ACC27421061B3B0020715F /* Project object */ = {
|
54ACC27421061B3B0020715F /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastUpgradeCheck = 0940;
|
LastUpgradeCheck = 1200;
|
||||||
ORGANIZATIONNAME = relikd;
|
ORGANIZATIONNAME = relikd;
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
54ACC27B21061B3B0020715F = {
|
54ACC27B21061B3B0020715F = {
|
||||||
@@ -647,6 +647,7 @@
|
|||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
@@ -702,6 +703,7 @@
|
|||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "1000"
|
LastUpgradeVersion = "1200"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
// TODO: Make plugins extensible? community extensions.
|
// TODO: Make plugins extensible? community extensions.
|
||||||
@interface YouTubePlugin : NSObject
|
@interface YouTubePlugin : NSObject
|
||||||
+ (NSString*)feedURL:(NSURL*)url;
|
+ (NSString*)feedURL:(NSURL*)url data:(NSData*)html;
|
||||||
+ (NSString*)videoImage:(NSString*)videoid;
|
+ (NSString*)videoImage:(NSString*)videoid;
|
||||||
+ (NSString*)videoImageHQ:(NSString*)videoid;
|
+ (NSString*)videoImageHQ:(NSString*)videoid;
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -33,12 +33,13 @@
|
|||||||
|
|
||||||
@return @c nil if @c url is not properly formatted, YouTube feed URL otherwise.
|
@return @c nil if @c url is not properly formatted, YouTube feed URL otherwise.
|
||||||
*/
|
*/
|
||||||
+ (NSString*)feedURL:(NSURL*)url {
|
+ (NSString*)feedURL:(NSURL*)url data:(NSData*)html {
|
||||||
if (![url.host hasSuffix:@"youtube.com"]) // 'youtu.be' & 'youtube-nocookie.com' will redirect
|
if (![url.host hasSuffix:@"youtube.com"]) // 'youtu.be' & 'youtube-nocookie.com' will redirect
|
||||||
return nil;
|
return nil;
|
||||||
// https://www.youtube.com/channel/[channel-id]
|
// https://www.youtube.com/channel/[channel-id]
|
||||||
// https://www.youtube.com/user/[user-name]
|
// https://www.youtube.com/user/[user-name]
|
||||||
// https://www.youtube.com/playlist?list=[playlist-id]
|
// https://www.youtube.com/playlist?list=[playlist-id]
|
||||||
|
// https://www.youtube.com/c/[channel-name]
|
||||||
#if DEBUG && ENV_LOG_YOUTUBE
|
#if DEBUG && ENV_LOG_YOUTUBE
|
||||||
printf("resolving YouTube url:\n");
|
printf("resolving YouTube url:\n");
|
||||||
printf(" ↳ %s\n", url.absoluteString.UTF8String);
|
printf(" ↳ %s\n", url.absoluteString.UTF8String);
|
||||||
@@ -62,6 +63,23 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if ([type isEqualToString:@"c"]) {
|
||||||
|
NSData *m_head = [@"<meta itemprop=\"channelId\" content=\"" dataUsingEncoding:NSUTF8StringEncoding];
|
||||||
|
NSRange tmp = [html rangeOfData:m_head options:0 range:NSMakeRange(0, html.length)];
|
||||||
|
if (tmp.location == NSNotFound) {
|
||||||
|
NSData *m_json = [@"\"channelId\":\"" dataUsingEncoding:NSUTF8StringEncoding];
|
||||||
|
tmp = [html rangeOfData:m_json options:0 range:NSMakeRange(0, html.length)];
|
||||||
|
}
|
||||||
|
NSUInteger start = tmp.location + tmp.length;
|
||||||
|
NSUInteger end = html.length - start;
|
||||||
|
if (end > 50) end = 50; // no need to search till the end
|
||||||
|
NSString *substr = [[NSString alloc] initWithData:[html subdataWithRange:NSMakeRange(start, end)] encoding:NSUTF8StringEncoding];
|
||||||
|
if (substr) {
|
||||||
|
NSUInteger to = [substr rangeOfString:@"\""].location;
|
||||||
|
if (to != NSNotFound) {
|
||||||
|
found = [ytBase stringByAppendingFormat:@"?channel_id=%@", [substr substringToIndex:to]];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if DEBUG && ENV_LOG_YOUTUBE
|
#if DEBUG && ENV_LOG_YOUTUBE
|
||||||
|
|||||||
@@ -178,7 +178,7 @@
|
|||||||
}
|
}
|
||||||
else if (!meta || meta.feedLinks.count == 0) {
|
else if (!meta || meta.feedLinks.count == 0) {
|
||||||
if ([xml.url.host hasSuffix:@"youtube.com"])
|
if ([xml.url.host hasSuffix:@"youtube.com"])
|
||||||
feedURL = [YouTubePlugin feedURL:xml.url];
|
feedURL = [YouTubePlugin feedURL:xml.url data:xml.data];
|
||||||
if (feedURL.length == 0)
|
if (feedURL.length == 0)
|
||||||
self.error = [NSError feedURLNotFound:xml.url];
|
self.error = [NSError feedURLNotFound:xml.url];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.1.1</string>
|
<string>1.1.3</string>
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>14624</string>
|
<string>14644</string>
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
<string>public.app-category.news</string>
|
<string>public.app-category.news</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
<true/>
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>Copyright © 2019 relikd. Public Domain.</string>
|
<string>Copyright © 2020 relikd.</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
<string>AppHook</string>
|
<string>AppHook</string>
|
||||||
<key>UTImportedTypeDeclarations</key>
|
<key>UTImportedTypeDeclarations</key>
|
||||||
|
|||||||
@@ -52,9 +52,9 @@
|
|||||||
static dispatch_once_t onceToken;
|
static dispatch_once_t onceToken;
|
||||||
dispatch_once(&onceToken, ^{
|
dispatch_once(&onceToken, ^{
|
||||||
if (@available(macOS 10.14, *)) {
|
if (@available(macOS 10.14, *)) {
|
||||||
color = UserPrefsColor(Pref_colorStatusIconTint, [NSColor controlAccentColor]);
|
color = UserPrefsColor(Pref_colorUnreadIndicator, [NSColor controlAccentColor]);
|
||||||
} else {
|
} else {
|
||||||
color = UserPrefsColor(Pref_colorStatusIconTint, [NSColor systemBlueColor]);
|
color = UserPrefsColor(Pref_colorUnreadIndicator, [NSColor systemBlueColor]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return color;
|
return color;
|
||||||
|
|||||||
@@ -121,7 +121,9 @@
|
|||||||
BOOL tint = (self.unreadCountTotal > 0 && hasNet && UserPrefsBool(Pref_globalTintMenuIcon));
|
BOOL tint = (self.unreadCountTotal > 0 && hasNet && UserPrefsBool(Pref_globalTintMenuIcon));
|
||||||
self.statusItem.button.image = [NSImage imageNamed:(hasNet ? RSSImageMenuBarIconActive : RSSImageMenuBarIconPaused)];
|
self.statusItem.button.image = [NSImage imageNamed:(hasNet ? RSSImageMenuBarIconActive : RSSImageMenuBarIconPaused)];
|
||||||
|
|
||||||
if (@available(macOS 10.14, *)) {
|
if (@available(macOS 11, *)) {
|
||||||
|
self.statusItem.button.image.template = !tint;
|
||||||
|
} else if (@available(macOS 10.14, *)) {
|
||||||
// There is no proper way to display tinted icon WITHOUT tinted text!
|
// There is no proper way to display tinted icon WITHOUT tinted text!
|
||||||
// - using alternate image instead of tint:
|
// - using alternate image instead of tint:
|
||||||
// icon & text stays black on highlight (but only in light mode)
|
// icon & text stays black on highlight (but only in light mode)
|
||||||
|
|||||||
Reference in New Issue
Block a user