From 59607dcfafd765ae850d2f9fac6df2873f5eac0b Mon Sep 17 00:00:00 2001 From: cdhigh Date: Sun, 24 Nov 2024 09:48:17 -0300 Subject: [PATCH] add cover option --- application/back_end/db_models.py | 2 +- application/static/base.js | 1 + application/templates/adv_uploadcover.html | 27 +++++---- application/translations/messages.pot | 50 +++++++++------- .../tr_TR/LC_MESSAGES/messages.mo | Bin 30912 -> 30926 bytes .../tr_TR/LC_MESSAGES/messages.po | 54 ++++++++++-------- .../translations/zh/LC_MESSAGES/messages.mo | Bin 29079 -> 29101 bytes .../translations/zh/LC_MESSAGES/messages.po | 54 ++++++++++-------- application/view/adv.py | 7 ++- application/work/worker.py | 4 ++ 10 files changed, 119 insertions(+), 80 deletions(-) diff --git a/application/back_end/db_models.py b/application/back_end/db_models.py index dfc79772..51af8b1f 100644 --- a/application/back_end/db_models.py +++ b/application/back_end/db_models.py @@ -35,7 +35,7 @@ class KeUser(MyBaseModel): # kindleEar User book_config = JSONField(default=JSONField.dict_default) share_links = JSONField(default=JSONField.dict_default) #evernote/wiz/pocket/instapaper包含子字典,微博/facebook/twitter等仅包含0/1 - covers = JSONField(default=JSONField.dict_default) #保存封面图片数据库ID {'order':,'cover0':,...'cover6':} + covers = JSONField(default=JSONField.dict_default) #保存封面图片数据库ID {'enable':,'order':,'cover0':,...'cover6':} send_mail_service = JSONField(default=JSONField.dict_default) #{'service':,...} custom = JSONField(default=JSONField.dict_default) #留着扩展,避免后续一些小特性还需要升级数据表结构 diff --git a/application/static/base.js b/application/static/base.js index 3ea3e078..2da5e838 100644 --- a/application/static/base.js +++ b/application/static/base.js @@ -1310,6 +1310,7 @@ function SetCoverToDefaultImg(idx) { function startUploadCoversToServer(url) { var totalSize = 0; var fileDatas = new FormData(); + fileDatas.append('enable', $('#enableCover').val()); fileDatas.append('order', $('#coverOrder').val()); for (var idx = 0; idx < 7; idx++) { var coverName = 'cover' + idx; diff --git a/application/templates/adv_uploadcover.html b/application/templates/adv_uploadcover.html index 66fd6cdf..907031dc 100644 --- a/application/templates/adv_uploadcover.html +++ b/application/templates/adv_uploadcover.html @@ -4,21 +4,28 @@ {% endblock -%} {% block advcontent -%} -
+
{{_("Upload cover image")}} -

{{_("Upload cover images from local with an aspect ratio of approximately 0.65.")}}

+

{{_("Upload cover images from local with an aspect ratio of approximately 0.625.")}}

