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

extract-gbk

v2.0.4

Published

extract gbk message source

Downloads

4

Readme

extract-gbk

  • extract-gbk 主要用于提取开发文件中的中文字符串,支持自定义提取、替换规则以及生成对应的资源文件格式

安装步骤:

npm install extract-gbk -g

使用说明:

  • 在对应需要提取的目行窗录中打开命令口,使用extra-gbk 命令行执行提取
//设置提取规则参考下面config.json文件说明(需要管理员权限)
extract-gbk setConfig /usr/work/config.json
 
//重置config.json 为默认
extract-gbk resetConfig

//提取目录当前命令行所执行目录下的/work/abc
extract-gbk run work/abc

config.json 配置文件:

  • config.json配置文件主要用来进行匹配规则自定义,默认匹配替换模式如下
注:以下{KEY}、{VALUE}为系统固定匹配标识不可变更
{
    "regexp":'*', //默认为空,自定义正则优先级高于regexpType
    "regexpType":1 ,
        //  1 包含中文汉字并且可能包含(中文符号|英文字母|英文常规符号|数字|换行符|空白符)
        //  2 仅包含中文汉字
        //  3 只包含中文汉字并且可能包含(中文常规符号|空白符)
        //  4 包含中文汉字并且可能包含(中文常规符号|换行符|空白符)
    "matchMode":[
        {
            matchPattern: "\"{VALUE}\"", //匹配中文字符,如:"提取中文字符"
            replacePattern: "'{VALUE}'" //替换的模式   如:'提取中文字符'
        }
    ],
    "messagePattern" : "\"{KEY}\":\"{VALUE}\",",  // message文件键值匹配
    "excludeFolder":"",                            //过滤不需要提取的文件夹
    "fileExtension":"", //提取文件后缀fileExtension文件
    "output":"",//输出路径(绝对路径);默认当前命令执行目录下的_extra_GB_message_source中
    "isCover":true //默认true,是否重写原始文件
}