Skip to content

Commit

Permalink
Update external reader doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Difegue committed Oct 9, 2023
1 parent 1d97438 commit 93516c0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
20 changes: 10 additions & 10 deletions lib/LANraragi/Model/Tankoubon.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ use Mojo::JSON qw(decode_json encode_json);
use List::Util qw(min);

use LANraragi::Utils::Database qw(redis_encode redis_decode invalidate_cache get_archive_json_multi get_tankoubons_by_file);
use LANraragi::Utils::Generic qw(array_difference);
use LANraragi::Utils::Logging qw(get_logger);
use LANraragi::Utils::Generic qw(array_difference);
use LANraragi::Utils::Logging qw(get_logger);

# get_tankoubon_list(page)
# Returns a list of all the Tankoubon objects.
sub get_tankoubon_list($page=0) {
sub get_tankoubon_list ( $page = 0 ) {

my $redis = LANraragi::Model::Config->get_redis;
my $redis = LANraragi::Model::Config->get_redis;
my $logger = get_logger( "Tankoubon", "lanraragi" );

$page //= 0;

# Tankoubons are represented by RG_[timestamp] in DB. Can't wait for 2038!
# Tankoubons are represented by TANK_[timestamp] in DB. Can't wait for 2038!
my @tanks = $redis->keys('TANK_??????????');

# Jam tanks into an array of hashes
Expand Down Expand Up @@ -77,7 +77,7 @@ sub create_tankoubon ( $name, $tank_id ) {

# Get name
my @old_name = $redis->zrangebyscore( $tank_id, 0, 0, qw{LIMIT 0 1} );
my $n = redis_decode( $old_name[0] );
my $n = redis_decode( $old_name[0] );

$redis->zrem( $tank_id, $n );
}
Expand Down Expand Up @@ -159,10 +159,10 @@ sub get_tankoubon ( $tank_id, $fulldata = 0, $page = 0 ) {
# delete_tankoubon(tankoubonid)
# Deletes the Tankoubon with the given ID.
# Returns 0 if the given ID isn't a Tankoubon ID, 1 otherwise
sub delete_tankoubon($tank_id) {
sub delete_tankoubon ($tank_id) {

my $logger = get_logger( "Tankoubon", "lanraragi" );
my $redis = LANraragi::Model::Config->get_redis;
my $redis = LANraragi::Model::Config->get_redis;

if ( length($tank_id) != 15 ) {

Expand Down Expand Up @@ -205,7 +205,7 @@ sub update_archive_list ( $tank_id, $data ) {
}

my @origs = $redis->zrangebyscore( $tank_id, 1, "+inf" );
my @diff = array_difference( \@tank_archives, \@origs );
my @diff = array_difference( \@tank_archives, \@origs );
my @update;

# Remove the ones not in the order
Expand Down Expand Up @@ -333,7 +333,7 @@ sub remove_from_tankoubon ( $tank_id, $arcid ) {
# get_tankoubons_file(arcid)
# Gets a list of Tankoubons where archive ID is contained.
# Returns an array of tank IDs.
sub get_tankoubons_file($arcid) {
sub get_tankoubons_file ($arcid) {

return get_tankoubons_by_file($arcid);

Expand Down
Binary file added tools/Documentation/.screenshots/lrr_react.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion tools/Documentation/advanced-usage/external-readers.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@ Here are some existing clients:
![Tachiyomi](<../.screenshots/tachiyomi.jpg>)

The open-source [Tachiyomi](https://tachiyomi.org) Android reader has a readymade plugin to consume the LANraragi API.
You can download it [here.](https://github.com/inorichi/tachiyomi-extensions/blob/repo/apk/tachiyomi-all.lanraragi-v1.2.1.apk)
You can download it [here.](https://github.com/tachiyomiorg/tachiyomi-extensions/blob/repo/apk/tachiyomi-all.lanraragi-v1.4.14.apk)

### LRR React Web

![LRR React-Web](../.screenshots/lrr_react.jpg)

A React-based frontend PWA making use of the Client API. "Works best on mobile and tablet viewports, but the desktop experience is okay."
Check it out [here.](https://github.com/hibikikuze4dan/lanraragi-react-web)

## Generic OPDS readers

Expand Down

0 comments on commit 93516c0

Please sign in to comment.