+
+ + +
+
+ + +
+
-
- - -
-
    {% for idx in range(7) -%} diff --git a/application/translations/messages.pot b/application/translations/messages.pot index 4ee3942b..4bbe525e 100644 --- a/application/translations/messages.pot +++ b/application/translations/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2024-11-23 21:29-0300\n" +"POT-Creation-Date: 2024-11-24 09:32-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -383,6 +383,7 @@ msgid "" msgstr "" #: application/templates/adv_inboundmail.html:16 +#: application/templates/adv_uploadcover.html:15 #: application/templates/book_summarizer.html:19 #: application/templates/book_translator.html:22 msgid "Disable" @@ -465,23 +466,35 @@ msgid "Upload cover image" msgstr "" #: application/templates/adv_uploadcover.html:10 -msgid "Upload cover images from local with an aspect ratio of approximately 0.65." +msgid "" +"Upload cover images from local with an aspect ratio of approximately " +"0.625." msgstr "" -#: application/templates/adv_uploadcover.html:15 -msgid "Rule to pick cover images" +#: application/templates/adv_uploadcover.html:13 +msgid "Include cover" +msgstr "" + +#: application/templates/adv_uploadcover.html:16 +#: application/templates/book_summarizer.html:18 +#: application/templates/book_translator.html:21 +msgid "Enable" msgstr "" -#: application/templates/adv_uploadcover.html:17 +#: application/templates/adv_uploadcover.html:20 +msgid "Rule for cover" +msgstr "" + +#: application/templates/adv_uploadcover.html:22 msgid "Random" msgstr "" -#: application/templates/adv_uploadcover.html:18 +#: application/templates/adv_uploadcover.html:23 #: application/templates/base.html:127 msgid "Weekday" msgstr "" -#: application/templates/adv_uploadcover.html:42 +#: application/templates/adv_uploadcover.html:49 msgid "Upload/Update" msgstr "" @@ -1150,11 +1163,6 @@ msgstr "" msgid "Your browser does not support the audio element." msgstr "" -#: application/templates/book_summarizer.html:18 -#: application/templates/book_translator.html:21 -msgid "Enable" -msgstr "" - #: application/templates/book_summarizer.html:29 msgid "Model" msgstr "" @@ -1688,8 +1696,8 @@ msgstr "" msgid "Word" msgstr "" -#: application/view/admin.py:48 application/view/adv.py:434 -#: application/view/adv.py:486 application/view/settings.py:66 +#: application/view/admin.py:48 application/view/adv.py:437 +#: application/view/adv.py:489 application/view/settings.py:66 #: application/view/translator.py:87 application/view/translator.py:171 #: application/view/translator.py:253 msgid "Settings Saved!" @@ -1803,34 +1811,34 @@ msgstr "" msgid "Append qrcode of url to article" msgstr "" -#: application/view/adv.py:378 application/view/share.py:54 +#: application/view/adv.py:381 application/view/share.py:54 #: application/view/subscribe.py:250 msgid "Unknown command: {}" msgstr "" -#: application/view/adv.py:436 application/view/adv.py:488 +#: application/view/adv.py:439 application/view/adv.py:491 msgid "The format is invalid." msgstr "" -#: application/view/adv.py:520 +#: application/view/adv.py:523 msgid "Authorization Error!
    {}" msgstr "" -#: application/view/adv.py:541 +#: application/view/adv.py:544 msgid "Success authorized by Pocket!" msgstr "" -#: application/view/adv.py:547 +#: application/view/adv.py:550 msgid "" "Failed to request authorization of Pocket!
    See details " "below:

    {}" msgstr "" -#: application/view/adv.py:568 +#: application/view/adv.py:571 msgid "The Instapaper service encountered an error. Please try again later." msgstr "" -#: application/view/adv.py:581 +#: application/view/adv.py:584 msgid "Request type [{}] unsupported" msgstr "" diff --git a/application/translations/tr_TR/LC_MESSAGES/messages.mo b/application/translations/tr_TR/LC_MESSAGES/messages.mo index a554048eee81499017d53ca9312fb0f379251c9a..b89746d934155dbca7bd8bd30ee5c32e9926a5e4 100644 GIT binary patch delta 8103 zcmYM&33OM*y}K%_n1n~LIvzs+$9o&TWJBS8&3~$1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p-a z@k$>g3pg9gV};2sg#E8f!M$ySm9PUkQ5W9o6{**X^0oa%NX!QQSfe!pG`r^k}5if=3--Y(nsd0o^=mOfH z8S07#)Cb*yLD(24qYGMw*Y5us3Mn*fL?hdV)o>3wz`N)Ij-jdjC#K`)=tSS+UQC`A zFK|CrrTz}u{{;5LQ#cTFr^o*gnLVBSdx|&G@G$PhUt#+h{G|f7@kc)9J;e7M2V!+R zjz(|}jrbxOz)$GHtIUi8$wcdoLcJyWUWZ`Uncd^m^`gN6MxdvEBG$x(Xv$v*zKjmA z89kJ5pnJThtZu_O)ymcvoT^xJ+NA6U$BmqjJ#x~F(ka>FCJrA{I<@SHHsjOFu5|sN zLZvp@#jS5F?of8PN3V>soFT0$*PK#1b=<`JOQ(!`U|jap(gPbOmS#^V8!)2iy0Upw HZm;;ikZz`o diff --git a/application/translations/tr_TR/LC_MESSAGES/messages.po b/application/translations/tr_TR/LC_MESSAGES/messages.po index eb73df84..95b3587d 100644 --- a/application/translations/tr_TR/LC_MESSAGES/messages.po +++ b/application/translations/tr_TR/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2024-11-23 21:29-0300\n" +"POT-Creation-Date: 2024-11-24 09:32-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: tr_TR\n" @@ -386,6 +386,7 @@ msgstr "" "yapılandırmanız gerekmektedir." #: application/templates/adv_inboundmail.html:16 +#: application/templates/adv_uploadcover.html:15 #: application/templates/book_summarizer.html:19 #: application/templates/book_translator.html:22 msgid "Disable" @@ -470,25 +471,37 @@ msgid "Upload cover image" msgstr "Kapak resmi yükle" #: application/templates/adv_uploadcover.html:10 -msgid "Upload cover images from local with an aspect ratio of approximately 0.65." +msgid "" +"Upload cover images from local with an aspect ratio of approximately " +"0.625." msgstr "" -"Yaklaşık 0.65 en boy oranına sahip kapak resimlerini yerel olarak " +"Yaklaşık 0.625 en boy oranına sahip kapak resimlerini yerel olarak " "yükleyin." -#: application/templates/adv_uploadcover.html:15 -msgid "Rule to pick cover images" -msgstr "Kapak resimlerini seçme kuralı" +#: application/templates/adv_uploadcover.html:13 +msgid "Include cover" +msgstr "Kapak Dahil" + +#: application/templates/adv_uploadcover.html:16 +#: application/templates/book_summarizer.html:18 +#: application/templates/book_translator.html:21 +msgid "Enable" +msgstr "Etkinleştir" + +#: application/templates/adv_uploadcover.html:20 +msgid "Rule for cover" +msgstr "Kapak Kuralı" -#: application/templates/adv_uploadcover.html:17 +#: application/templates/adv_uploadcover.html:22 msgid "Random" msgstr "Rastgele" -#: application/templates/adv_uploadcover.html:18 +#: application/templates/adv_uploadcover.html:23 #: application/templates/base.html:127 msgid "Weekday" msgstr "Hafta içi gün" -#: application/templates/adv_uploadcover.html:42 +#: application/templates/adv_uploadcover.html:49 msgid "Upload/Update" msgstr "Yükle/Güncelle" @@ -1168,11 +1181,6 @@ msgstr "Metin" msgid "Your browser does not support the audio element." msgstr "Tarayıcınız ses öğesini desteklemiyor." -#: application/templates/book_summarizer.html:18 -#: application/templates/book_translator.html:21 -msgid "Enable" -msgstr "Etkinleştir" - #: application/templates/book_summarizer.html:29 msgid "Model" msgstr "Model" @@ -1722,8 +1730,8 @@ msgstr "Ek olarak ilet" msgid "Word" msgstr "Kelime" -#: application/view/admin.py:48 application/view/adv.py:434 -#: application/view/adv.py:486 application/view/settings.py:66 +#: application/view/admin.py:48 application/view/adv.py:437 +#: application/view/adv.py:489 application/view/settings.py:66 #: application/view/translator.py:87 application/view/translator.py:171 #: application/view/translator.py:253 msgid "Settings Saved!" @@ -1837,24 +1845,24 @@ msgstr "Tarayıcıda aç" msgid "Append qrcode of url to article" msgstr "Makaleye URL'nin QR kodunu ekle" -#: application/view/adv.py:378 application/view/share.py:54 +#: application/view/adv.py:381 application/view/share.py:54 #: application/view/subscribe.py:250 msgid "Unknown command: {}" msgstr "Bilinmeyen komut: {}" -#: application/view/adv.py:436 application/view/adv.py:488 +#: application/view/adv.py:439 application/view/adv.py:491 msgid "The format is invalid." msgstr "Format geçersiz." -#: application/view/adv.py:520 +#: application/view/adv.py:523 msgid "Authorization Error!
    {}" msgstr "Yetkilendirme Hatası!
    {}" -#: application/view/adv.py:541 +#: application/view/adv.py:544 msgid "Success authorized by Pocket!" msgstr "Pocket tarafından yetkilendirilen başarı!" -#: application/view/adv.py:547 +#: application/view/adv.py:550 msgid "" "Failed to request authorization of Pocket!
    See details " "below:

    {}" @@ -1862,13 +1870,13 @@ msgstr "" "Pocket yetkilendirme isteği başarısız oldu!
    Aşağıdaki ayrıntılara " "bakın:

    {}" -#: application/view/adv.py:568 +#: application/view/adv.py:571 msgid "The Instapaper service encountered an error. Please try again later." msgstr "" "Instapaper servisi bir hata ile karşılaştı. Lütfen daha sonra tekrar " "deneyin." -#: application/view/adv.py:581 +#: application/view/adv.py:584 msgid "Request type [{}] unsupported" msgstr "İstek türü [{}] desteklenmiyor" diff --git a/application/translations/zh/LC_MESSAGES/messages.mo b/application/translations/zh/LC_MESSAGES/messages.mo index 721eebcf3226f83472a9709ed2e9d44592634689..63f543789aec280ecbef7ccc9f7b7dab0a983a51 100644 GIT binary patch delta 8071 zcmYM&37pS$9>?*YF}FF)Fpgmi;}~X)VMgQ5l}Y3-R~aHlazx`O*VU9)G`Q9W8 z%)m%G{sE)#P1J;|uoiAW4SWcdz;UdIr?3*9K_yy@YIhX_@H)m|8ETx0b=|m$7|Q%! zvIUx>25yb~cpdpG6-OX_y*JJ6sCI>@1kd1ucmdNezMkhb!tR)ald(E3#Yo(WN@PEV zF~9dEg>bxtfp|?1@H(d8EmX()jHZ>fK&`kfs(m(U$9kd?8j4kMB&y#G)OdNQev6PH zy;bO|!$Ar<_G9K*zm2H3XB)=han!;tp%N%X zwg1)XL2OR~^%$RmGDErf%H0tbgQLoe6s021)AKZ%-F|aZB07J1R?!;g` zZl1yr>R&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9g zZiRY22=ztGvicO%2Bw<}P)GQl)xR+Jq2k}8#<}5BP{-S-6?%i*g9udWDw>s1JC8?Y zq9v+dd(=R^%mMa%nAOLdubOY5j`l6oe10wk4Y(Ecm!y2uYj+ma&>QR~h(t{oW7a|~ zu(3UFhEGzD8ZX1_hw3-XoM=u*7VdisC@3XMUBKIh8t6-_e~VhkacqUZSiJfW_u3|- zcG4f!ZagYev#~6$x90`+{1`SRehH)X{>QxJ{yo|hV|dUXwV-U&`@S6Yx2}Vzh22F> z7&z4ZU{}C~)El7Mk3_Z4MYTJG8uuL5#|Nl|CJ*ED&ir0$3UN5g+<xA7l~x-yK{{%n zOw{{79W~*X7C(u_sQ-b1_;1u%dn28}W<@MTxVqI-tloSi`PZ4YC7>P8$4;1sMe!DD z=XX#82aIwPg`w(Es0AdNH7%ZGK8@N~8w|r?SQ=kLEqLZA@~;8rSzsY*rOU7xu0iei zEb1)p;j>tJwEO=c+M*UX0QHF;he0?EHNia8c#Bc}bFIGBp6B}(*n=AA5GwU&FbMx; zJ~o5KxOfG#8ft?2s0p4$ZK$)wyP?L-#H~0MwXm46ZX7>>f;yz2j-nx^;cHk6^HCYN zg#4w&dyJXbbDaA^eu34fKg2m0Ki;K$6NXSfjAif)mc&A<|B5W!_a0CP=0U*AZl&R< zhVf=?)Xo~9&aMqAGa2Rp)Q(1*6H)zNxB5&}`+4Z4#I_zZh5vRKH+E7M_THXcB`bLQ zx;keA%T5{>JATBFQL#hDO&&TScEp%L!-r1XKBxZ3(CxQdohV+Ser#&W)2U6jA8mU$ rWc!Cb4+n-9=I$<>ne)q6d#)_qcr~w}upnpq#LS\n" "Language: zh\n" @@ -384,6 +384,7 @@ msgid "" msgstr "为了使能入站邮件功能,还需要配置白名单列表。" #: application/templates/adv_inboundmail.html:16 +#: application/templates/adv_uploadcover.html:15 #: application/templates/book_summarizer.html:19 #: application/templates/book_translator.html:22 msgid "Disable" @@ -466,23 +467,35 @@ msgid "Upload cover image" msgstr "上传封面图像" #: application/templates/adv_uploadcover.html:10 -msgid "Upload cover images from local with an aspect ratio of approximately 0.65." -msgstr "从本机上传封面图像,建议宽高比为0.65左右。" +msgid "" +"Upload cover images from local with an aspect ratio of approximately " +"0.625." +msgstr "从本机上传封面图像,建议宽高比为0.625左右。" -#: application/templates/adv_uploadcover.html:15 -msgid "Rule to pick cover images" -msgstr "封面图像使用顺序" +#: application/templates/adv_uploadcover.html:13 +msgid "Include cover" +msgstr "推送封面" + +#: application/templates/adv_uploadcover.html:16 +#: application/templates/book_summarizer.html:18 +#: application/templates/book_translator.html:21 +msgid "Enable" +msgstr "启用" + +#: application/templates/adv_uploadcover.html:20 +msgid "Rule for cover" +msgstr "封面规则" -#: application/templates/adv_uploadcover.html:17 +#: application/templates/adv_uploadcover.html:22 msgid "Random" msgstr "随机" -#: application/templates/adv_uploadcover.html:18 +#: application/templates/adv_uploadcover.html:23 #: application/templates/base.html:127 msgid "Weekday" msgstr "周内日" -#: application/templates/adv_uploadcover.html:42 +#: application/templates/adv_uploadcover.html:49 msgid "Upload/Update" msgstr "上传/更新" @@ -1151,11 +1164,6 @@ msgstr "原文" msgid "Your browser does not support the audio element." msgstr "您的浏览器不支持audio标签。" -#: application/templates/book_summarizer.html:18 -#: application/templates/book_translator.html:21 -msgid "Enable" -msgstr "启用" - #: application/templates/book_summarizer.html:29 msgid "Model" msgstr "Model" @@ -1691,8 +1699,8 @@ msgstr "作为附件转发" msgid "Word" msgstr "单词" -#: application/view/admin.py:48 application/view/adv.py:434 -#: application/view/adv.py:486 application/view/settings.py:66 +#: application/view/admin.py:48 application/view/adv.py:437 +#: application/view/adv.py:489 application/view/settings.py:66 #: application/view/translator.py:87 application/view/translator.py:171 #: application/view/translator.py:253 msgid "Settings Saved!" @@ -1806,34 +1814,34 @@ msgstr "在浏览器打开" msgid "Append qrcode of url to article" msgstr "在每篇文章后附加文章链接的二维码" -#: application/view/adv.py:378 application/view/share.py:54 +#: application/view/adv.py:381 application/view/share.py:54 #: application/view/subscribe.py:250 msgid "Unknown command: {}" msgstr "未知命令:{}" -#: application/view/adv.py:436 application/view/adv.py:488 +#: application/view/adv.py:439 application/view/adv.py:491 msgid "The format is invalid." msgstr "格式非法。" -#: application/view/adv.py:520 +#: application/view/adv.py:523 msgid "Authorization Error!
    {}" msgstr "申请授权过程失败!
    {}" -#: application/view/adv.py:541 +#: application/view/adv.py:544 msgid "Success authorized by Pocket!" msgstr "已经成功获得Pocket的授权!" -#: application/view/adv.py:547 +#: application/view/adv.py:550 msgid "" "Failed to request authorization of Pocket!
    See details " "below:

    {}" msgstr "申请Pocket授权失败!
    错误信息参考如下:

    {}" -#: application/view/adv.py:568 +#: application/view/adv.py:571 msgid "The Instapaper service encountered an error. Please try again later." msgstr "Instapaper服务器异常,请稍候再试。" -#: application/view/adv.py:581 +#: application/view/adv.py:584 msgid "Request type [{}] unsupported" msgstr "不支持你请求的命令类型 [{}]" diff --git a/application/view/adv.py b/application/view/adv.py index 517d0933..7b5f97b1 100644 --- a/application/view/adv.py +++ b/application/view/adv.py @@ -277,6 +277,7 @@ def AdvUploadCoverImage(user: KeUser): covers = {} jsonCovers = '' if user: + covers['enable'] = user.covers.get('enable', '') covers['order'] = user.covers.get('order', 'random') for idx in range(7): coverName = f'cover{idx}' @@ -292,11 +293,13 @@ def AdvUploadCoverAjaxPost(user: KeUser): MAX_WIDTH = 832 MAX_HEIGHT = 1280 ret = {'status': 'ok'} + form = request.form covers = user.covers - covers['order'] = request.form.get('order', 'random') + covers['enable'] = form.get('enable', '') + covers['order'] = form.get('order', 'random') for idx in range(7): coverName = f'cover{idx}' - upload = request.files.get(coverName) or request.form.get(coverName) + upload = request.files.get(coverName) or form.get(coverName) if not upload: continue diff --git a/application/work/worker.py b/application/work/worker.py index aeae3ab2..590160f7 100644 --- a/application/work/worker.py +++ b/application/work/worker.py @@ -98,6 +98,10 @@ def WorkerImpl(userName: str, recipeId: Union[list,str,None]=None, reason='cron' ro.translator = bked.translator.copy() #设置网页翻译器信息 ro.tts = bked.tts.copy() #文本转语音设置,需要中途修改tts内容 ro.summarizer = bked.summarizer.copy() #AI摘要器的配置信息 + + #如果书籍没有设置封面,则使用用户全局设置 + if ro.cover_url is None and not user.covers.get('enable', ''): + ro.cover_url = False #如果需要登录网站 if ro.needs_subscription: