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

picgo-plugin-gitlab-files

v1.2.2

Published

Uploader for uploading to gitlab files

Readme

picgo-plugin-gitlab-files

PicGo Gitlab 上传插件

  • 在此版本中使用了 picgo-core v1.5.0, 低于此版本的用户请不要升级,插件无法在低版本正常运行。
  • 新版本没有在 Gitlab < v13.0 上进行充分测试,如果出现问题欢迎及时反馈。

命令行配置方式

  1. 安装 PicGo : npm install -g picgo
  2. 安装本插件 : picgo add gitlab-files
  3. 配置本插件 : picgo config uploader, 选择 gitlab-files-uploader, 按照下文配置
  4. 激活插件 : picgo use
    1. Use an uploader -> gitlab-files-uploader
    2. Use a transformer -> path
    3. Use plugins 至少激活本插件
  5. 使用插件 : picgo upload

配置

由于配置项过多, PicGo GUI 版本在 2.3 以前需要使用 <tab> 键手动切换, 参见 https://github.com/D-W-X/picgo-plugin-gitlab-files/issues/2

PicGo GUI 新版本已经支持滚轮查看配置.

| 名称 | 介绍 | 配置示例 | |----------------------|---------------------------------------------------|----------------------------------------------------------------------------| | gitlab服务器地址 | 服务器地址,建议末尾不带/ | https://gitlab.com | | 项目id | 在项目设置页面查看,后文介绍 | 1254 | | 默认分支 | 注意可能为main,也可以为其他分支 | master | | gitlab的token | 获取方式见后文(PicGo会明文保存) | fw45d1z7sa6rz69KOsxq | | 自托管的Gitlab版本是否低于13.0 | 可选,对于Gitlab版本低于13.0的情况,使用 raw ,否则使用 -/raw | true | | 文件名及其路径 | 可选,文件名和路径,占位符见后文,是否以/开头均可 | /pictures/{year}/{month}/{day}_{hour}_{minute}_{second}_{fileName} | | 上传文件的Message | 可选 | Upload {fileName} By PicGo gitlab files uploader at {year}-{month}-{day} | | 是否同步删除远程对象 | 可选,本地删除文件后是否在Gitlab删除 | false | | 删除文件的Message | 可选 | Delete {fileName} By PicGo gitlab files uploader at {year}-{month}-{day} | | 删除远程图片后是否通知 | 可选,如果开启会有两个通知 | false | | 上传者的邮箱 | 可选,建议不填写,可以不存在,可以不属于自己 | [email protected] | | 上传者的用户名 | 可选,建议不填写,可以不存在,可以不属于自己 | example |

路径 Format

路径配置可使用以下参数,使用示例:/{year}/{month}/{fileName},输出示例:/2020/01/imba97.png

| 名称 | 介绍 | 输出示例 | |--------------|-------------------------|----------------------------------| | year | 当前年份 | 2021 | | month | 当前月份 | 01 | | day | 当前日期 | 14 | | hour | 当前小时 | 15 | | minute | 当前分钟 | 35 | | second | 当前秒数 | 36 | | milliseconds | 当前毫秒数 | 452 | | fileName | 图片名称,如果是多图,message拼接文件名 | imba97 | | ========= | 下列内容不可用于message | ============== | | hash16 | 图片 MD5 16位 | 68559cae1081d683 | | hash32 | 图片 MD5 32位 | 68559cae1081d6836e09b043aa0b3af1 | | ext | 图片后缀名 | png |

注意: 默认会向末尾自动增加文件后缀, ext 后缀用于路径,文件参数等使用

项目id获取示例

在 Gitlab 中打开项目:

此处即为项目ID:

Gitlab Token 获取

注意:Token值会被PicGo明文保存! 下面任何一种方式均可,推荐 项目 Token

项目 Token

  1. 打开 Gitlab 侧栏,选择 设置-访问令牌

  2. 在弹出页面选择:

    • 名称随意设置
    • 如果不设置时间表示不过期
    • 范围仅选择第一项或者仅选择第四项
    • 该方法生成的令牌只有项目访问权限

个人 Token

  1. 点击左上角用户头像,选择设置:

  2. 在打开的窗口选择访问令牌:

    • 名称随意设置
    • 如果不设置时间表示不过期
    • 范围仅选择第一项或者仅选择第五项
    • 该方法生成的令牌访问权限较高,建议妥善保管

致谢

插件编写参考了同款SCP插件的写法,感谢作者!

本项目和已有的Gitlab上传插件完全无关,应该也不会产生冲突! 由于已有插件上传后的文件无法查看,故而编写此插件.