From a17e8705de62c0e800d4024c2d90befd88f6b700 Mon Sep 17 00:00:00 2001 From: lifegpc Date: Fri, 8 Mar 2024 13:56:02 +0800 Subject: [PATCH] Update --- main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.py b/main.py index 1a3b4d7..d723b53 100644 --- a/main.py +++ b/main.py @@ -13,12 +13,18 @@ parser.add_argument('--cwmdb', help='The path to NovelCiwei file.') parser.add_argument('-b', '--booksnew', help='The path to booksnew directory or zip file.') # noqa: E501 parser.add_argument('-C', '--cid', '--chapter-id', help='The chapter id.', type=int) # noqa: E501 parser.add_argument('--ect', '--export-chapter-template', help='The template of the exported chapter. Available key: , eta.') # noqa: E501 +parser.add_argument('-r', '--real', help='Use default locations. Needed running on Android machine. Root is required.', action='store_true') # noqa: E501 parser.add_argument('action', help='The action to do.', choices=['importkey', 'exportchapter']) # noqa: E501 def main(args=None): arg = parser.parse_intermixed_args(args) cfg = Config(arg.config) + if arg.real: + base_dir = '/data/data/com.kuangxiangciweimao.novel/' + arg.cwmdb = f'{base_dir}/databases/novelCiwei' + arg.key = f'{base_dir}/files/Y2hlcy8' + arg.booksnew = f'{base_dir}/files/novelCiwei/reader/booksnew' cfg.add_args(arg) try: db = CwmDb(cfg.db)