@memberjunction/content-autotagging 5.23.0 → 5.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/CloudStorage/generic/CloudStorageBase.d.ts +1 -1
  2. package/dist/CloudStorage/generic/CloudStorageBase.d.ts.map +1 -1
  3. package/dist/CloudStorage/generic/CloudStorageBase.js +2 -1
  4. package/dist/CloudStorage/generic/CloudStorageBase.js.map +1 -1
  5. package/dist/CloudStorage/index.d.ts +5 -0
  6. package/dist/CloudStorage/index.d.ts.map +1 -1
  7. package/dist/CloudStorage/index.js +5 -0
  8. package/dist/CloudStorage/index.js.map +1 -1
  9. package/dist/CloudStorage/providers/AutotagCloudStorage.d.ts +61 -0
  10. package/dist/CloudStorage/providers/AutotagCloudStorage.d.ts.map +1 -0
  11. package/dist/CloudStorage/providers/AutotagCloudStorage.js +257 -0
  12. package/dist/CloudStorage/providers/AutotagCloudStorage.js.map +1 -0
  13. package/dist/Core/generic/AutotagBase.d.ts +10 -1
  14. package/dist/Core/generic/AutotagBase.d.ts.map +1 -1
  15. package/dist/Core/generic/AutotagBase.js.map +1 -1
  16. package/dist/Engine/generic/AutotagBaseEngine.d.ts +324 -18
  17. package/dist/Engine/generic/AutotagBaseEngine.d.ts.map +1 -1
  18. package/dist/Engine/generic/AutotagBaseEngine.js +1036 -178
  19. package/dist/Engine/generic/AutotagBaseEngine.js.map +1 -1
  20. package/dist/Engine/generic/RateLimiter.d.ts +49 -0
  21. package/dist/Engine/generic/RateLimiter.d.ts.map +1 -0
  22. package/dist/Engine/generic/RateLimiter.js +98 -0
  23. package/dist/Engine/generic/RateLimiter.js.map +1 -0
  24. package/dist/Engine/index.d.ts +1 -0
  25. package/dist/Engine/index.d.ts.map +1 -1
  26. package/dist/Engine/index.js +1 -0
  27. package/dist/Engine/index.js.map +1 -1
  28. package/dist/Entity/generic/AutotagEntity.d.ts +68 -14
  29. package/dist/Entity/generic/AutotagEntity.d.ts.map +1 -1
  30. package/dist/Entity/generic/AutotagEntity.js +396 -83
  31. package/dist/Entity/generic/AutotagEntity.js.map +1 -1
  32. package/dist/LocalFileSystem/generic/AutotagLocalFileSystem.d.ts +1 -1
  33. package/dist/LocalFileSystem/generic/AutotagLocalFileSystem.d.ts.map +1 -1
  34. package/dist/LocalFileSystem/generic/AutotagLocalFileSystem.js +2 -1
  35. package/dist/LocalFileSystem/generic/AutotagLocalFileSystem.js.map +1 -1
  36. package/dist/RSSFeed/generic/AutotagRSSFeed.d.ts +47 -16
  37. package/dist/RSSFeed/generic/AutotagRSSFeed.d.ts.map +1 -1
  38. package/dist/RSSFeed/generic/AutotagRSSFeed.js +239 -120
  39. package/dist/RSSFeed/generic/AutotagRSSFeed.js.map +1 -1
  40. package/dist/Websites/generic/AutotagWebsite.d.ts +1 -1
  41. package/dist/Websites/generic/AutotagWebsite.d.ts.map +1 -1
  42. package/dist/Websites/generic/AutotagWebsite.js +2 -1
  43. package/dist/Websites/generic/AutotagWebsite.js.map +1 -1
  44. package/dist/index.d.ts +1 -0
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +1 -0
  47. package/dist/index.js.map +1 -1
  48. package/package.json +16 -11
@@ -1,30 +1,61 @@
1
1
  import { UserInfo } from '@memberjunction/core';
2
- import { AutotagBase, AutotagProgressCallback } from "../../Core/index.js";
3
- import { ContentSourceParams } from "../../Engine/index.js";
2
+ import { AutotagBase, AutotagProgressCallback } from '../../Core/index.js';
4
3
  import { MJContentSourceEntity, MJContentItemEntity } from '@memberjunction/core-entities';
