Skip to content

Commit

Permalink
fix(preview): adding in markdown txt
Browse files Browse the repository at this point in the history
  • Loading branch information
bassrock committed Aug 27, 2024
1 parent a8e8312 commit 9b6a97f
Show file tree
Hide file tree
Showing 5 changed files with 192 additions and 172 deletions.
17 changes: 17 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion servers/parser-graphql-wrapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"kysely": "0.27.3",
"lodash": "4.17.21",
"luxon": "3.4.4",
"markdown-to-txt": "2.0.1",
"md5": "2.3.0",
"mysql2": "3.10.3",
"open-graph-scraper": "6.5.2",
Expand Down Expand Up @@ -80,4 +81,4 @@
"tsconfig": "workspace:*",
"typescript": "5.5.4"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import {
} from '../databases/pocketMetadataStore';
import md5 from 'md5';
import { getOriginalUrlIfPocketImageCached } from '@pocket-tools/image-utils';
import markdownToTxt from 'markdown-to-txt';

export interface IPocketMetadataDataSource {
matcher: RegExp;
ttl: number; // The ttl of the data in seconds
Expand Down Expand Up @@ -206,7 +208,7 @@ export class PocketMetadataModel {
imageId: 0,
src: imageUrl,
},
excerpt: collection.excerpt, // TODO: Convert from markdown
excerpt: markdownToTxt(collection.excerpt),
title: collection.title,
authors: collection.authors.map((author, index) => {
return {
Expand Down
170 changes: 0 additions & 170 deletions servers/parser-graphql-wrapper/src/test/queries/preview.integration.ts

This file was deleted.

Loading

0 comments on commit 9b6a97f

Please sign in to comment.