From aaa24f960747afa08169aabad575c153aca61562 Mon Sep 17 00:00:00 2001 From: twenty5151 Date: Wed, 22 Jul 2020 21:06:37 +0800 Subject: [PATCH 1/2] Add user guide for lscat app --- MANUAL.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/MANUAL.md b/MANUAL.md index f37b4818..3c0b3aaa 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -8,6 +8,7 @@ * [Mode f/3 and s/4](#mode-f3-and-s4) * [Mode n/5](#mode-n5) * [Mode r/6](#mode-r6) + * [lscat app](#lscat-app) * [Configuration](#Configuration) * [In general](#in-general) * [Image](#image-configuration) @@ -237,6 +238,47 @@ Options: (-v | --version) Show version number ``` +## lscat app + +1. Configuration assistant: Interactively guides you to setting up your own config. +2. Browse and manage the cache, filter dirs by mode, and view the illustrations/images offline, with similar but reduced functionality +3. Display a specified path. Auto-detects which mode it is, providing that it is a valid dir. +4. Displays the 'testgallery' dir in mode 1, offline. For internal developer use. +5. Displays the 'testuser' dir in mode 3/4, offline. For internal developer use. + +* FYI: KONEKODIR is currently set to be `~/.local/share/koneko/cache`. The parent folder also contains everything else you might want to delete in the even of uninstalling the app +* For developers: simply copy a "page dir" inside a pixiv ID into testgallery (eg, `cp -r ~/.local/share/koneko/cache/123/1 ~/.local/share/koneko/cache/testgallery`) for mode 4 to work; +* ...and a "page dir" inside 'following' (eg, `cp -r ~/.local/share/koneko/cache/following/123/1 ~/.local/share/koneko/cache/testuser`) for mode 5 to work. + + +``` +lscat interactive app + +Usage: + lscat + lscat (1|c) [ ...] + lscat (2|b) + lscat (3|p) [] + lscat (4|g) + lscat (5|u) + +Optional arguments (for specifying a mode): + 1 c Koneko configuration assistance + 2 b Browse a cached dir to display + 3 p Display a specified path + 4 g Display KONEKODIR / testgallery + 5 u Display KONEKODIR / testuser + +Possible configuration assistants: + 1 Thumbnail size + 2 x-padding + 3 y-padding + 4 Page spacing + 5 Gallery print spacing + 6 User mode print info x-position + a All of the above +``` + # Configuration ## It is highly recommended to use the interactive configuration assistant! From c804127edc75961e6be2c43f0cf49a1e11415222 Mon Sep 17 00:00:00 2001 From: twenty5151 Date: Wed, 22 Jul 2020 21:15:34 +0800 Subject: [PATCH 2/2] Improve table in HACKING.md --- HACKING.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/HACKING.md b/HACKING.md index 6a3580b7..918f15b2 100644 --- a/HACKING.md +++ b/HACKING.md @@ -39,10 +39,11 @@ In other words, the adapter organises code, while the models and view does the a
  • config *
  • download
  • files
  • -
  • picker
  • +
  • utils *
    • config *
    • +
    • picker †
    • printer
    • screens
    • utils
    • @@ -53,8 +54,8 @@ In other words, the adapter organises code, while the models and view does the a Organizes work
        -
      • assistants
      • -
      • prompt
      • +
      • assistants †
      • +
      • prompt †
      • lscat
      • @@ -72,7 +73,8 @@ In other words, the adapter organises code, while the models and view does the a The overall code is neither OOP nor functional: the only communication between all modules is through function returns, not through 'notifying' different objects. The only (major?) exception is that `downloads.py` will directly trigger a callback to `lscat.py`. Now, this paints a rosy picture but in reality, there was no initial planning so the code was originally not written towards any structure or pattern. What still needs work is: -* The config contains a functional core, inbound IO, and outbound IO. Better split them up +* The config contains a functional core, inbound IO, and outbound IO. +* †: technically both inbound and outbound, but main purpose is to provide a view for the user and catch user input Here are some good tips: * "The way to figure out the separation is by doing as much as you can without mutation, and then encapsulating the mutation separately" (Gary Bernhardt)