5
4
  import { RSSItem } from './RSS.types.js';
5
+ /**
6
+ * Autotag provider for RSS and Atom feeds. Parses feed items, follows article
7
+ * links to fetch full page content via Cheerio, and creates ContentItems with
8
+ * the extracted article text rather than raw RSS metadata.
9
+ *
10
+ * Fixes:
11
+ * - Text capture: follows item.link to fetch full article text instead of
12
+ * storing JSON.stringify(RSSItem)
13
+ * - Item naming: uses the RSS item title for ContentItem.Name, and the RSS
14
+ * description for ContentItem.Description, instead of the source name
15
+ */
6
16
  export declare class AutotagRSSFeed extends AutotagBase {
7
17
  private contextUser;
8
18
  private engine;
9
19
  protected contentSourceTypeID: string;
10
20
  constructor();
11
- protected getContextUser(): UserInfo;
21
+ Autotag(contextUser: UserInfo, onProgress?: AutotagProgressCallback): Promise<number>;
22
+ SetContentItemsToProcess(contentSources: MJContentSourceEntity[]): Promise<MJContentItemEntity[]>;
12
23
  /**
13
- * Implemented abstract method from the AutotagBase class. that runs the entire autotagging process. This method is the entry point for the autotagging process.
14
- * It initializes the connection, retrieves the content sources corresponding to the content source type, sets the content items that we want to process,
15
- * extracts and processes the text, and sets the results in the database.
24
+ * Process a single content source: parse the RSS feed, detect new/modified
25
+ * items, fetch full article text, and create/update ContentItems.
16
26
  */
17
- Autotag(contextUser: UserInfo, onProgress?: AutotagProgressCallback): Promise<void>;
27
+ private ProcessContentSource;
18
28
  /**
19
- * Implemented abstract method from the AutotagBase class. Given a list of content sources, this method should return a list
20
- * of content source items that have been modified or added after the most recent process run for that content source.
21
- * @param contentSources - An array of content sources to check for modified or added content source items
22
- * @returns - An array of content source items that have been modified or added after the most recent process run for that content source
29
+ * Process a single RSS feed item: fetch full article text, compute checksum,
30
+ * create or update the ContentItem.
23
31
  */
24
- SetContentItemsToProcess(contentSources: MJContentSourceEntity[]): Promise<MJContentItemEntity[]>;
25
- SetNewAndModifiedContentItems(allRSSItems: RSSItem[], contentSourceParams: ContentSourceParams): Promise<MJContentItemEntity[]>;
26
- parseRSSFeed(url: string): Promise<RSSItem[]>;
27
- protected urlIsValid(url: string): Promise<boolean>;
28
- getChecksumFromRSSItem(RSSContentItem: RSSItem, contextUser: UserInfo): Promise<string>;
32
+ private ProcessSingleFeedItem;
33
+ /**
34
+ * Fetch the full article text for an RSS item.
35
+ *
36
+ * Strategy:
37
+ * 1. If the RSS item has inline content (content:encoded), use that
38
+ * 2. Otherwise, follow the item's link URL and extract text with Cheerio
39
+ * 3. Fall back to the RSS description if link fetching fails
40
+ */
41
+ private FetchArticleText;
42
+ /**
43
+ * Fetch a web page and extract its main text content using Cheerio.
44
+ * Strips navigation, headers, footers, scripts, and styles.
45
+ */
46
+ private FetchAndParseWebPage;
47
+ /**
48
+ * Parse an RSS/Atom feed URL and return structured items.
49
+ * The content field is HTML-stripped via the engine's parseHTML.
50
+ */
51
+ ParseRSSFeed(url: string): Promise<RSSItem[]>;
52
+ /**
53
+ * Check if a URL is reachable via HTTP HEAD request.
54
+ */
55
+ private UrlIsValid;
56
+ /**
57
+ * Load existing ContentItems for this source, keyed by lowercase URL for upsert.
58
+ */
59
+ private LoadExistingContentItems;
29
60
  }
