MCPcopy Index your code
hub / github.com/extractus/article-extractor / extractFromFile

Function extractFromFile

eval.js:30–42  ·  view source on GitHub ↗
(fpath)

Source from the content-addressed store, hash-verified

28}
29
30const extractFromFile = async (fpath) => {
31 try {
32 const html = readFileSync(fpath, 'utf8')
33 const art = await extractFromHtml(html)
34 console.log(art)
35 if (art) {
36 const slug = slugify(art.title)
37 writeFileSync(`evaluation/${slug}.html`, art.content, 'utf8')
38 }
39 } catch (err) {
40 console.trace(err)
41 }
42}
43
44const init = (argv) => {
45 if (argv.length === 3) {

Callers 1

initFunction · 0.85

Calls 1

extractFromHtmlFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…