File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040 - 是 | 本子维度合并pdf
4141 - 是 | 章节维度合并pdf
4242
43+ PDF_NAME_RULE :
44+ type : string
45+ description : PDF输出的文件名规则。默认本子维度的为'Atitle',章节维度的为'Atitle_Ptitle'
46+ default : ' '
47+ required : false
48+
4349 ZIP_NAME :
4450 type : string
4551 default : 本子.tar.gz
7884 UPLOAD_NAME : ${{ github.event.inputs.UPLOAD_NAME }}
7985 IMAGE_SUFFIX : ${{ github.event.inputs.IMAGE_SUFFIX }}
8086 PDF_OPTION : ${{ github.event.inputs.PDF_OPTION }}
87+ PDF_NAME_RULE : ${{ github.event.inputs.PDF_NAME_RULE }}
8188
8289 # 登录相关secrets
8390 JM_USERNAME : ${{ secrets.JM_USERNAME }}
Original file line number Diff line number Diff line change @@ -84,11 +84,16 @@ def cover_option_config(option: JmOption):
8484 pdf_option = env ('PDF_OPTION' , None )
8585 if pdf_option and pdf_option != '否' :
8686 call_when = 'after_album' if pdf_option == '是 | 本子维度合并pdf' else 'after_photo'
87+
88+ pdf_name_rule = env ('PDF_NAME_RULE' , None )
89+ if not pdf_name_rule :
90+ pdf_name_rule = 'Atitle' if call_when == 'after_album' else 'Atitle_Ptitle'
91+
8792 plugin = [{
8893 'plugin' : Img2pdfPlugin .plugin_key ,
8994 'kwargs' : {
9095 'pdf_dir' : option .dir_rule .base_dir + '/pdf/' ,
91- 'filename_rule' : call_when [ 6 ]. upper () + 'id' ,
96+ 'filename_rule' : pdf_name_rule ,
9297 'delete_original_file' : True ,
9398 }
9499 }]
You can’t perform that action at this time.
0 commit comments