renamed travel to traveloob
This commit is contained in:
parent
6b93e17c8a
commit
8d604ca359
4 changed files with 10 additions and 10 deletions
76
man/traveloob.1
Normal file
76
man/traveloob.1
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
.TH TRAVELOOB 1 "02 August 2010"
|
||||
.SH NAME
|
||||
traveloob \- Transport informations
|
||||
.SH SYNOPSIS
|
||||
.B traveloob
|
||||
[\-dqv] [\-b \fIbackends\fR] [\-cnfs] \fIcommand\fR [arguments..]
|
||||
.br
|
||||
.B traveloob
|
||||
[\-\-version] [\-\-help]
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
Weboob provides several applications to interact with a lot of websites.
|
||||
|
||||
This console application can be used to look at timelines of a specific
|
||||
station. It interacts with travel websites (train, airplanes, etc.).
|
||||
|
||||
.SH COMMANDS
|
||||
.TP
|
||||
\fBstations\fR \fIpattern\fR
|
||||
search stations containing the specific pattern
|
||||
.TP
|
||||
\fBdepartures\fR \fIstation\fR \fI[arrival]\fR
|
||||
display the timeline of a specific station
|
||||
|
||||
it's possible to specify only the departures for a specific
|
||||
arrival station
|
||||
|
||||
.SH OPTIONS
|
||||
.SS Results options
|
||||
.TP
|
||||
\fB\-c\fR, \fB\-\-condition\fR \fICONDITION\fR
|
||||
filter result items to display given a boolean condition
|
||||
.TP
|
||||
\fB\-n\fR, \fB\-\-count\fR \fICOUNT\fR
|
||||
get a maximum number of results (all backends merged)
|
||||
.TP
|
||||
\fB\-f\fR, \fB\-\-formatter\fR \fIFORMATTER\fR
|
||||
select the output formatter (htmltable,multiline,simple,table,webkit)
|
||||
.TP
|
||||
\fB\-s\fR, \fB\-\-select\fR \fIFIELDS\fR
|
||||
select return field keys to display (comma separated)
|
||||
.TP
|
||||
\fB\-\-no-header\fR
|
||||
do not display header
|
||||
.TP
|
||||
\fB\-\-no-keys\fR
|
||||
do not display field keys
|
||||
.SS 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
|
||||
.SS Misc options
|
||||
.TP
|
||||
\fB\-b\fR, \fB\-\-backends\fR \fIbackends\fR
|
||||
select backends to load
|
||||
.TP
|
||||
\fB\-\-version\fR
|
||||
display version of \fIweboob-config\fR
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
show the help message and exit
|
||||
|
||||
.SH COPYRIGHT
|
||||
Copyright(C) 2010 Romain Bignon
|
||||
.LP
|
||||
For full COPYRIGHT see COPYING file with weboob package.
|
||||
.LP
|
||||
.RE
|
||||
.SH FILES
|
||||
"~/.weboob/backends"
|
||||
25
scripts/traveloob
Executable file
25
scripts/traveloob
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=python et softtabstop=4 cinoptions=4 shiftwidth=4 ts=4 ai
|
||||
|
||||
# Copyright(C) 2010 Romain Bignon
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, version 3 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
|
||||
from weboob.applications.traveloob import Traveloob
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
Traveloob.run()
|
||||
20
weboob/applications/traveloob/__init__.py
Normal file
20
weboob/applications/traveloob/__init__.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=python et softtabstop=4 cinoptions=4 shiftwidth=4 ts=4 ai
|
||||
|
||||
# Copyright(C) 2010 Romain Bignon
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, version 3 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
|
||||
from .traveloob import Traveloob
|
||||
43
weboob/applications/traveloob/traveloob.py
Normal file
43
weboob/applications/traveloob/traveloob.py
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2010 Romain Bignon, Julien Hébert
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, version 3 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
|
||||
from weboob.capabilities.travel import ICapTravel
|
||||
from weboob.tools.application.console import ConsoleApplication
|
||||
|
||||
|
||||
__all__ = ['Traveloob']
|
||||
|
||||
|
||||
class Traveloob(ConsoleApplication):
|
||||
APPNAME = 'traveloob'
|
||||
VERSION = '0.1'
|
||||
COPYRIGHT = 'Copyright(C) 2010 Romain Bignon'
|
||||
|
||||
def main(self, argv):
|
||||
self.load_backends(ICapTravel)
|
||||
return self.process_command(*argv[1:])
|
||||
|
||||
@ConsoleApplication.command('Search stations')
|
||||
def command_stations(self, pattern):
|
||||
for backend, station in self.weboob.do('iter_station_search', pattern):
|
||||
self.format(station, backend.name)
|
||||
|
||||
@ConsoleApplication.command('List all departures for a given station')
|
||||
def command_departures(self, station, arrival=None):
|
||||
for backend, departure in self.weboob.do('iter_station_departures', station, arrival):
|
||||
self.format(departure, backend.name)
|
||||
Loading…
Reference in a new issue