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 🙏

© 2024 – Pkg Stats / Ryan Hefner

picgo-plugin-rename-image

v2.0.6

Published

对上传的图片进行重命名

Downloads

14

Readme

picgo-plugin-rename-image

对上传的图片进行重命名

可以很自定义生成文件存储路径的插件,文件(包括路径)名称支持日期、随机字符串、文件 MD5、原文件名、原文件目录结构等规则。

更多需求,欢迎 PR 或提 ISSUE。

配置规则

默认为空,自定义文件路径及文件名,例如:

image/note/{localFolder:2}/{Y}/{m}/{d}/{h}-{i}-{s}-{hash}-{origin}-{rand:6}

上传文件名为 /images/test/localImage.jpg 的文件时,会重命名为

image/note/images/test/2020/07/24/21-40-31-36921a9c364ed4789d4bc684bcb81d62-localImage-fa2c97.jpg

具体的变量含义如下:

  • {Y}:年,4位,例如 2023
  • {y}:年,2位,例如 23
  • {m}:月,2位
  • {d}:日期,2位
  • {h}:小时,2位
  • {i}:分钟,2位
  • {s}:秒,2位
  • {ms}:毫秒,3位(v1.0.4)
  • {timestamp}:时间戳(秒),10位
  • {hash}:文件的 md5 值,32位
  • {origin:<replacement>}:文件原名(会去掉后缀), 会将文件原名中的不合法字符替换为<replacement>,例如空格等等,默认为 -
  • {rand:<count>}:随机字符数,<count> 表示个数,默认为6个,示例:{rand:32}、{rand}
  • {localFolder:<count>}<count>表示层级 ,默认为 1,示例:{localFolder:6}、{localFolder}

可以自己选择变量进行配置,例如只配置 hash,则为: