From 9a9d399503f3d7b86f8aa747cdfc96d10bb32fbc Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Fri, 22 Feb 2013 01:56:06 +0100 Subject: [PATCH] [suboob] attila favicon&test, suboob manpage --- man/suboob.1 | 232 ++++++++++++++++++++++++++++++++++ modules/attilasub/favicon.png | Bin 0 -> 3334 bytes modules/attilasub/test.py | 3 +- 3 files changed, 234 insertions(+), 1 deletion(-) create mode 100644 man/suboob.1 create mode 100644 modules/attilasub/favicon.png diff --git a/man/suboob.1 b/man/suboob.1 new file mode 100644 index 00000000..022eb663 --- /dev/null +++ b/man/suboob.1 @@ -0,0 +1,232 @@ +.TH SUBOOB 1 "22 February 2013" "weboorrents 0\&.f" +.SH NAME +suboob \- search and download subtitles +.SH SYNOPSIS +.B suboob +[\-dqv] [\-b \fIbackends\fR] [\-cnfs] [\fIcommand\fR [\fIarguments\fR..]] +.br +.B suboob +[\-\-help] [\-\-version] + +.SH DESCRIPTION +.LP + +Console application allowing to search for subtitles on various websites and download them. + +.SS Supported websites: +* attilasub (Attila' s Website 2.0 french subtitles) +.br +.SH SUBOOB COMMANDS +.TP +\fBgetfile\fR \fIID\fR [\fIFILENAME\fR] +.br +Get the subtitle file. +.br +FILENAME is where to write the file. If FILENAME is '\-', +.br +the file is written to stdout. +.TP +\fBinfo\fR \fIID\fR +.br +Get information about a subtitle. +.TP +\fBsearch\fR [\fIPATTERN\fR] +.br +Search subtitles. +.SH WEBOOB COMMANDS +.TP +\fBbackends\fR [\fIACTION\fR] [\fIBACKEND_NAME\fR]... +.br +Select used backends. +.br + +.br +ACTION is one of the following (default: list): +.br +* enable enable given backends +.br +* disable disable given backends +.br +* only enable given backends and disable the others +.br +* list list backends +.br +* add add a backend +.br +* register register a new account on a website +.br +* edit edit a backend +.br +* remove remove a backend +.br +* list\-modules list modules +.TP +\fBcd\fR [\fIPATH\fR] +.br +Follow a path. +.br +".." is a special case and goes up one directory. +.br +"" is a special case and goes home. +.TP +\fBcondition\fR [\fIEXPRESSION\fR | off] +.br +If an argument is given, set the condition expression used to filter the results. +.br +If the "off" value is given, conditional filtering is disabled. +.br + +.br +If no argument is given, print the current condition expression. +.TP +\fBcount\fR [\fINUMBER\fR | off] +.br +If an argument is given, set the maximum number of results fetched. +.br +NUMBER must be at least 1. +.br +"off" value disables counting, and allows infinite searches. +.br + +.br +If no argument is given, print the current count value. +.TP +\fBformatter\fR [list | \fIFORMATTER\fR [\fICOMMAND\fR] | option \fIOPTION_NAME\fR [on | off]] +.br +If a FORMATTER is given, set the formatter to use. +.br +You can add a COMMAND to apply the formatter change only to +.br +a given command. +.br + +.br +If the argument is "list", print the available formatters. +.br + +.br +If the argument is "option", set the formatter options. +.br +Valid options are: header, keys. +.br +If on/off value is given, set the value of the option. +.br +If not, print the current value for the option. +.br + +.br +If no argument is given, print the current formatter. +.TP +\fBinspect\fR \fIBACKEND_NAME\fR +.br +Display the HTML string of the current page of the specified backend's browser. +.br + +.br +If webkit_mechanize_browser Python module is installed, HTML is displayed in a WebKit GUI. +.TP +\fBlogging\fR [\fILEVEL\fR] +.br +Set logging level. +.br + +.br +Availables: debug, info, warning, error. +.br +* quiet is an alias for error +.br +* default is an alias for warning +.TP +\fBls\fR [\-d] [\fIPATH\fR] +.br +List objects in current path. +.br +If an argument is given, list the specified path. +.TP +\fBquit\fR +.br +Quit the application. +.TP +\fBselect\fR [\fIFIELD_NAME\fR]... | "$direct" | "$full" +.br +If an argument is given, set the selected fields. +.br +$direct selects all fields loaded in one http request. +.br +$full selects all fields using as much http requests as necessary. +.br + +.br +If no argument is given, print the currently selected fields. + +.SH OPTIONS +.TP +\fB\-\-version\fR +show program's version number and exit +.TP +\fB\-h\fR, \fB\-\-help\fR +show this help message and exit +.TP +\fB\-b BACKENDS\fR, \fB\-\-backends=BACKENDS\fR +what backend(s) to enable (comma separated) +.TP +\fB\-e EXCLUDE_BACKENDS\fR, \fB\-\-exclude\-backends=EXCLUDE_BACKENDS\fR +what backend(s) to exclude (comma separated) +.TP +\fB\-I\fR, \fB\-\-insecure\fR +do not validate SSL + +.SH LOGGING OPTIONS +.TP +\fB\-d\fR, \fB\-\-debug\fR +display debug messages +.TP +\fB\-q\fR, \fB\-\-quiet\fR +display only error messages +.TP +\fB\-v\fR, \fB\-\-verbose\fR +display info messages +.TP +\fB\-\-logging\-file=LOGGING_FILE\fR +file to save logs +.TP +\fB\-a\fR, \fB\-\-save\-responses\fR +save every response + +.SH RESULTS OPTIONS +.TP +\fB\-c CONDITION\fR, \fB\-\-condition=CONDITION\fR +filter result items to display given a boolean expression +.TP +\fB\-n COUNT\fR, \fB\-\-count=COUNT\fR +get a maximum number of results (all backends merged) +.TP +\fB\-s SELECT\fR, \fB\-\-select=SELECT\fR +select result item keys to display (comma separated) + +.SH FORMATTING OPTIONS +.TP +\fB\-f FORMATTER\fR, \fB\-\-formatter=FORMATTER\fR +select output formatter (csv, htmltable, multiline, simple, table, torrent_info, +torrent_list, webkit) +.TP +\fB\-\-no\-header\fR +do not display header +.TP +\fB\-\-no\-keys\fR +do not display item keys +.TP +\fB\-O OUTFILE\fR, \fB\-\-outfile=OUTFILE\fR +file to export result + +.SH COPYRIGHT +Copyright(C) 2010-2012 Romain Bignon +.LP +For full COPYRIGHT see COPYING file with weboob package. +.LP +.RE +.SH FILES +"~/.config/weboob/backends" + +.SH SEE ALSO +Home page: http://weboob.org/applications/weboorrents diff --git a/modules/attilasub/favicon.png b/modules/attilasub/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..bca3347873846503755116ca28faa3582aba6784 GIT binary patch literal 3334 zcmV+h4f*nkP)00001b5ch_0Itp) z=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i*b| z05CfPiy@@|01SpnL_t(&-tAi3avVo;Jtwnz01}`GQWUw8R@YsxW5bsS|GeM)=qEp{ z*DGmnVTB~Fcn664T)HxkAF6vWBxWdRMTy}Ebufa1>1v>|GxOv*nZ^J3&wpPm7B%{l z=YRY4N1wjuW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+++ b/modules/attilasub/test.py @@ -28,9 +28,10 @@ class AttilasubTest(BackendTest): def test_subtitle(self): subtitles = list(self.backend.iter_subtitles('spiderman')) + assert (len(subtitles) > 0) for subtitle in subtitles: path, qs = urllib.splitquery(subtitle.url) - #assert path.endswith('.torrent') + assert path.endswith('.rar') # get the file of a random sub if len(subtitles):