Skip to content

Hexo的文本替换工具 Text replacement tool of hexo.

License

Notifications You must be signed in to change notification settings

Achrou/hexo-replace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hexo-replace

一个用来替换hexo相关文件中文本的工具

使用

你可以用它很快速的替换文本如:

hexo replace 张三 李四

在不加任何参数的情况下默认扫描sourcetheme下的文件,即-g 你也可以添加-r参数来自定义扫描路径,它可以是正则表达式(regular expression)、函数、或是一种类似于Express 的路径字符串,例如:

posts/:id => posts/89 
posts/*path => posts/2015/title

更多参考util.Pattern

$ hexo replace -h
Usage: hexo replace <source> <replace>

Description:
Text substitution tool

Arguments:
  replace  New string
  source   Original string

Options:
  -g, --global  Global match string
  -r, --rule    You can use a regular expression, a function or an Express-style pattern string.

TODO

  1. 替换记录备份
  2. 开放扩展接口

Lisense

MIT

About

Hexo的文本替换工具 Text replacement tool of hexo.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published