Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
sitemap2doc
Advanced tools
This module downloads all web pages listed in the Sitemap.xml file and compiles them into a single document.
This module downloads all web pages listed in the Sitemap.xml file and compiles them into a single document.
Designed for AI Embedding Generation
Terminal
npm init -y && npm i sitemap2doc
Node index.mjs
import { Sitemap2Doc } from 'sitemap2doc'
const s2d = new Sitemap2Doc()
await s2d.getDocument( {
'projectName': 'test',
'sitemapUrl': 'https://...'
} )
Terminal
node index.mjs
Key | Type | Description | Required | Default |
---|---|---|---|---|
projectName | String | Set project name | true | |
sitemapUrl | String | Set sitemap source | true | |
silent | Boolean | Control terminal output | false | false |
Example
import { Sitemap2Doc } from 'sitemap2doc'
const s2d = new Sitemap2Doc()
await s2d.getDocument( {
'projectName': 'test',
'sitemapUrl': 'https://...'
} )
Get Sitemap https://...
Get Pages 0 1 2 3 4 5 6 7 8 9
Merge 0
Get current config, the default config you can find here: ./src/data/config.mjs
import { Sitemap2Doc } from 'sitemap2doc'
const s2d = new Sitemap2Doc()
let config = s2d.getConfig()
config['download']['chunkSize'] = 4
s2d
.setConfig( { config } )
.getDocument( { ... } )
All module settings are stored in a config file, see ./src/data/config.mjs. This file can be completely overridden by passing an object during initialization.
import { Sitemap2Doc } from 'sitemap2doc'
const s2d = new Sitemap2Doc()
let config = s2d.getConfig()
config['download']['chunkSize'] = 4
s2d
.setConfig( { config } )
.getDocument( { ... } )
The module is available as open source under the terms of the MIT License.
FAQs
This module downloads all web pages listed in the Sitemap.xml file and compiles them into a single document.
The npm package sitemap2doc receives a total of 0 weekly downloads. As such, sitemap2doc popularity was classified as not popular.
We found that sitemap2doc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.