npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mass-production-files

v1.0.6

Published

自定义读取md文件批量处理生成文件夹目录与文件(包括pdf与mp4文件)

Readme

批量读取md文件生成文件夹目录生成对应文件

安装模块

 pnpm install Mass-production-files

安装依赖

 pnpm install 

导入模块

js const { processAllChapters } = require("./Mass-production-files");

项目地址配置

const file_to_path = "E:\\A_working_directory\\hugo_project\\项目\\content";

文件类型以及路径配置(固定结构,type可多类型,注意:md模板中的type根据自己代码需求写不然会出问题,小节不写)

const fileTypes = {
    zh: [
      // 中文的类型和文件列表
      [
        {
          type: "course",
          sourceFiles: [
            "../dav陪标/Excel课程/标2/Excel_cn.md",
            "../dav陪标/MySQL课程/标2/sql课程目录/cn/MySQL课程内容_cn.md",
            "../dav陪标/python课程/标2/Python课程.md",
            "../dav陪标/tableau课程/标2/Tableau_cn.md",
          ],
        },
        {
          type: "experiment",
          sourceFiles: [
            "../dav陪标/Excel课程/标2/Excel_cn.md",
            "../dav陪标/MySQL课程/标2/sql课程目录/cn/MySQL高级查询与优化实验手册.md",
            "../dav陪标/python课程/标2/Python课程.md",
            "../dav陪标/tableau课程/标2/Tableau_cn.md",
          ],
        },
        {
          type: "case",
          sourceFiles: [
            "../dav陪标/综合案例/标0/Excel/Excel(CN).md",
            "../dav陪标/综合案例/标0/MySQL/MySQL综合案例(cn).md",
            "../dav陪标/综合案例/标0/python/python (cn).md",
            "../dav陪标/综合案例/标0/tableau/tableau(cn).md",
          ],
        },
        {
          type: "video",
          sourceFiles: [
            "../dav陪标/Excel课程/标2/Excel_cn.md",
            "../dav陪标/MySQL课程/标2/sql课程目录/cn/MySQL课程内容_cn.md",
            "../dav陪标/python课程/标2/Python课程.md",
            "../dav陪标/tableau课程/标2/Tableau_cn.md",
          ],
        },
      ],
    ],
    en: [
      // 英文的类型和文件列表
      [
        {
          type: "course",
          sourceFiles: [
            "../dav陪标/Excel课程/标2/Excel_en.md",
            "../dav陪标/MySQL课程/标2/sql课程目录/en/MySQL Course  _en.md",
            "../dav陪标/python课程/标2/Python Course.md",
            "../dav陪标/tableau课程/标2/Tableau_en.md",
          ],
        },
        {
          type: "experiment",
          sourceFiles: [
            "../dav陪标/Excel课程/标2/Excel_en.md",
            "../dav陪标/MySQL课程/标2/sql课程目录/en/MySQL Advanced Queries and Optimization.md",
            "../dav陪标/python课程/标2/Python Course.md",
            "../dav陪标/tableau课程/标2/Tableau_en.md",
          ],
        },
        {
          type: "case",
          sourceFiles: [
            "../dav陪标/综合案例/标0/Excel/Excel(EN).md",
            "../dav陪标/综合案例/标0/MySQL/MySQL综合案例(en).md",
            "../dav陪标/综合案例/标0/python/python数据分析(EN).md",
            "../dav陪标/综合案例/标0/tableau/tableau(en).md",
          ],
        },
        {
          type: "video",
          sourceFiles: [
            "../dav陪标/Excel课程/标2/Excel_en.md",
            "../dav陪标/MySQL课程/标2/sql课程目录/en/MySQL Course  _en.md",
            "../dav陪标/python课程/标2/Python Course.md",
            "../dav陪标/tableau课程/标2/Tableau_en.md",
          ],
        },
      ],
    ],
  };

调用处理所有章节的函数

(async () => {
    // 传入项目路径与需要读取的文件路径
  await processAllChapters(file_to_path, fileTypes);
  console.log("All chapters processed.");
  // 所有章节处理完成后执行重置操作
  chapterCount = 1;
  console.log("chapterCount has been reset to 0.");
})();

开源协议

ISC