Skip to content

Commit

Permalink
Merge pull request #42 from paceaux/develop
Browse files Browse the repository at this point in the history
Fixes screenshot filenames, updates cheerio, updates packages
  • Loading branch information
paceaux authored Aug 21, 2024
2 parents e871bd3 + ab7f446 commit 0dcd4e9
Show file tree
Hide file tree
Showing 8 changed files with 11,752 additions and 2,621 deletions.
13 changes: 11 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,22 @@
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"type": "node",
"request": "launch",
"name": "Launch Program",
"args": [
"-u", // url
"https://frankmtaylor.com/sitemap.xml",
"-l", // limit. raise or lower for more pages AND screenshots
"10",
"-c", // screengrabs.
"-s", // the selector
"h1"
],
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}\\index.js"
"program": "${workspaceFolder}/cli.js"
}
]
}
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,19 @@ Pages not showing up that should? Check the `log.txt` for any issues.

### Prerequisites

- Node LTS (as of September 2023, Node 18.16.0)
- Node LTS (as of August 2024, Node 20.16.0)

- If you want to use the `-d` or `-c` (`--isSpa` and `--takeScreenshots` options), this requires Puppeteer which in turn requires Chromium.
#### Some possible Puppeteer setup for Mac Users

- If running this on a Mac, be sure you install chromium without a quarantine flag: `brew install chromium --no-quarantine`
If you want to use the `-d` or `-c` (`--isSpa` and `--takeScreenshots` ) options, this requires Puppeteer which in turn requires Chromium.

You may (or may not) need `PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true` and `PUPPETEER_EXECUTABLE_PATH` environment variables set. They were necessary for older versions of Puppeteer and seem to be unnecessary for new ones.

If you're having issues, run `printenv` in your terminal to see if those variables are set. If they are, you may need to unset them with `unset PUPPETEER_SKIP_CHROMIUM_DOWNLOAD` and `unset PUPPETEER_EXECUTABLE_PATH`. Then `source ~/.bashrc` or `source ~/.zshrc` to be sure, and run `printenv` once again.

But if they aren't set, you may need to do this.

After you play with those variables, reinstall this package.

### Running on-demand

Expand Down
Loading

0 comments on commit 0dcd4e9

Please sign in to comment.