dotfiles

My dotfiles, nothing really interesting to see ...
git clone https://git.onna.be/dotfiles.git
Log | Files | Refs | README

commit e8bb7006bec91c5904b00ce4e68e8a10328b2348
parent b92efc95f5ae4109e1f97c8c09812c3f899c7722
Author: Paco Esteban <paco@onna.be>
Date:   Tue, 23 Oct 2018 10:53:56 +0200

and now we can get 25, 50 or 100 torrent results

Diffstat:
bin/bin/rarbg.pl | 16++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/bin/bin/rarbg.pl b/bin/bin/rarbg.pl @@ -9,12 +9,14 @@ use Getopt::Long; no warnings 'experimental'; sub usage { - say "Usage: $0 [--list] [--search <string>] [--categories <movies|tv>]"; + say + "Usage: $0 [--list] [--search <string>] [--categories <movies|tv>] [--limit <n>]"; say "\t--list\t\t\tlists last added torrents sorted by seeds."; say "\t--search <string>\tsearches for <string> and returns sorted by seeds"; say - "\t--category [movies|tv]\tuses those categories (defaults to movies)"; + "\t--category [movies|tv|music|xxxx]\tuses those categories (defaults to movies)"; + say "\t--limit [25|50|100]\tShows 'n' results (defaults to 25)"; exit 1; } @@ -25,11 +27,13 @@ my $list; my $result; my $raw_category = ''; my $category; +my $limit = 25; GetOptions( "search=s" => \$search, "list" => \$list, - "category=s" => \$raw_category + "category=s" => \$raw_category, + "limit=i" => \$limit ) or usage(); given ($raw_category) { @@ -50,7 +54,7 @@ given ($raw_category) { if ($search) { $result = $tapi->search( { sort => 'seeders', - limit => 20, + limit => $limit, category => $category, search_string => $search } @@ -59,7 +63,7 @@ if ($search) { elsif ($list) { $result = $tapi->list( { sort => 'seeders', - limit => 20, + limit => $limit, category => $category } ); @@ -90,7 +94,7 @@ my $selection = <STDIN>; chomp $selection; if ( $selection =~ m/\d{1,2} ?/ ) { - my @selections = split(/ /, $selection); + my @selections = split( / /, $selection ); foreach my $s (@selections) { say "[*] You selected: " . $result->[$s]->title; say " [-] sending magnet to transmission:\n"