feat: regex converter

This commit is contained in:
relikd
2025-06-24 15:36:10 +02:00
parent f577ec1ec2
commit 839eee7d39
22 changed files with 887 additions and 40 deletions

View File

@@ -0,0 +1,30 @@
@import Cocoa;
@class RegexConverter;
NS_ASSUME_NONNULL_BEGIN
@interface RegexFeedEntry : NSObject
@property (nullable, readonly) NSString *href;
@property (nullable, readonly) NSString *title;
@property (nullable, readonly) NSString *desc;
@property (nullable, readonly) NSString *dateString;
@property (nullable, readonly) NSDate *date;
@property (nullable, readonly) NSString *rawMatch;
@end
@interface RegexFeed : NSObject
@property (nullable, copy) NSString *rxEntry;
@property (nullable, copy) NSString *rxHref;
@property (nullable, copy) NSString *rxTitle;
@property (nullable, copy) NSString *rxDesc;
@property (nullable, copy) NSString *rxDate;
@property (nullable, copy) NSString *dateFormat;
+ (RegexFeed *)from:(RegexConverter*)regex;
- (NSArray<RegexFeedEntry*>*)process:(NSString*)rawData error:(NSError * __autoreleasing *)err;
@end
NS_ASSUME_NONNULL_END