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-codeberg-uploader

v1.0.0

Published

picgo uploader for codeberg

Readme

picgo-plugin-codeberg-uploader

PicGo 桌面端的 Codeberg 图床上传插件。

基于 picgo-plugin-gitee-uploader 架构移植,适配 Codeberg 的 Forgejo API。

功能

  • 上传图片到你的 Codeberg 仓库(contents API,POST 创建;重名自动转覆盖更新)
  • 直链格式:https://codeberg.org/{owner}/{repo}/raw/branch/{branch}/{path}/{file}
  • 支持 $customPath 按年 / 年季 / 年月自动分目录
  • GUI 菜单 Sync codeberg:把本地图床记录同步到仓库的 data.json
  • GUI 菜单 Pull codeberg:拉取仓库目录图片清单进本地图床相册
  • 在 PicGo 相册删除图片时,同步删除 Codeberg 远端文件(Forgejo 的 DELETE 需要 sha,插件自动维护)

准备工作

  1. 在 Codeberg 建一个仓库当图床(建议 Public,直链才能免登录访问;Private 仓库的直链需要登录态)
  2. 到 设置 → 应用 → 令牌(Applications → Tokens) 新建一个 token,权限必须包含 repo(读写)

安装

方式一:解压即用(推荐,免联网)

下载 picgo-plugin-codeberg-uploader-v1.0.0.zip,解压后把 picgo-plugin-codeberg-uploader 整个目录(目录名不能改)放进 PicGo 的数据目录:

  • Windows:%APPDATA%\picgo\node_modules\
  • macOS / Linux:~/.config/picgo/node_modules/

重启 PicGo,在「图床设置」里就会出现 Codeberg。

方式二:PicGo 内安装

插件未发布到 npm 时请用方式一。发布后可在 PicGo「设置 → 插件设置」搜索安装。

配置说明

| 配置项 | 说明 | 示例 | |--------|------|------| | repo | 仓库 owner/repo | myname/picbed | | branch | 分支,留空默认 main | main | | token | Codeberg access token(需 repo 读写权限) | | | path | 图片存放目录 | img | | customPath | default / year / yearQuarter / yearMonth,追加时间子目录 | yearMonth → img/2026/11 | | customUrl | 自定义访问域名(有 CDN/镜像时填写,留空用官方 raw 直链) | |

使用

  1. PicGo「设定」→ 上传服务设为 Codeberg
  2. 拖拽 / 剪贴板上传即可
  3. 多设备同步:在相册右键菜单使用 Sync codeberg / Pull codeberg

开发

npm install        # 安装依赖
npm run build      # 编译到 dist/

说明

  • Forgejo API 与 GitHub 不同:创建文件是 POST(GitHub 是 PUT)、删除要带 JSON body(sha+branch)、认证头是 Authorization: token <PAT>。
  • 本插件与 picgo-plugin-gitcode-uploader 可同时安装、互不冲突(uploader 名称分别为 codeberg / gitcode)。
  • License: MIT