基本完成26.05

This commit is contained in:
hydrogen committed 2026-05-16 22:32:25 +08:00
1 parent 7a3f8b0e81
commit 2209d74d7e
260 files changed
+25813 -8522

No files matched your search

+2 -1
View File
@@ -116,7 +116,7 @@ export async function use_qpdf() {
}
}
export async function sign_pdf() {
export async function sign_pdf(passphrase?: string) {
const config = JSON.parse(await Deno.readTextFile("config.json"));
for (const cfg of config.settings) {
if (cfg.pdf.signing?.enabled) {
@@ -125,6 +125,7 @@ export async function sign_pdf() {
cfg.playwright.path,
cfg.pdf.signing.key_path,
cfg.pdf.signing.output_path,
passphrase,
);
await signer.sign();
console.log(`Successfully signed PDF: ${cfg.pdf.signing.output_path}`);
+4 -1
View File
@@ -40,7 +40,10 @@ export async function match_sub_command_to_function(
if (options.sign_pdf) {
console.log("Signing PDF...");
await sign_pdf();
// Pass optional passphrase from CLI options (e.g. --sign-passphrase)
const passphrase = options.sign_passphrase ?? options.passphrase ??
undefined;
await sign_pdf(passphrase);
}
break;