mirror of
https://github.com/simon987/sist2.git
synced 2025-04-19 18:26:43 +00:00
wip
This commit is contained in:
parent
bc884e137c
commit
be88280161
@ -227,6 +227,7 @@ int scan_args_validate(scan_args_t *args, int argc, const char **argv) {
|
|||||||
LOG_DEBUGF("cli.c", "arg depth=%d", args->depth)
|
LOG_DEBUGF("cli.c", "arg depth=%d", args->depth)
|
||||||
LOG_DEBUGF("cli.c", "arg path=%s", args->path)
|
LOG_DEBUGF("cli.c", "arg path=%s", args->path)
|
||||||
LOG_DEBUGF("cli.c", "arg archive=%s", args->archive)
|
LOG_DEBUGF("cli.c", "arg archive=%s", args->archive)
|
||||||
|
LOG_DEBUGF("cli.c", "arg archive_passphrase=%s", args->archive_passphrase)
|
||||||
LOG_DEBUGF("cli.c", "arg tesseract_lang=%s", args->tesseract_lang)
|
LOG_DEBUGF("cli.c", "arg tesseract_lang=%s", args->tesseract_lang)
|
||||||
LOG_DEBUGF("cli.c", "arg tesseract_path=%s", args->tesseract_path)
|
LOG_DEBUGF("cli.c", "arg tesseract_path=%s", args->tesseract_path)
|
||||||
LOG_DEBUGF("cli.c", "arg exclude=%s", args->exclude_regex)
|
LOG_DEBUGF("cli.c", "arg exclude=%s", args->exclude_regex)
|
||||||
|
@ -18,6 +18,7 @@ typedef struct scan_args {
|
|||||||
char *path;
|
char *path;
|
||||||
char *archive;
|
char *archive;
|
||||||
archive_mode_t archive_mode;
|
archive_mode_t archive_mode;
|
||||||
|
char *archive_passphrase;
|
||||||
char *tesseract_lang;
|
char *tesseract_lang;
|
||||||
const char *tesseract_path;
|
const char *tesseract_path;
|
||||||
char *exclude_regex;
|
char *exclude_regex;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#define EPILOG "Made by simon987 <me@simon987.net>. Released under GPL-3.0"
|
#define EPILOG "Made by simon987 <me@simon987.net>. Released under GPL-3.0"
|
||||||
|
|
||||||
|
|
||||||
static const char *const Version = "2.9.0";
|
static const char *const Version = "2.9.1";
|
||||||
static const char *const usage[] = {
|
static const char *const usage[] = {
|
||||||
"sist2 scan [OPTION]... PATH",
|
"sist2 scan [OPTION]... PATH",
|
||||||
"sist2 index [OPTION]... INDEX",
|
"sist2 index [OPTION]... INDEX",
|
||||||
@ -99,6 +99,7 @@ void initialize_scan_context(scan_args_t *args) {
|
|||||||
ScanCtx.arc_ctx.log = _log;
|
ScanCtx.arc_ctx.log = _log;
|
||||||
ScanCtx.arc_ctx.logf = _logf;
|
ScanCtx.arc_ctx.logf = _logf;
|
||||||
ScanCtx.arc_ctx.parse = (parse_callback_t) parse;
|
ScanCtx.arc_ctx.parse = (parse_callback_t) parse;
|
||||||
|
memset(ScanCtx.arc_ctx.passphrase, 0, sizeof(ScanCtx.arc_ctx.passphrase));
|
||||||
|
|
||||||
// Comic
|
// Comic
|
||||||
ScanCtx.comic_ctx.log = _log;
|
ScanCtx.comic_ctx.log = _log;
|
||||||
@ -439,6 +440,7 @@ int main(int argc, const char *argv[]) {
|
|||||||
OPT_STRING(0, "archive", &scan_args->archive, "Archive file mode (skip|list|shallow|recurse). "
|
OPT_STRING(0, "archive", &scan_args->archive, "Archive file mode (skip|list|shallow|recurse). "
|
||||||
"skip: Don't parse, list: only get file names as text, "
|
"skip: Don't parse, list: only get file names as text, "
|
||||||
"shallow: Don't parse archives inside archives. DEFAULT: recurse"),
|
"shallow: Don't parse archives inside archives. DEFAULT: recurse"),
|
||||||
|
OPT_STRING(0, "archive-passphrase", &scan_args->archive_passphrase, "Passphrase for encrypted archive files"),
|
||||||
OPT_STRING(0, "ocr", &scan_args->tesseract_lang, "Tesseract language (use tesseract --list-langs to see "
|
OPT_STRING(0, "ocr", &scan_args->tesseract_lang, "Tesseract language (use tesseract --list-langs to see "
|
||||||
"which are installed on your machine)"),
|
"which are installed on your machine)"),
|
||||||
OPT_STRING('e', "exclude", &scan_args->exclude_regex, "Files that match this regex will not be scanned"),
|
OPT_STRING('e', "exclude", &scan_args->exclude_regex, "Files that match this regex will not be scanned"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user