Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
akazukin5151 committed Jul 22, 2020
2 parents bb24977 + c804127 commit 46ca18c
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 4 deletions.
10 changes: 6 additions & 4 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ In other words, the adapter organises code, while the models and view does the a
<li>config *</li>
<li>download</li>
<li>files</li>
<li>picker</li>
<li>utils *</li>
</ul></td>
<td><ul>
<li>config *</li>
<li>picker †</li>
<li>printer</li>
<li>screens</li>
<li>utils</li>
Expand All @@ -53,8 +54,8 @@ In other words, the adapter organises code, while the models and view does the a
<td>Organizes work</td>
<td></td>
<td><ul>
<li>assistants</li>
<li>prompt</li>
<li>assistants</li>
<li>prompt</li>
</ul></td>
<td><ul>
<li>lscat</li>
Expand All @@ -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)
Expand Down
42 changes: 42 additions & 0 deletions MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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) [<actions> ...]
lscat (2|b)
lscat (3|p) [<path>]
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!
Expand Down

0 comments on commit 46ca18c

Please sign in to comment.