30
61
  //# sourceMappingURL=AutotagRSSFeed.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AutotagRSSFeed.d.ts","sourceRoot":"","sources":["../../../src/RSSFeed/generic/AutotagRSSFeed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAqB,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAqB,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAC3F,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAOtC,qBACa,cAAe,SAAQ,WAAW;IAC3C,OAAO,CAAC,WAAW,CAAW;IAC9B,OAAO,CAAC,MAAM,CAAoB;IAClC,SAAS,CAAC,mBAAmB,EAAE,MAAM,CAAA;;IAOrC,SAAS,CAAC,cAAc,IAAI,QAAQ;IAIpC;;;;OAIG;IACU,OAAO,CAAC,WAAW,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQhG;;;;;OAKG;IACU,wBAAwB,CAAC,cAAc,EAAE,qBAAqB,EAAE,GAAG,OAAO,CAAC,mBA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AE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAwC1D;;OAEG;YACW,UAAU;IASxB;;OAEG;YACW,wBAAwB;CAkBzC"}
@@ -7,166 +7,285 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { Metadata, RunView } from '@memberjunction/core';
10
+ import { Metadata, RunView, LogStatus, LogError } from '@memberjunction/core';
11
11
  import { RegisterClass } from '@memberjunction/global';
12
- import { AutotagBase } from "../../Core/index.js";
13
- import { AutotagBaseEngine } from "../../Engine/index.js";
12
+ import { AutotagBase } from '../../Core/index.js';
13
+ import { AutotagBaseEngine } from '../../Engine/index.js';
14
14
  import { RSSItem } from './RSS.types.js';
15
15
  import axios from 'axios';
16
16
  import crypto from 'crypto';
17
17
  import Parser from 'rss-parser';
