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

sb3png

v1.2.0

Published

Command-line tool to convert Scratch 3.0 projects (.sb3) to PNG screenshots

Readme

sb3png

將 Scratch 3.0 專案檔案 (.sb3) 自動截圖為 PNG 圖片的命令列工具。

安裝

全域安裝

npm install -g sb3png

本地開發

cd sb3png
npm install
npm link

使用方式

sb3png <input.sb3> [output.png] [--time <seconds>]

參數說明

  • input.sb3 - 必要,輸入的 Scratch 專案檔案
  • output.png - 選用,輸出的 PNG 檔名(預設使用輸入檔名)
  • --time <seconds> - 選用,設定執行幾秒後擷圖(預設 5 秒)

範例

# 自動使用輸入檔名作為輸出(test.sb3 → test.png)
sb3png test.sb3

# 指定輸出檔名
sb3png project.sb3 screenshot.png

# 設定等待 10 秒後擷圖
sb3png test.sb3 --time 10

# 指定檔名並設定時間
sb3png project.sb3 output.png --time 3

# 處理包含特殊字符的檔名
sb3png "我的專案(1).sb3"  # 輸出為:我的專案(1).png

# 查看說明
sb3png -h
sb3png --help

功能特色

  • 無需外部伺服器 - 內建 Express 伺服器,自動啟動和關閉
  • 🚀 簡單易用 - 單一指令即可完成截圖
  • 🎯 自動執行 - 自動點擊綠旗並等待專案執行
  • ⏱️ 可調整時間 - 支援自訂等待時間(--time 參數)
  • 📝 智慧檔名 - 自動使用輸入檔名作為輸出
  • 🔧 智慧埠號 - 自動選擇可用的埠號
  • 📁 支援特殊字符 - 正確處理中文和特殊字符檔名
  • 🧹 自動清理 - 執行完畢自動清理臨時檔案

工作原理

  1. 內建伺服器自動啟動於可用埠號
  2. 使用 Puppeteer 開啟無頭瀏覽器
  3. 載入 Scratch VM 執行專案
  4. 自動執行綠旗開始專案
  5. 等待執行穩定後擷取舞台畫面
  6. 儲存為 PNG 圖片
  7. 自動關閉伺服器和清理檔案

系統需求

  • Node.js >= 14.0.0
  • 支援 Puppeteer 的作業系統

授權

MIT

問題回報

https://github.com/marty5499/scratch-judge/issues