@mxfb/cli 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mxfb/index.js +3 -0
- package/mxfb/index.js.map +7 -0
- package/package.json +2 -1
- package/scrape-tumblr/index.js +3 -3
- package/scrape-tumblr/index.js.map +3 -3
package/mxfb/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{existsSync as r,readdirSync as c}from"node:fs";import{readFile as l}from"node:fs/promises";import t from"node:path";import i from"node:process";import{fileURLToPath as m}from"node:url";import{Command as g}from"commander";import{styles as n}from"@design-edito/tools/agnostic/misc/logs/styles/index.js";var e=t.join(t.dirname(m(import.meta.url)),"..");function f(){try{return c(e).filter(o=>r(t.join(e,o,"index.js"))).sort()}catch{return[]}}var p=[t.join(e,"package.json"),t.join(e,"..","package.json")];async function d(){for(let o of p)try{let a=await l(o,{encoding:"utf-8"});return JSON.parse(a)}catch{continue}return null}var s=new g().name("mxfb").description("The @mxfb command line tools: what this package installs, and which version is here.");s.command("list").description("every command this package installs").action(async()=>{let o=f();if(console.log(""),console.log(n.title("Commands.")),o.length===0){console.log(n.warning("None found.")),console.log(n.light(e)),console.log("");return}o.forEach(a=>console.log(n.important(a))),console.log("")});s.command("version").description("the installed version of this package").action(async()=>{let o=await d();console.log(""),console.log(n.title("Version.")),o===null&&(console.log(n.error("No package.json next to the commands.")),console.log(n.light(e)),console.log(""),i.exit(1)),console.log(`${n.important(o.name??"@mxfb/cli")} ${o.version??"unknown"}`),console.log("")});i.argv.length<=2&&s.help();await s.parseAsync();
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/mxfb/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { existsSync, readdirSync } from 'node:fs'\nimport { readFile } from 'node:fs/promises'\nimport path from 'node:path'\nimport process from 'node:process'\nimport { fileURLToPath } from 'node:url'\nimport { Command } from 'commander'\nimport { styles } from '@design-edito/tools/agnostic/misc/logs/styles/index.js'\n\ntype PackageManifest = {\n name?: string\n version?: string\n}\n\n// A built command sits at <package>/<command>/index.js, so its siblings are the other\n// commands and the manifest is one level up.\nconst PACKAGE_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), '..')\n\nfunction listCommandNames (): string[] {\n try {\n return readdirSync(PACKAGE_DIR)\n .filter(name => existsSync(path.join(PACKAGE_DIR, name, 'index.js')))\n .sort()\n }\n catch { return [] }\n}\n\n// Published, the manifest sits next to the commands; in this repo it is one level further\n// up, since build/package.json is only written at publish time.\nconst MANIFEST_PATHS = [\n path.join(PACKAGE_DIR, 'package.json'),\n path.join(PACKAGE_DIR, '..', 'package.json')\n]\n\nasync function readManifest (): Promise<PackageManifest | null> {\n for (const manifestPath of MANIFEST_PATHS) {\n try {\n const raw = await readFile(manifestPath, { encoding: 'utf-8' })\n return JSON.parse(raw) as PackageManifest\n }\n catch { continue }\n }\n return null\n}\n\nconst program = new Command()\n .name('mxfb')\n .description('The @mxfb command line tools: what this package installs, and which version is here.')\n\nprogram\n .command('list')\n .description('every command this package installs')\n .action(async () => {\n const names = listCommandNames()\n console.log('')\n console.log(styles.title('Commands.'))\n if (names.length === 0) {\n console.log(styles.warning('None found.'))\n console.log(styles.light(PACKAGE_DIR))\n console.log('')\n return\n }\n names.forEach(name => console.log(styles.important(name)))\n console.log('')\n })\n\nprogram\n .command('version')\n .description('the installed version of this package')\n .action(async () => {\n const manifest = await readManifest()\n console.log('')\n console.log(styles.title('Version.'))\n if (manifest === null) {\n console.log(styles.error('No package.json next to the commands.'))\n console.log(styles.light(PACKAGE_DIR))\n console.log('')\n process.exit(1)\n }\n console.log(`${styles.important(manifest.name ?? '@mxfb/cli')} ${manifest.version ?? 'unknown'}`)\n console.log('')\n })\n\nif (process.argv.length <= 2) program.help()\nawait program.parseAsync()\n"],
|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AQ,IAAI,EAAE,CAChB,CAAC,EAEHK,EACG,QAAQ,SAAS,EACjB,YAAY,uCAAuC,EACnD,OAAO,SAAY,CAClB,IAAME,EAAW,MAAML,EAAa,EACpC,QAAQ,IAAI,EAAE,EACd,QAAQ,IAAIL,EAAO,MAAM,UAAU,CAAC,EAChCU,IAAa,OACf,QAAQ,IAAIV,EAAO,MAAM,uCAAuC,CAAC,EACjE,QAAQ,IAAIA,EAAO,MAAMC,CAAW,CAAC,EACrC,QAAQ,IAAI,EAAE,EACdJ,EAAQ,KAAK,CAAC,GAEhB,QAAQ,IAAI,GAAGG,EAAO,UAAUU,EAAS,MAAQ,WAAW,CAAC,IAAIA,EAAS,SAAW,SAAS,EAAE,EAChG,QAAQ,IAAI,EAAE,CAChB,CAAC,EAECb,EAAQ,KAAK,QAAU,GAAGW,EAAQ,KAAK,EAC3C,MAAMA,EAAQ,WAAW",
|
|
6
|
+
"names": ["existsSync", "readdirSync", "readFile", "path", "process", "fileURLToPath", "Command", "styles", "PACKAGE_DIR", "listCommandNames", "name", "MANIFEST_PATHS", "readManifest", "manifestPath", "raw", "program", "names", "manifest"]
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mxfb/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Maxime Fabas",
|
|
6
6
|
"license": "ISC",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"main": "index.js",
|
|
13
13
|
"module": "index.js",
|
|
14
14
|
"bin": {
|
|
15
|
+
"mxfb": "./mxfb/index.js",
|
|
15
16
|
"scrape-tumblr": "./scrape-tumblr/index.js"
|
|
16
17
|
},
|
|
17
18
|
"dependencies": {
|
package/scrape-tumblr/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import h from"node:process";import{Command as
|
|
3
|
-
Archive`));console.log(
|
|
4
|
-
Resume`));console.log(
|
|
2
|
+
import{mkdir as D}from"node:fs/promises";import g from"node:os";import h from"node:path";import f from"node:process";import{Command as A,InvalidArgumentError as U}from"commander";import{input as w,select as C}from"@inquirer/prompts";import{styles as t}from"@design-edito/tools/agnostic/misc/logs/styles/index.js";import{crawlBlog as E,readArchivePosts as R}from"@mxfb/tools/node/scrapers/@tumblr/index.js";var k=500;function p(e){let o=Number.parseInt(e,10);if(Number.isNaN(o)||o<=0)throw new U("Expected a positive number.");return o}function a(e,o){return`${e} ${o}${e===1?"":"s"}`}function b(e){let o=e.trim();if(o==="")return"A blog URL is needed.";try{new URL(o)}catch{return"Expected a full URL, protocol included."}return null}function L(e){try{return new URL(e).hostname}catch{return"tumblr-archive"}}async function m(e){let o=e.replace(/^~(?=\/|$)/,g.homedir()),r=h.resolve(o);return await D(r,{recursive:!0}),r}async function q(e,o){if(e!==void 0)return await m(e);let r=h.join(f.cwd(),L(o)),i=await C({message:"Where should the archive be written?",choices:[{name:"Here",value:"here",description:r},{name:"A temporary directory",value:"temp",description:`under ${g.tmpdir()}, cleared on reboot`},{name:"Somewhere else",value:"manual",description:"type a path"}]});if(i==="temp")return;if(i==="here")return await m(r);let c=await w({message:"Which directory?",default:r,validate:u=>u.trim()===""?"A path is needed.":!0});return await m(c.trim())}function x(e){let{url:o,kind:r,postCount:i,newPostCount:c,error:u}=e;if(u!==null){console.log(t.warning(`${"failed".padEnd(10)}${o}`)),console.log(t.light(` ${u}`));return}let P=c===i?a(i,"post"):`${a(i,"post")}, ${c} new`;console.log(`${t.light((r??"unknown").padEnd(10))}${o}`),console.log(t.light(` ${P}`))}var y=new A().name("scrape-tumblr").description("Archives a Tumblr blog: every page it serves, every post it holds.").argument("[blog-url]","any URL on the blog \u2014 only its origin is used").option("-d, --data-dir <path>","where to write, and where to resume from").option("-l, --limit <count>","stop after this many pages",p).option("--delay <ms>","wait between two requests",p,k).option("-r, --resume","pick up where a previous crawl of the same directory stopped",!1).option("--no-sitemap","walk the listings instead of reading the sitemap").option("-q, --quiet","report only the result",!1).parse(),s=y.opts(),[N]=y.args,v=N??await w({message:"Which blog should be scraped? (e.g. https://myblog.tumblr.com)",validate:e=>b(e)??!0}),d=b(v);d!==null&&(console.log(t.error(d)),f.exit(1));var l=v.trim(),S=await q(s.dataDir,l);console.log("");console.log(t.title(`Scraping ${l}...`));console.log(t.light("> starting a headless browser, the blog host refuses plain requests"));console.log("");var n=await E(l,{dataDirPath:S,limit:s.limit,delayMs:s.delay,resume:s.resume,useSitemap:s.sitemap,onPageCrawled:s.quiet?void 0:x}),$=await R(n.dataDirPath),B=$.filter(e=>e.publishedOn!==null).length,I=$.filter(e=>e.rawHtml!==null).length;console.log("");console.log(t.title("Scrape complete."));console.log(t.important(n.blog?.title??l));console.log(t.success(`${a(n.pageCount,"page")} read, ${a(n.postCount,"post")} found`));console.log(t.light(`${B} with a date, ${I} with their markup kept`));n.failures.length>0&&console.log(t.warning(`${a(n.failures.length,"page")} could not be read`));console.log(t.info(`
|
|
3
|
+
Archive`));console.log(t.light(n.dataDirPath));console.log(t.info(`
|
|
4
|
+
Resume`));console.log(t.light(`> scrape-tumblr ${l} --data-dir ${n.dataDirPath} --resume`));console.log("");
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/scrape-tumblr/index.ts"],
|
|
4
|
-
"sourcesContent": ["import process from 'node:process'\nimport { Command, InvalidArgumentError } from 'commander'\nimport { input } from '@inquirer/prompts'\nimport { styles } from '@design-edito/tools/agnostic/misc/logs/styles/index.js'\nimport { crawlBlog, readArchivePosts } from '@mxfb/tools/node/scrapers/@tumblr/index.js'\nimport type { CrawledPageReport } from '@mxfb/tools/node/scrapers/@tumblr/types.js'\n\nconst DEFAULT_DELAY_MS = 500\n\ntype CommandOptions = {\n dataDir?: string\n limit?: number\n delay: number\n resume: boolean\n sitemap: boolean\n quiet: boolean\n}\n\nfunction toPositiveInteger (raw: string): number {\n const parsed = Number.parseInt(raw, 10)\n if (Number.isNaN(parsed) || parsed <= 0) throw new InvalidArgumentError('Expected a positive number.')\n return parsed\n}\n\nfunction pluralize (count: number, singular: string): string {\n return `${count} ${singular}${count === 1 ? '' : 's'}`\n}\n\nfunction reportPage (report: CrawledPageReport): void {\n const { url, kind, postCount, newPostCount, error } = report\n if (error !== null) {\n console.log(styles.warning(`${'failed'.padEnd(10)}${url}`))\n console.log(styles.light(` ${error}`))\n return\n }\n const posts = newPostCount === postCount\n ? pluralize(postCount, 'post')\n : `${pluralize(postCount, 'post')}, ${newPostCount} new`\n console.log(`${styles.light((kind ?? 'unknown').padEnd(10))}${url}`)\n console.log(styles.light(` ${posts}`))\n}\n\nconst program = new Command()\n .name('scrape-tumblr')\n .description('Archives a Tumblr blog: every page it serves, every post it holds.')\n .argument('[blog-url]', 'any URL on the blog \u2014 only its origin is used')\n .option('-d, --data-dir <path>', 'where to write, and where to resume from')\n .option('-l, --limit <count>', 'stop after this many pages', toPositiveInteger)\n .option('--delay <ms>', 'wait between two requests', toPositiveInteger, DEFAULT_DELAY_MS)\n .option('-r, --resume', 'pick up where a previous crawl of the same directory stopped', false)\n .option('--no-sitemap', 'walk the listings instead of reading the sitemap')\n .option('-q, --quiet', 'report only the result', false)\n .parse()\n\nconst options = program.opts<CommandOptions>()\nconst [blogUrlArgument] = program.args\n\nconst
|
|
5
|
-
"mappings": "AAAA,
|
|
6
|
-
"names": ["process", "Command", "InvalidArgumentError", "input", "styles", "crawlBlog", "readArchivePosts", "DEFAULT_DELAY_MS", "toPositiveInteger", "raw", "parsed", "pluralize", "count", "singular", "reportPage", "report", "url", "kind", "postCount", "newPostCount", "error", "posts", "program", "options", "blogUrlArgument", "
|
|
4
|
+
"sourcesContent": ["import { mkdir } from 'node:fs/promises'\nimport os from 'node:os'\nimport path from 'node:path'\nimport process from 'node:process'\nimport { Command, InvalidArgumentError } from 'commander'\nimport { input, select } from '@inquirer/prompts'\nimport { styles } from '@design-edito/tools/agnostic/misc/logs/styles/index.js'\nimport { crawlBlog, readArchivePosts } from '@mxfb/tools/node/scrapers/@tumblr/index.js'\nimport type { CrawledPageReport } from '@mxfb/tools/node/scrapers/@tumblr/types.js'\n\nconst DEFAULT_DELAY_MS = 500\n\ntype CommandOptions = {\n dataDir?: string\n limit?: number\n delay: number\n resume: boolean\n sitemap: boolean\n quiet: boolean\n}\n\nfunction toPositiveInteger (raw: string): number {\n const parsed = Number.parseInt(raw, 10)\n if (Number.isNaN(parsed) || parsed <= 0) throw new InvalidArgumentError('Expected a positive number.')\n return parsed\n}\n\nfunction pluralize (count: number, singular: string): string {\n return `${count} ${singular}${count === 1 ? '' : 's'}`\n}\n\nfunction toBlogUrlError (raw: string): string | null {\n const trimmed = raw.trim()\n if (trimmed === '') return 'A blog URL is needed.'\n try { new URL(trimmed) }\n catch { return 'Expected a full URL, protocol included.' }\n return null\n}\n\nfunction toArchiveDirName (rawUrl: string): string {\n try { return new URL(rawUrl).hostname }\n catch { return 'tumblr-archive' }\n}\n\n// inquirer hands back what was typed, so a leading ~ never went through a shell.\nasync function ensureDirectory (rawPath: string): Promise<string> {\n const expanded = rawPath.replace(/^~(?=\\/|$)/, os.homedir())\n const dirPath = path.resolve(expanded)\n await mkdir(dirPath, { recursive: true })\n return dirPath\n}\n\nasync function resolveDataDirPath (\n optionPath: string | undefined,\n blogUrl: string\n): Promise<string | undefined> {\n if (optionPath !== undefined) return await ensureDirectory(optionPath)\n const herePath = path.join(process.cwd(), toArchiveDirName(blogUrl))\n const choice = await select({\n message: 'Where should the archive be written?',\n choices: [\n { name: 'Here', value: 'here', description: herePath },\n { name: 'A temporary directory', value: 'temp', description: `under ${os.tmpdir()}, cleared on reboot` },\n { name: 'Somewhere else', value: 'manual', description: 'type a path' }\n ]\n })\n if (choice === 'temp') return undefined\n if (choice === 'here') return await ensureDirectory(herePath)\n const typedPath = await input({\n message: 'Which directory?',\n default: herePath,\n validate: value => value.trim() === '' ? 'A path is needed.' : true\n })\n return await ensureDirectory(typedPath.trim())\n}\n\nfunction reportPage (report: CrawledPageReport): void {\n const { url, kind, postCount, newPostCount, error } = report\n if (error !== null) {\n console.log(styles.warning(`${'failed'.padEnd(10)}${url}`))\n console.log(styles.light(` ${error}`))\n return\n }\n const posts = newPostCount === postCount\n ? pluralize(postCount, 'post')\n : `${pluralize(postCount, 'post')}, ${newPostCount} new`\n console.log(`${styles.light((kind ?? 'unknown').padEnd(10))}${url}`)\n console.log(styles.light(` ${posts}`))\n}\n\nconst program = new Command()\n .name('scrape-tumblr')\n .description('Archives a Tumblr blog: every page it serves, every post it holds.')\n .argument('[blog-url]', 'any URL on the blog \u2014 only its origin is used')\n .option('-d, --data-dir <path>', 'where to write, and where to resume from')\n .option('-l, --limit <count>', 'stop after this many pages', toPositiveInteger)\n .option('--delay <ms>', 'wait between two requests', toPositiveInteger, DEFAULT_DELAY_MS)\n .option('-r, --resume', 'pick up where a previous crawl of the same directory stopped', false)\n .option('--no-sitemap', 'walk the listings instead of reading the sitemap')\n .option('-q, --quiet', 'report only the result', false)\n .parse()\n\nconst options = program.opts<CommandOptions>()\nconst [blogUrlArgument] = program.args\n\nconst rawBlogUrl = blogUrlArgument ?? await input({\n message: 'Which blog should be scraped? (e.g. https://myblog.tumblr.com)',\n validate: value => toBlogUrlError(value) ?? true\n})\n\nconst blogUrlError = toBlogUrlError(rawBlogUrl)\nif (blogUrlError !== null) {\n console.log(styles.error(blogUrlError))\n process.exit(1)\n}\n\nconst blogUrl = rawBlogUrl.trim()\n\nconst dataDirPath = await resolveDataDirPath(options.dataDir, blogUrl)\n\nconsole.log('')\nconsole.log(styles.title(`Scraping ${blogUrl}...`))\n// Chrome has to clear the blog host's challenge before anything is readable, which takes a\n// few seconds on the first page and nothing on the ones after.\nconsole.log(styles.light('> starting a headless browser, the blog host refuses plain requests'))\nconsole.log('')\n\nconst result = await crawlBlog(blogUrl, {\n dataDirPath,\n limit: options.limit,\n delayMs: options.delay,\n resume: options.resume,\n useSitemap: options.sitemap,\n onPageCrawled: options.quiet ? undefined : reportPage\n})\n\nconst posts = await readArchivePosts(result.dataDirPath)\nconst dated = posts.filter(post => post.publishedOn !== null).length\nconst withBody = posts.filter(post => post.rawHtml !== null).length\n\nconsole.log('')\nconsole.log(styles.title('Scrape complete.'))\nconsole.log(styles.important(result.blog?.title ?? blogUrl))\nconsole.log(styles.success(`${pluralize(result.pageCount, 'page')} read, ${pluralize(result.postCount, 'post')} found`))\nconsole.log(styles.light(`${dated} with a date, ${withBody} with their markup kept`))\nif (result.failures.length > 0) {\n console.log(styles.warning(`${pluralize(result.failures.length, 'page')} could not be read`))\n}\nconsole.log(styles.info('\\nArchive'))\nconsole.log(styles.light(result.dataDirPath))\nconsole.log(styles.info('\\nResume'))\nconsole.log(styles.light(`> scrape-tumblr ${blogUrl} --data-dir ${result.dataDirPath} --resume`))\nconsole.log('')\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,SAAAA,MAAa,mBACtB,OAAOC,MAAQ,UACf,OAAOC,MAAU,YACjB,OAAOC,MAAa,eACpB,OAAS,WAAAC,EAAS,wBAAAC,MAA4B,YAC9C,OAAS,SAAAC,EAAO,UAAAC,MAAc,oBAC9B,OAAS,UAAAC,MAAc,yDACvB,OAAS,aAAAC,EAAW,oBAAAC,MAAwB,6CAG5C,IAAMC,EAAmB,IAWzB,SAASC,EAAmBC,EAAqB,CAC/C,IAAMC,EAAS,OAAO,SAASD,EAAK,EAAE,EACtC,GAAI,OAAO,MAAMC,CAAM,GAAKA,GAAU,EAAG,MAAM,IAAIT,EAAqB,6BAA6B,EACrG,OAAOS,CACT,CAEA,SAASC,EAAWC,EAAeC,EAA0B,CAC3D,MAAO,GAAGD,CAAK,IAAIC,CAAQ,GAAGD,IAAU,EAAI,GAAK,GAAG,EACtD,CAEA,SAASE,EAAgBL,EAA4B,CACnD,IAAMM,EAAUN,EAAI,KAAK,EACzB,GAAIM,I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", "DEFAULT_DELAY_MS", "toPositiveInteger", "raw", "parsed", "pluralize", "count", "singular", "toBlogUrlError", "trimmed", "toArchiveDirName", "rawUrl", "ensureDirectory", "rawPath", "expanded", "dirPath", "resolveDataDirPath", "optionPath", "blogUrl", "herePath", "choice", "typedPath", "value", "reportPage", "report", "url", "kind", "postCount", "newPostCount", "error", "posts", "program", "options", "blogUrlArgument", "rawBlogUrl", "blogUrlError", "dataDirPath", "result", "dated", "post", "withBody"]
|
|
7
7
|
}
|