diff --git a/README.en.md b/README.en.md index e69de29..c2f2315 100644 --- a/README.en.md +++ b/README.en.md @@ -0,0 +1,125 @@ + +[中文](./README.md) |-> [English](./README.en.md) + + +### 🍴 Fork + +This is a fork of the [picgo-plugin-compress-webp-lossless](https://github.com/mrgeneralgoo/picgo-plugin-compress-webp-lossless) repository, And it is a fork of the [picgo-plugin-compress](https://github.com/JuZiSang/picgo-plugin-compress) repository. + +# ⚗️ Background + +[picgo-plugin-compress](https://github.com/JuZiSang/picgo-plugin-compress) has been a long time not updated, The key is in ` PicGo ` underlying upload library from ` request ` migrated to ` axios `, reference [PicGo/PicGo-Core#65](https://github.com/PicGo/PicGo-Core/issues/65), led to [TinyPng](https://tinypng.com/) is unavailable. Seems to be the last available version is [PicGo v2.3.0](https://github.com/Molunerfinn/PicGo/releases/tag/v2.3.0). + +Fortunately I found [picgo-plugin-compress-webp-lossless](https://github.com/mrgeneralgoo/picgo-plugin-compress-webp-lossless), But its only upload [v1.0.1](https://www.npmjs.com/package/picgo-plugin-compress-webp-lossless). Its implementation is still through older versions of [picgo-plugin-compress](https://github.com/JuZiSang/picgo-plugin-compress). However, the code updates the ` v1.1.0 `, but after refactoring with 'ES' it is not compatible with 'PicGo', and there are still some problems. + +So there is ***`picgo-plugin-compress-next`*** birth 🎉 + +# 💥 comparison + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
compress-nextcompress
TinyPngversion >= 2.3.1Highest version 2.3.0
+ Multiple keys are used in combination
+ Use commas to separate and automatically clear whitespace +
+ Multiple keys are used in combination
+ Strictly use commas, no whitespace +
+ TinyPngWeb is deprecated
+ Throws an exception and prompts you to configure the Key +
+ TinyPngWeb is unavailable
+ Throwing a blank exception can only view logs
+ Page returns 404 or 413 +
+ automatically skips when an invalid Key appears
+ Tags are no longer accessed unless manually refreshed +
+ An invalid Key occurs, throwing a blank exception
+ View log, page return 404 +
+ Manual refresh Valid Key
+ Supports manual refreshing of all keys
+ You can set whether the Key is automatically refreshed across months +
+ If the valid Key reaches the number of times used, no access
+ The configuration file can be reset only after it is deleted +
+ + +# 🎉 Function + +- [x] Multiple keys can be used in combination +- [x] supports TinyPng compression for `PicGo >= v2.3.1` +- [x] disables `TinyPngWeb` and throws an exception +- [ ] Handle error `Key` and skip (under test) +- [ ] Handling refresh of `Key` (under test) + + +# Reporting Issues + +[You can click here directly to create an issue](https://github.com/supine0703/picgo-plugin-compress-next/issues/new) + + + + diff --git a/README.md b/README.md index 626bc67..b39bb2d 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,107 @@ -# Picgo Plugin Compress Webp Lossless -This is a fork of the [picgo-plugin-compress](https://github.com/JuZiSang/picgo-plugin-compress) repository. +[中文](./README.md) <-| [English](./README.en.md) -The original project has been inactive for quite some time. It's intended to provide continued maintenance and support. -This project is a plugin for [PicGo](https://github.com/Molunerfinn/PicGo) and [PicGo-Core](https://github.com/PicGo/PicGo-Core), enabling image compression using the remote service provided by [TinyPNG](https://tinypng.com/) or local compression using [imagemin](https://github.com/imagemin/imagemin). +### 🍴 分支 -Additionally, it supports lossless converting images to the WebP format. +这是 [picgo-plugin-compress-webp-lossless](https://github.com/mrgeneralgoo/picgo-plugin-compress-webp-lossless) 的一个分支,同时它又是 [picgo-plugin-compress](https://github.com/JuZiSang/picgo-plugin-compress) 的分支 -Several enhancements and updates have been implemented in this fork: -- **Dependency Upgrades**: The project dependencies have been updated to their latest versions, ensuring better compression efficiency. -- **Syntax Upgrade**: The codebase has been migrated to use ES modules, providing better compatibility with modern JavaScript ecosystems. -- **Lossless Compression**: Local image compression has been improved to offer lossless compression, resulting in better compression quality. +# ⚗️ 背景 -Feel free to contribute to this project or report any issues you encounter. Your feedback and contributions are greatly appreciated! +[picgo-plugin-compress](https://github.com/JuZiSang/picgo-plugin-compress) 已经许久没有更新了,关键是在 `PicGo` 底层上传库从 `request` 迁移至 `axios` ,参考 [PicGo/PicGo-Core#65](https://github.com/PicGo/PicGo-Core/issues/65) ,导致 [TinyPng](https://tinypng.com/) 不可用。似乎最后一个可用版本是[PicGo v2.3.0](https://github.com/Molunerfinn/PicGo/releases/tag/v2.3.0)。 -# Reporting Issues +幸运的是我发现了 [picgo-plugin-compress-webp-lossless](https://github.com/mrgeneralgoo/picgo-plugin-compress-webp-lossless) ,但是其只上传了 [v1.0.1](https://www.npmjs.com/package/picgo-plugin-compress-webp-lossless) ,其实现仍然是 [picgo-plugin-compress](https://github.com/JuZiSang/picgo-plugin-compress) 的旧实现,但是其代码更新到了 `v1.1.0` ,可惜的是使用 `ES` 重构后无法兼容 `PicGo` ,并且仍旧存在些许问题。 + +于是便有了 ***`picgo-plugin-compress-next`*** 的诞生 🎉 + +# 💥 对比 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
compress-nextcompress
TinyPngversion >= 2.3.1最高 version 2.3.0
+ 多个 Key 叠加使用
+ 使用逗号分隔,自动清除空白符 +
+ 多个 Key 叠加使用
+ 严格使用逗号,不可有空白符 +
+ TinyPngWeb 已弃用
+ 抛出异常并提示配置 Key +
+ TinyPngWeb 已不可用
+ 抛出空白异常 只能查看日志
+ 网页返回 404 或则 413 +
+ 出现无效 Key,自动跳过
+ 标记并不再访问,除非手动刷新 +
+ 出现无效 Key,抛出空白异常
+ 查看日志,网页返回 404 +
+ 支持手动刷新有效 Key
+ 支持手动刷新所有 Key
+ 可设置是否跨月份自动刷新 Key +
+ 若有效 Key 达到使用次数,则不在访问
+ 需要删除相应配置文件,才可重置 +
+ + +# 🎉 功能 +- [x] 支持多个 `Key` 叠加使用 +- [x] 支持 `PicGo >= v2.3.1` 的 `TinyPng` 压缩 +- [x] 禁用 `TinyPngWeb` 并抛出异常 +- [ ] 对错误的 `Key` 处理并跳过(测试中) +- [ ] 处理 `Key` 的刷新问题(测试中) + +# 报告问题 + +[你可以直接点击这里创建一个问题](https://github.com/supine0703/picgo-plugin-compress-next/issues/new) -[You can click here directly to create an issue](https://github.com/supine0703/picgo-plugin-compress-next/issues/new) \ No newline at end of file diff --git a/package.json b/package.json index 51c6e3a..51ff03c 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,9 @@ "keywords": [ "picgo", "picgo-plugin", - "picgo-gui-plugin" + "picgo-gui-plugin", + "compress", + "compress-next" ], "devDependencies": { "@types/crypto-js": "^4.2.2",