From 0f0b97e51921c86df338dc5144b4036d0aa96113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=88=9A=28noham=29=C2=B2?= <100566912+NohamR@users.noreply.github.com> Date: Fri, 19 Jun 2026 16:21:38 +0200 Subject: [PATCH] Typo --- src/browser.js | 6 +++--- src/config.js | 2 +- src/index.js | 8 ++++---- src/pdf.js | 4 ++-- src/reader.js | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/browser.js b/src/browser.js index 3e43da8..e461d45 100644 --- a/src/browser.js +++ b/src/browser.js @@ -10,7 +10,7 @@ const READABILITY_PATH = path.join(EXTENSION_DIR, 'data/inject/Readability.js') export function checkExtension () { if (!fs.existsSync(MANIFEST_PATH)) { logger.error( - `Extension not found at: ${EXTENSION_DIR}\n` + + `Extension not found at: "${EXTENSION_DIR}"\n` + 'Please extract the extension first:\n' + ' mkdir -p extension/reader-view\n' + ' unzip extension/Reader-View-Chrome-Web-Store.zip -d extension/reader-view' @@ -19,7 +19,7 @@ export function checkExtension () { } if (!fs.existsSync(READABILITY_PATH)) { logger.error( - `Readability.js not found at: ${READABILITY_PATH}\n` + + `Readability.js not found at: "${READABILITY_PATH}"\n` + 'The extension may be incomplete. Please re-extract it.' ) process.exit(1) @@ -35,7 +35,7 @@ export function getExtensionDir () { } export async function launchBrowser () { - logger.debug(`Launching browser with extension: ${EXTENSION_DIR}`) + logger.debug(`Launching browser with extension: "${EXTENSION_DIR}"`) const browser = await puppeteer.launch({ headless: true, ignoreDefaultArgs: [ diff --git a/src/config.js b/src/config.js index 8ff6756..6cb3865 100644 --- a/src/config.js +++ b/src/config.js @@ -7,7 +7,7 @@ export function loadPreferences (prefsPath) { try { return JSON.parse(fs.readFileSync(prefsPath, 'utf-8')) } catch (e) { - logger.warn(`Warning: could not parse preferences file: ${prefsPath}`) + logger.warn(`Warning: could not parse preferences file: "${prefsPath}"`) return {} } } diff --git a/src/index.js b/src/index.js index b1e46c5..8d50106 100644 --- a/src/index.js +++ b/src/index.js @@ -63,7 +63,7 @@ async function main () { customCss = readCustomCss(path.resolve(opts.css)) if (customCss !== null) { preferences['user-css'] = customCss - logger.info(`Custom CSS loaded: ${path.resolve(opts.css)}`) + logger.info(`Custom CSS loaded: "${path.resolve(opts.css)}"`) } } @@ -72,7 +72,7 @@ async function main () { try { const extId = await discoverExtensionId(browser) - logger.info(`Fetching article: ${url}`) + logger.info(`Fetching article: "${url}"`) const articlePage = await browser.newPage() await articlePage.goto(url, { waitUntil: 'networkidle0', timeout: 30000 }) let article = await extractArticle(articlePage, getReadabilityPath()) @@ -86,11 +86,11 @@ async function main () { const resolvedPath = path.resolve(htmlPath) if (!fs.existsSync(resolvedPath)) { - logger.error(`File not found: ${resolvedPath}`) + logger.error(`File not found: "${resolvedPath}"`) process.exit(1) } - logger.info(`Loading article from local file: ${resolvedPath}`) + logger.info(`Loading article from local file: "${resolvedPath}"`) await articlePage.goto(`file://${resolvedPath}`, { waitUntil: 'networkidle0', timeout: 30000 }) article = await extractArticle(articlePage, getReadabilityPath()) } diff --git a/src/pdf.js b/src/pdf.js index 3fc407e..01c39d2 100644 --- a/src/pdf.js +++ b/src/pdf.js @@ -43,7 +43,7 @@ export function enhanceHtml (html, customCss) { export async function generatePdf (page, html, outputPath) { await page.setContent(html, { waitUntil: 'networkidle0' }) - logger.info(`Generating PDF: ${outputPath}`) + logger.info(`Generating PDF: "${outputPath}"`) await page.pdf({ path: outputPath, format: 'A4', @@ -55,5 +55,5 @@ export async function generatePdf (page, html, outputPath) { right: '0mm' } }) - logger.info(`PDF saved: ${outputPath}`) + logger.info(`PDF saved: "${outputPath}"`) } diff --git a/src/reader.js b/src/reader.js index ead25ab..6a10fce 100644 --- a/src/reader.js +++ b/src/reader.js @@ -53,7 +53,7 @@ export async function extractArticle (page, readabilityPath) { throw new Error('Failed to extract article content with Readability') } logger.info( - `Extracted article: ${article.title} (${article.length} chars, reading ${article.readingTimeMinsFast}-${article.readingTimeMinsSlow} min` + + `Extracted article: '${article.title}' (${article.length} chars, reading ${article.readingTimeMinsFast}-${article.readingTimeMinsSlow} min` + (article.published_time ? `, ${article.published_time}` : '') + ')' )