18
- import dotenv from 'dotenv';
19
- dotenv.config({ quiet: true });
18
+ /**
19
+ * Autotag provider for RSS and Atom feeds. Parses feed items, follows article
20
+ * links to fetch full page content via Cheerio, and creates ContentItems with
21
+ * the extracted article text rather than raw RSS metadata.
22
+ *
23
+ * Fixes:
24
+ * - Text capture: follows item.link to fetch full article text instead of
25
+ * storing JSON.stringify(RSSItem)
26
+ * - Item naming: uses the RSS item title for ContentItem.Name, and the RSS
27
+ * description for ContentItem.Description, instead of the source name
28
+ */
20
29
  let AutotagRSSFeed = class AutotagRSSFeed extends AutotagBase {
21
30
  constructor() {
22
31
  super();
23
32
  this.engine = AutotagBaseEngine.Instance;
24
33
  }
25
- getContextUser() {
26
- return this.contextUser;
27
- }
28
- /**
29
- * Implemented abstract method from the AutotagBase class. that runs the entire autotagging process. This method is the entry point for the autotagging process.
30
- * It initializes the connection, retrieves the content sources corresponding to the content source type, sets the content items that we want to process,
31
- * extracts and processes the text, and sets the results in the database.
32
- */
33
34
  async Autotag(contextUser, onProgress) {
34
35
  this.contextUser = contextUser;
35
36
  this.contentSourceTypeID = this.engine.SetSubclassContentSourceType('RSS Feed');
37
+ LogStatus(`[RSS] Starting RSS autotag...`);
36
38
  const contentSources = await this.engine.getAllContentSources(this.contextUser, this.contentSourceTypeID);
37
- const contentItemsToProcess = await this.SetContentItemsToProcess(contentSources);
38
- await this.engine.ExtractTextAndProcessWithLLM(contentItemsToProcess, this.contextUser, undefined, onProgress);
39
+ LogStatus(`[RSS] Found ${contentSources.length} RSS source(s)`);
40
+ let contentItemsToProcess;
41
+ try {
42
+ contentItemsToProcess = await this.SetContentItemsToProcess(contentSources);
43
+ LogStatus(`[RSS] SetContentItemsToProcess returned ${contentItemsToProcess.length} items`);
44
+ }
45
+ catch (e) {
46
+ const msg = e instanceof Error ? e.message : String(e);
47
+ LogError(`[RSS] SetContentItemsToProcess THREW: ${msg}`);
48
+ return 0;
49
+ }
50
+ if (contentItemsToProcess.length > 0) {
51
+ LogStatus(`[RSS] Calling ExtractTextAndProcessWithLLM with ${contentItemsToProcess.length} items...`);
52
+ try {
53
+ await this.engine.ExtractTextAndProcessWithLLM(contentItemsToProcess, this.contextUser, undefined, undefined, onProgress);
54
+ LogStatus(`[RSS] ExtractTextAndProcessWithLLM completed successfully`);
55
+ }
56
+ catch (e) {
57
+ const msg = e instanceof Error ? e.message : String(e);
58
+ LogError(`[RSS] ExtractTextAndProcessWithLLM THREW: ${msg}`);
59
+ }
60
+ }
61
+ else {
62
+ LogStatus('[RSS] No new or modified feed items to process');
63
+ }
64
+ return contentItemsToProcess.length;
39
65
  }
40
- /**
41
- * Implemented abstract method from the AutotagBase class. Given a list of content sources, this method should return a list
42
- * of content source items that have been modified or added after the most recent process run for that content source.
43
- * @param contentSources - An array of content sources to check for modified or added content source items
44
- * @returns - An array of content source items that have been modified or added after the most recent process run for that content source
45
- */
46
66
  async SetContentItemsToProcess(contentSources) {
47
67
  const contentItemsToProcess = [];
48
68
  for (const contentSource of contentSources) {
49
- // If content source parameters were provided, set them. Otherwise, use the default values.
50
- const contentSourceParamsMap = await this.engine.getContentSourceParams(contentSource, this.contextUser);
51
- if (contentSourceParamsMap) {
52
- // Override defaults with content source specific params
53
- contentSourceParamsMap.forEach((value, key) => {
54
- if (key in this) {
55
- this[key] = value;
56
- }
57
- });
58
- }
59
- const contentSourceParams = {
60
- contentSourceID: contentSource.ID,
61
- name: contentSource.Name,
62
- ContentTypeID: contentSource.ContentTypeID,
63
- ContentFileTypeID: contentSource.ContentFileTypeID,
64
- ContentSourceTypeID: contentSource.ContentSourceTypeID,
65
- URL: contentSource.URL
66
- };
67
- const allRSSItems = await this.parseRSSFeed(contentSourceParams.URL);
68
- const contentItems = await this.SetNewAndModifiedContentItems(allRSSItems, contentSourceParams);
69
- if (contentItems && contentItems.length > 0) {
70
- contentItemsToProcess.push(...contentItems);
69
+ try {
70
+ const items = await this.ProcessContentSource(contentSource);
71
+ contentItemsToProcess.push(...items);
71
72
  }
72
- else {
73
- // No content items found to process
74
- console.log(`No content items found to process for content source: ${contentSource.Get('Name')}`);
73
+ catch (e) {
74
+ const msg = e instanceof Error ? e.message : String(e);
75
+ LogError(`AutotagRSSFeed: failed to process source "${contentSource.Name}": ${msg}`);
75
76
  }
76
77
  }
77
78
  return contentItemsToProcess;
78
79
  }
79
- async SetNewAndModifiedContentItems(allRSSItems, contentSourceParams) {
80
- const contentItemsToProcess = [];
81
- for (const RSSContentItem of allRSSItems) {
82
- const rv = new RunView();
83
- const results = await rv.RunView({
84
- EntityName: 'MJ: Content Items',
85
- ExtraFilter: `ContentSourceID = '${contentSourceParams.contentSourceID}' AND (URL = '${RSSContentItem.link}' OR Description = '${RSSContentItem.description}')`, // According to the RSS spec, all items must contain either a title or a description.
86
- ResultType: 'entity_object',
87
- }, this.contextUser);
88
- if (results.Success && results.Results.length) {
89
- const contentItemResult = results.Results[0];
90
- // This content item already exists, check the last hash to see if it has been modified
91
- const lastStoredHash = contentItemResult.Checksum;
92
- const newHash = await this.getChecksumFromRSSItem(RSSContentItem, this.contextUser);
93
- if (lastStoredHash !== newHash) {
94
- // This content item has been modified
95
- const md = new Metadata();
96
- const contentItem = await md.GetEntityObject('MJ: Content Items', this.contextUser);
97
- contentItem.Load(contentItemResult.ID);
98
- contentItem.Checksum = newHash;
99
- contentItem.Text = JSON.stringify(RSSContentItem);
100
- await contentItem.Save();
101
- contentItemsToProcess.push(contentItem); // Content item was modified, add to list
80
+ /**
81
+ * Process a single content source: parse the RSS feed, detect new/modified
82
+ * items, fetch full article text, and create/update ContentItems.
83
+ */
84
+ async ProcessContentSource(contentSource) {
85
+ const contentSourceParams = {
86
+ contentSourceID: contentSource.ID,
87
+ name: contentSource.Name ?? '',
88
+ ContentTypeID: contentSource.ContentTypeID,
89
+ ContentFileTypeID: contentSource.ContentFileTypeID,
90
+ ContentSourceTypeID: contentSource.ContentSourceTypeID,
91
+ URL: contentSource.URL
92
+ };
93
+ LogStatus(`[RSS] Parsing feed "${contentSource.Name}" at ${contentSourceParams.URL}...`);
94
+ const allRSSItems = await this.ParseRSSFeed(contentSourceParams.URL);
95
+ if (allRSSItems.length === 0) {
96
+ LogStatus(`AutotagRSSFeed: no items in feed "${contentSource.Name}"`);
97
+ return [];
98
+ }
99
+ LogStatus(`[RSS] Parsed ${allRSSItems.length} items from "${contentSource.Name}"`);
100
+ // Load existing content items for upsert by URL
101
+ const existingItems = await this.LoadExistingContentItems(contentSourceParams.contentSourceID);
102
+ LogStatus(`[RSS] ${existingItems.size} existing items for "${contentSource.Name}"`);
103
+ const items = [];
104
+ for (let idx = 0; idx < allRSSItems.length; idx++) {
105
+ const rssItem = allRSSItems[idx];
106
+ try {
107
+ LogStatus(`[RSS] Processing item ${idx + 1}/${allRSSItems.length}: "${rssItem.title?.substring(0, 60) ?? 'untitled'}"...`);
108
+ const item = await this.ProcessSingleFeedItem(rssItem, contentSourceParams, existingItems);
109
+ if (item) {
110
+ items.push(item);
111
+ LogStatus(`[RSS] Item ${idx + 1} created/updated (text: ${item.Text?.length ?? 0} chars)`);
112
+ }
113
+ else {
114
+ LogStatus(`[RSS] Item ${idx + 1} skipped (unchanged or empty)`);
102
115
  }
103
116
  }
104
- else {
105
- // This content item does not exist, add it
106
- const md = new Metadata();
107
- const contentItem = await md.GetEntityObject('MJ: Content Items', this.contextUser);
108
- contentItem.ContentSourceID = contentSourceParams.contentSourceID;
109
- contentItem.Name = contentSourceParams.name;
110
- contentItem.Description = RSSContentItem.description || this.engine.GetContentItemDescription(contentSourceParams);
111
- contentItem.ContentTypeID = contentSourceParams.ContentTypeID;
112
- contentItem.ContentFileTypeID = contentSourceParams.ContentFileTypeID;
113
- contentItem.ContentSourceTypeID = contentSourceParams.ContentSourceTypeID;
114
- contentItem.Checksum = await this.getChecksumFromRSSItem(RSSContentItem, this.contextUser);
115
- contentItem.URL = RSSContentItem.link || contentSourceParams.URL;
116
- contentItem.Text = JSON.stringify(RSSContentItem);
117
- await contentItem.Save();
118
- contentItemsToProcess.push(contentItem); // Content item was added, add to list
117
+ catch (e) {
118
+ const msg = e instanceof Error ? e.message : String(e);
119
+ LogError(`[RSS] Item ${idx + 1} FAILED "${rssItem.title ?? rssItem.link}": ${msg}`);
119
120
  }
120
121
  }
121
- return contentItemsToProcess;
122
+ LogStatus(`AutotagRSSFeed: ${items.length} new/modified items from "${contentSource.Name}"`);
123
+ return items;
122
124
  }
123
- async parseRSSFeed(url) {
124
- try {
125
- if (await this.urlIsValid(url)) {
126
- const RSSItems = [];
127
- const parser = new Parser();
128
- const feed = await parser.parseURL(url);
129
- const items = feed.items;
130
- // Map each item to an RSSItem object and add it to the RSSItems array
131
- items.forEach(async (item) => {
132
- const rssItem = new RSSItem();
133
- rssItem.title = item.title ?? '';
134
- rssItem.link = item.link ?? '';
135
- rssItem.description = item.description ?? '';
136
- rssItem.pubDate = item.pubDate ?? '';
137
- rssItem.guid = item.guid ?? '';
138
- rssItem.category = item.category ?? '';
139
- const content = item['content:encoded'] ?? item['content'] ?? '';
140
- rssItem.content = await this.engine.parseHTML(content);
141
- rssItem.author = item.author ?? '';
142
- rssItem.comments = item.comments ?? '';
143
- rssItem.source = item.source ?? '';
144
- RSSItems.push(rssItem);
145
- });
146
- return RSSItems;
125
+ /**
126
+ * Process a single RSS feed item: fetch full article text, compute checksum,
127
+ * create or update the ContentItem.
128
+ */
129
+ async ProcessSingleFeedItem(rssItem, contentSourceParams, existingItems) {
130
+ // Fetch full article text from the link URL
131
+ const articleText = await this.FetchArticleText(rssItem);
132
+ if (!articleText || articleText.trim().length === 0) {
133
+ return null;
134
+ }
135
+ const checksum = crypto.createHash('sha256').update(articleText).digest('hex');
136
+ const itemUrl = rssItem.link ?? '';
137
+ const urlKey = itemUrl.toLowerCase();
138
+ // Check for existing content item (skip if unchanged, unless force reprocess)
139
+ const existing = existingItems.get(urlKey);
140
+ if (existing && existing.Checksum === checksum && !this.engine.ForceReprocess) {
141
+ return null; // Content unchanged
142
+ }
143
+ const md = new Metadata();
144
+ let contentItem;
145
+ if (existing) {
146
+ contentItem = existing;
147
+ }
148
+ else {
149
+ contentItem = await md.GetEntityObject('MJ: Content Items', this.contextUser);
150
+ contentItem.NewRecord();
151
+ contentItem.ContentSourceID = contentSourceParams.contentSourceID;
152
+ contentItem.ContentTypeID = contentSourceParams.ContentTypeID;
153
+ contentItem.ContentFileTypeID = contentSourceParams.ContentFileTypeID;
154
+ contentItem.ContentSourceTypeID = contentSourceParams.ContentSourceTypeID;
155
+ }
156
+ // Fix #6: Use RSS item title and description, not the source name
157
+ contentItem.Name = rssItem.title ?? contentSourceParams.name;
158
+ contentItem.Description = rssItem.description ?? this.engine.GetContentItemDescription(contentSourceParams);
159
+ contentItem.URL = itemUrl;
160
+ contentItem.Text = articleText;
161
+ contentItem.Checksum = checksum;
162
+ const saved = await contentItem.Save();
163
+ if (!saved) {
164
+ throw new Error(`Failed to save ContentItem for "${itemUrl}"`);
165
+ }
166
+ existingItems.set(urlKey, contentItem);
167
+ return contentItem;
168
+ }
169
+ /**
170
+ * Fetch the full article text for an RSS item.
171
+ *
172
+ * Strategy:
173
+ * 1. If the RSS item has inline content (content:encoded), use that
174
+ * 2. Otherwise, follow the item's link URL and extract text with Cheerio
175
+ * 3. Fall back to the RSS description if link fetching fails
176
+ */
177
+ async FetchArticleText(rssItem) {
178
+ // 1. Prefer inline content if it's substantial (> 200 chars after HTML stripping)
179
+ if (rssItem.content && rssItem.content.trim().length > 200) {
180
+ return rssItem.content; // Already HTML-parsed by parseRSSFeed
181
+ }
182
+ // 2. Follow the link URL to get the full article
183
+ if (rssItem.link) {
184
+ try {
185
+ const fullText = await this.FetchAndParseWebPage(rssItem.link);
186
+ if (fullText && fullText.trim().length > 100) {
187
+ return fullText;
188
+ }
189
+ }
190
+ catch (e) {
191
+ const msg = e instanceof Error ? e.message : String(e);
192
+ LogStatus(`AutotagRSSFeed: failed to fetch article from "${rssItem.link}": ${msg}`);
193
+ }
194
+ }
195
+ // 3. Fall back to whatever content we have
196
+ if (rssItem.content && rssItem.content.trim().length > 0) {
197
+ return rssItem.content;
198
+ }
199
+ // 4. Last resort: use description (usually just a summary)
200
+ return rssItem.description ?? '';
201
+ }
202
+ /**
203
+ * Fetch a web page and extract its main text content using Cheerio.
204
+ * Strips navigation, headers, footers, scripts, and styles.
205
+ */
206
+ async FetchAndParseWebPage(url) {
207
+ const response = await axios.get(url, {
208
+ timeout: 8000,
209
+ headers: {
210
+ 'User-Agent': 'Mozilla/5.0 (compatible; MemberJunction/1.0)',
211
+ 'Accept': 'text/html,application/xhtml+xml'
147
212
  }
148
- else {
149
- throw new Error(`Invalid URL: ${url}`);
213
+ });
214
+ if (typeof response.data !== 'string') {
215
+ return '';
216
+ }
217
+ return this.engine.parseHTML(response.data);
218
+ }
219
+ /**
220
+ * Parse an RSS/Atom feed URL and return structured items.
221
+ * The content field is HTML-stripped via the engine's parseHTML.
222
+ */
223
+ async ParseRSSFeed(url) {
224
+ if (!await this.UrlIsValid(url)) {
225
+ LogError(`AutotagRSSFeed: invalid feed URL: ${url}`);
226
+ return [];
227
+ }
228
+ try {
229
+ const parser = new Parser();
230
+ const feed = await parser.parseURL(url);
231
+ const items = [];
232
+ for (const item of feed.items) {
233
+ const rssItem = new RSSItem();
234
+ rssItem.title = item.title ?? '';
235
+ rssItem.link = item.link ?? '';
236
+ rssItem.description = item.contentSnippet ?? item.description ?? '';
237
+ rssItem.pubDate = item.pubDate ?? '';
238
+ rssItem.guid = item.guid ?? '';
239
+ rssItem.category = item.categories?.join(', ') ?? '';
240
+ rssItem.author = item.creator ?? item.author ?? '';
241
+ rssItem.comments = item['comments'] ?? '';
242
+ rssItem.source = item['source'] ?? '';
243
+ // Parse inline content (content:encoded or content)
244
+ const rawContent = item['content:encoded'] ?? item.content ?? '';
245
+ if (rawContent) {
246
+ rssItem.content = await this.engine.parseHTML(rawContent);
247
+ }
248
+ items.push(rssItem);
150
249
  }
250
+ return items;
151
251
  }
152
252
  catch (error) {
153
- console.error('Error fetching RSS feed:', error);
253
+ const msg = error instanceof Error ? error.message : String(error);
254
+ LogError(`AutotagRSSFeed: error parsing feed "${url}": ${msg}`);
154
255
  return [];
155
256
  }
156
257
  }
157
- async urlIsValid(url) {
258
+ /**
259
+ * Check if a URL is reachable via HTTP HEAD request.
260
+ */
261
+ async UrlIsValid(url) {
158
262
  try {
159
- const response = await axios.head(url);
160
- return response.status === 200;
263
+ const response = await axios.head(url, { timeout: 10000 });
264
+ return response.status >= 200 && response.status < 400;
161
265
  }
162
- catch (e) {
163
- console.error(`Invalid URL: ${url}`);
266
+ catch {
164
267
  return false;
165
268
  }
166
269
  }
167
- async getChecksumFromRSSItem(RSSContentItem, contextUser) {
168
- const hash = crypto.createHash('sha256').update(JSON.stringify(RSSContentItem)).digest('hex');
169
- return hash;
270
+ /**
271
+ * Load existing ContentItems for this source, keyed by lowercase URL for upsert.
272
+ */
273
+ async LoadExistingContentItems(contentSourceID) {
274
+ const rv = new RunView();
275
+ const result = await rv.RunView({
276
+ EntityName: 'MJ: Content Items',
277
+ ExtraFilter: `ContentSourceID='${contentSourceID}'`,
278
+ ResultType: 'entity_object'
279
+ }, this.contextUser);
280
+ const map = new Map();
281
+ if (result.Success) {
282
+ for (const ci of result.Results) {
283
+ if (ci.URL) {
284
+ map.set(ci.URL.toLowerCase(), ci);
285
+ }
286
+ }
287
+ }
288
+ return map;
170
289
  }
171
290
  };
172
291
  AutotagRSSFeed = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"AutotagRSSFeed.js","sourceRoot":"","sources":["../../../src/RSSFeed/generic/AutotagRSSFeed.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAY,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,WAAW,EAA2B,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAuB,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,MAAM,MAAM,QAAQ,CAAA;AAC3B,OAAO,MAAM,MAAM,YAAY,CAAA;AAC/B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;AAGvB,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,WAAW;IAK3C;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,iBAAiB,CAAC,QAAQ,CAAC;IAC7C,CAAC;IAES,cAAc;QACpB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,OAAO,CAAC,WAAqB,EAAE,UAAoC;QAC5E,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,MAAM,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;QAChF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E,CAAC;oBACT,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;gBACtC,CAAC;YACL,CAAC;QACL,CAAC;QACD,OAAO,GAAG,CAAC;IACf,CAAC;CACJ,CAAA;AAvSY,cAAc;IAD1B,aAAa,CAAC,WAAW,EAAE,gBAAgB,CAAC;;GAChC,cAAc,CAuS1B"}
@@ -20,7 +20,7 @@ export declare class AutotagWebsite extends AutotagBase {
20
20
  * It initializes the connection, retrieves the content sources corresponding to the content source type, sets the content items that we want to process,
21
21
  * extracts and processes the text, and sets the results in the database.
22
22
  */
23
- Autotag(contextUser: UserInfo, onProgress?: AutotagProgressCallback): Promise<void>;
23
+ Autotag(contextUser: UserInfo, onProgress?: AutotagProgressCallback): Promise<number>;
24
24
  /**
25
25
  * Given a content source, retrieve all content items associated with the content sources.
26
26
  * The content items are then processed to determine if they have been modified since the last time they were processed or if they are new content items.
@@ -1 +1 @@
1
- {"version":3,"file":"AutotagWebsite.d.ts","sourceRoot":"","sources":["../../../src/Websites/generic/AutotagWebsite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAqB,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAqB,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAC3F,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAMnC,qBACa,cAAe,SAAQ,WAAW;IAC3C,OAAO,CAAC,WAAW,CAAW;IAC9B,OAAO,CAAC,MAAM,CAAoB;IAClC,SAAS,CAAC,mBAAmB,EAAE,MAAM,CAAA;IACrC,SAAS,CAAC,+BAA+B,EAAE,OAAO,CAAC;IACnD,SAAS,CAAC,4BAA4B,EAAE,OAAO,CAAC;IAChD,SAAS,CAAC,QA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E,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;cA+CnI,KAAK,CAAC,EAAE,EAAE,MAAM;CAGnC"}
@@ -35,7 +35,8 @@ let AutotagWebsite = class AutotagWebsite extends AutotagBase {
35
35
  this.contentSourceTypeID = this.engine.SetSubclassContentSourceType('Website');
36
36
  const contentSources = await this.engine.getAllContentSources(this.contextUser, this.contentSourceTypeID);
37
37
  const contentItemsToProcess = await this.SetContentItemsToProcess(contentSources);
38
- await this.engine.ExtractTextAndProcessWithLLM(contentItemsToProcess, this.contextUser, undefined, onProgress);
38
+ await this.engine.ExtractTextAndProcessWithLLM(contentItemsToProcess, this.contextUser, undefined, undefined, onProgress);
39
+ return contentItemsToProcess.length;
39
40
  }
40
41
  /**
41
42
  * Given a content source, retrieve all content items associated with the content sources.