mirror of https://github.com/Nofated095/Q2TG.git
fix: patch
This commit is contained in:
parent
8eec3c7340
commit
7b3bf4383c
|
@ -1,72 +0,0 @@
|
|||
diff --git a/utils/emoji-image.js b/utils/emoji-image.js
|
||||
index db5562bac077015e6fec7d974c222ca088900dfe..dc4db3f75b828530107f22620f786a50aa5fd546 100644
|
||||
--- a/utils/emoji-image.js
|
||||
+++ b/utils/emoji-image.js
|
||||
@@ -1,6 +1,6 @@
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
-const loadImageFromUrl = require('./image-load-url')
|
||||
+const loadImageFromUrl = require('./image-load-path')
|
||||
const EmojiDbLib = require('emoji-db')
|
||||
const promiseAllStepN = require('./promise-concurrent')
|
||||
|
||||
diff --git a/utils/index.js b/utils/index.js
|
||||
index 94ee3989f4e1604319ca2bac0634a72a50d6c707..ba5ef66320a9873345f7ec915e2cf8a293fa9417 100644
|
||||
--- a/utils/index.js
|
||||
+++ b/utils/index.js
|
||||
@@ -1,6 +1,6 @@
|
||||
module.exports = {
|
||||
QuoteGenerate: require('./quote-generate'),
|
||||
- loadImageFromUrl: require('./image-load-url'),
|
||||
+ loadImageFromUrl: require('./image-load-path'),
|
||||
loadImageFromPath: require('./image-load-path'),
|
||||
promiseAllStepN: require('./promise-concurrent'),
|
||||
userName: require('./user-name')
|
||||
diff --git a/utils/quote-generate.js b/utils/quote-generate.js
|
||||
index 09fb7c9c2969a7b491e0ea457f2880f87ccf8af0..0d1c6726799688c88512f05cb875280e77f1e88f 100644
|
||||
--- a/utils/quote-generate.js
|
||||
+++ b/utils/quote-generate.js
|
||||
@@ -2,7 +2,7 @@ const fs = require('fs')
|
||||
const { createCanvas, registerFont } = require('canvas')
|
||||
const EmojiDbLib = require('emoji-db')
|
||||
const { loadImage } = require('canvas')
|
||||
-const loadImageFromUrl = require('./image-load-url')
|
||||
+const loadImageFromUrl = require('./image-load-path')
|
||||
const sharp = require('sharp')
|
||||
const Jimp = require('jimp')
|
||||
const smartcrop = require('smartcrop-sharp')
|
||||
@@ -15,7 +15,7 @@ const emojiDb = new EmojiDbLib({ useDefaultDb: true })
|
||||
|
||||
function loadFont () {
|
||||
console.log('font load start')
|
||||
- const fontsDir = 'assets/fonts/'
|
||||
+ const fontsDir = process.env.QUOTLY_FONTS + '/'
|
||||
|
||||
fs.readdir(fontsDir, (_err, files) => {
|
||||
files.forEach((file) => {
|
||||
@@ -405,18 +405,18 @@ class QuoteGenerate {
|
||||
}
|
||||
|
||||
let fontType = ''
|
||||
- let fontName = 'NotoSans'
|
||||
+ let fontName = 'SFPro'
|
||||
let fillStyle = fontColor
|
||||
|
||||
+ if (styledWord.style.includes('monospace')) {
|
||||
+ fontName = 'SFMono'
|
||||
+ fillStyle = '#5887a7'
|
||||
+ }
|
||||
if (styledWord.style.includes('bold')) {
|
||||
- fontType += 'bold '
|
||||
+ fontName += 'Bold'
|
||||
}
|
||||
if (styledWord.style.includes('italic')) {
|
||||
- fontType += 'italic '
|
||||
- }
|
||||
- if (styledWord.style.includes('monospace')) {
|
||||
- fontName = 'SFNSMono'
|
||||
- fillStyle = '#5887a7'
|
||||
+ fontName += 'Italic'
|
||||
}
|
||||
if (styledWord.style.includes('mention')) {
|
||||
fillStyle = '#6ab7ec'
|
|
@ -39,7 +39,7 @@
|
|||
"nodejs-base64": "^2.0.0",
|
||||
"oicq": "https://0w.al/AhKp.tar.gz",
|
||||
"prompts": "^2.4.2",
|
||||
"quote-api": "https://github.com/LyoSU/quote-api/archive/6e27746bb3e946205cb60607a85239747b4640ef.tar.gz",
|
||||
"quote-api": "https://github.com/Clansty/quote-api/archive/8d2a51e512a6d33e8b5948e39c7c9f3d886bc3d6.tar.gz",
|
||||
"sharp": "^0.31.3",
|
||||
"silk-sdk": "^0.2.2",
|
||||
"telegram": "^2.15.2",
|
||||
|
@ -47,8 +47,5 @@
|
|||
},
|
||||
"engines": {
|
||||
"node": "^14.13.1 || >=16.0.0"
|
||||
},
|
||||
"resolutions": {
|
||||
"quote-api@0.12.1": "patch:quote-api@https://github.com/LyoSU/quote-api/archive/6e27746bb3e946205cb60607a85239747b4640ef.tar.gz#.yarn/patches/quote-api-https-d4de2c2dfb"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -249,7 +249,7 @@ cacheEntries = {
|
|||
"needle@npm:2.9.1" = { filename = "needle-npm-2.9.1-f40e591726-746ae3a378.zip"; sha512 = "746ae3a3782f0a057ff304a98843cc6f2009f978a0fad0c3e641a9d46d0b5702bb3e197ba08aecd48678067874a991c4f5fc320c7e51a4c041d9dd3441146cf0"; };
|
||||
"lru-cache@npm:6.0.0" = { filename = "lru-cache-npm-6.0.0-b4c8668fe1-f97f499f89.zip"; sha512 = "f97f499f898f23e4585742138a22f22526254fdba6d75d41a1c2526b3b6cc5747ef59c5612ba7375f42aca4f8461950e925ba08c991ead0651b4918b7c978297"; };
|
||||
"string_decoder@npm:1.3.0" = { filename = "string_decoder-npm-1.3.0-2422117fd0-8417646695.zip"; sha512 = "8417646695a66e73aefc4420eb3b84cc9ffd89572861fe004e6aeb13c7bc00e2f616247505d2dbbef24247c372f70268f594af7126f43548565c68c117bdeb56"; };
|
||||
"quote-api@https://github.com/LyoSU/quote-api/archive/6e27746bb3e946205cb60607a85239747b4640ef.tar.gz" = { filename = "quote-api-https-d4de2c2dfb-87dcc4211f.zip"; sha512 = "87dcc4211fdb911f6ed77d4cb874e6f9afea9f64522932f409f3c238dccd3266ea968c8434b4db5258695b92790256cca3f96d4fa8dfc584bb9aca1ecca315f2"; };
|
||||
"quote-api@https://github.com/Clansty/quote-api/archive/8d2a51e512a6d33e8b5948e39c7c9f3d886bc3d6.tar.gz" = { filename = "quote-api-https-e7bbf7252b-f8500c306f.zip"; sha512 = "f8500c306f1a601e326026d120adfc8933350e0840e8d870703c759689156383e4a0fb98b121333fb5f11160413a055dc88a2dcabf3152f0b1d42f1dcf87012a"; };
|
||||
"color-convert@npm:2.0.1" = { filename = "color-convert-npm-2.0.1-79730e935b-79e6bdb9fd.zip"; sha512 = "79e6bdb9fd479a205c71d89574fccfb22bd9053bd98c6c4d870d65c132e5e904e6034978e55b43d69fcaa7433af2016ee203ce76eeba9cfa554b373e7f7db336"; };
|
||||
"simple-concat@npm:1.0.1" = { filename = "simple-concat-npm-1.0.1-48df70de29-4d211042cc.zip"; sha512 = "4d211042cc3d73a718c21ac6c4e7d7a0363e184be6a5ad25c8a1502e49df6d0a0253979e3d50dbdd3f60ef6c6c58d756b5d66ac1e05cda9cacd2e9fc59e3876a"; };
|
||||
"@cryptography/aes@npm:0.1.1" = { filename = "@cryptography-aes-npm-0.1.1-0bf958ef1c-81a6b93d6d.zip"; sha512 = "81a6b93d6d16413c7dda5f160b845add49bb6df6c314b7260312627fcbb7130b7ed7f51b063de0f712439b0c30b1c3eac56cb78ed180abaab3fd682322b4ed80"; };
|
||||
|
|
|
@ -3346,7 +3346,7 @@ __metadata:
|
|||
nodejs-base64: ^2.0.0
|
||||
oicq: "https://0w.al/AhKp.tar.gz"
|
||||
prompts: ^2.4.2
|
||||
quote-api: "https://github.com/LyoSU/quote-api/archive/6e27746bb3e946205cb60607a85239747b4640ef.tar.gz"
|
||||
quote-api: "https://github.com/Clansty/quote-api/archive/8d2a51e512a6d33e8b5948e39c7c9f3d886bc3d6.tar.gz"
|
||||
sharp: ^0.31.3
|
||||
silk-sdk: ^0.2.2
|
||||
telegram: ^2.15.2
|
||||
|
@ -3375,9 +3375,9 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"quote-api@https://github.com/LyoSU/quote-api/archive/6e27746bb3e946205cb60607a85239747b4640ef.tar.gz":
|
||||
"quote-api@https://github.com/Clansty/quote-api/archive/8d2a51e512a6d33e8b5948e39c7c9f3d886bc3d6.tar.gz":
|
||||
version: 0.12.1
|
||||
resolution: "quote-api@https://github.com/LyoSU/quote-api/archive/6e27746bb3e946205cb60607a85239747b4640ef.tar.gz"
|
||||
resolution: "quote-api@https://github.com/Clansty/quote-api/archive/8d2a51e512a6d33e8b5948e39c7c9f3d886bc3d6.tar.gz"
|
||||
dependencies:
|
||||
canvas: "git+https://github.com/Automattic/node-canvas#198080580a0e3938c48daae357b88a1638a9ddcd"
|
||||
dotenv: ^7.0.0
|
||||
|
@ -3398,7 +3398,7 @@ __metadata:
|
|||
sharp: ^0.30.5
|
||||
smartcrop-sharp: ^2.0.4
|
||||
telegraf: ^3.38.0
|
||||
checksum: 87dcc4211fdb911f6ed77d4cb874e6f9afea9f64522932f409f3c238dccd3266ea968c8434b4db5258695b92790256cca3f96d4fa8dfc584bb9aca1ecca315f2
|
||||
checksum: f8500c306f1a601e326026d120adfc8933350e0840e8d870703c759689156383e4a0fb98b121333fb5f11160413a055dc88a2dcabf3152f0b1d42f1dcf87012a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
|
Loading…
Reference in New Issue