Metadata-Version: 2.1
Name: renfe-cli
Version: 1.1.2
Summary: Get faster RENFE Spanish Trains timetables in your terminal
Home-page: https://github.com/gerardcl/renfe-cli
Author: Gerard Castillo
Author-email: gerardcl@gmail.com
License: BSD
Keywords: Get faster RENFE Spanish Trains timetables terminal
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Topic :: Utilities
Classifier: Topic :: Terminals
Classifier: Topic :: Text Processing :: Markup :: HTML
Requires-Dist: setuptools
Requires-Dist: lxml
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: python-dateutil
Requires-Dist: pytz
Requires-Dist: six
Requires-Dist: colorama

|Build Status|

RENFE TIMETABLES CLI
====================

Get faster RENFE Spanish Trains timetables in your terminal.

See the
`changelog <https://github.com/gerardcl/renfe-cli/blob/master/CHANGELOG.md>`__

-  Installation:

Install python CLI package
`renfe-cli <https://pypi.org/project/renfe-cli/>`__

::

   $ pip install renfe-cli

-  Usage:

::

   $ renfe-cli -h    
   Usage: renfe-cli [options]

   Options:
     -h, --help            show this help message and exit
     -y YEAR, --year=YEAR  Year selected to get the timetable from
     -m MONTH, --month=MONTH
                           Month of the year to get the timetable from
     -d DAY, --day=DAY     Day of the month to get the timetable from
     -o ORIGIN, --origin=ORIGIN
                           From/Origin ID of the train station. Use flag '-s
                           <possible station name>' in order to search for IDs
     -t TO, --to=TO        To/Destination ID of the train station. Use flag '-s
                           <possible station name>' in order to search for IDs
     -s SEARCH, --search=SEARCH
                           You need to get the stations IDs, searching by names;
                           in order to apply right inputs for origins and/or
                           destinations
     -l LOGGING_LEVEL, --logging-level=LOGGING_LEVEL
                           Logging level
     -f LOGGING_FILE, --logging-file=LOGGING_FILE
                           Logging file name (required if you want to submit an
                           issue with more information)

**Searching for IDs of train stations**
---------------------------------------

When using search functionality, it will provide you with the IDs (to
use as an origin or destiation train station) of the stations that are
similar to the input text to search. Example:

::

   $ renfe-cli -s sil
   Today is: 2019-05-05
   Searching stations like: sil
   SANESTEVODOSIL: 22003
   SANPEDRODOSIL: 22004
   SILLA: 64200
   SILS: 79202

   $ renfe-cli -s barc
   Today is: 2019-05-05
   Searching stations like: barc
   BARCELONA: 97007
   BARCELONA(TODAS): BARCE
   BARCELONA-ARCDETRIOMF: 78804
   BARCELONA-PLAÇADECATALUNYA: 78805
   BARCELONA-TORREDELBARO: 78801
   BARCELOS: 94024
   BARCENA: 14206
   CEUTA-BARCO: 99126
   ELBARCENAL: 05644
   OBARCODEVALDEORRAS: 20211
   TANGERMED-BARCO: 99124
   TANGERVILLE-BARCO: 99125
   VILANOVADELABARCA: 75102

**Getting the timetable**
-------------------------

Timetable defaults to ``today``, from ``Sils`` (ID is ``79202``) to
``Barcelona`` (ID is ``BARCE``):

::

   $ renfe-cli        
   Today is: 2019-05-05
   Searching timetable for date: 2019-05-05
   From 79202 to BARCE
   =================== TIMETABLE ====================
      Tren / Recorrido  Salida  Llegada      Duración
   0          15060 MD    7.23     8.39  1 h. 16 min.
   1          15064 MD    8.27     9.39  1 h. 12 min.
   2    15806 REGIONAL   10.20    11.39  1 h. 19 min.
   3    15808 REGIONAL   11.43    13.09  1 h. 26 min.
   4          15070 MD   12.27    13.39  1 h. 12 min.
   5    15810 REGIONAL   13.33    14.52  1 h. 19 min.
   6          15090 MD   14.27    15.39  1 h. 12 min.
   7    15812 REGIONAL   15.39    17.09  1 h. 30 min.
   8          15072 MD   16.57    18.09  1 h. 12 min.
   9    15814 REGIONAL   17.39    18.55  1 h. 16 min.
   10         15018 MD   18.06    19.18  1 h. 12 min.
   11         15918 MD   18.57    20.09  1 h. 12 min.
   12         15074 MD   19.45    20.55  1 h. 10 min.
   13   15848 REGIONAL   20.01    21.09   1 h. 8 min.
   14   15850 REGIONAL   20.59    22.19  1 h. 20 min.
   15   15822 REGIONAL   21.38    22.55  1 h. 17 min.
   ==================================================

Which would be the same as:

::

   $ renfe-cli -y 2019 -m 5 -d 5 -o 79202 -t BARCE
   Today is: 2019-05-05
   Searching timetable for date: 2019-05-05
   From 79202 to BARCE
   =================== TIMETABLE ====================
      Tren / Recorrido  Salida  Llegada      Duración
   0          15060 MD    7.23     8.39  1 h. 16 min.
   1          15064 MD    8.27     9.39  1 h. 12 min.
   2    15806 REGIONAL   10.20    11.39  1 h. 19 min.
   3    15808 REGIONAL   11.43    13.09  1 h. 26 min.
   4          15070 MD   12.27    13.39  1 h. 12 min.
   5    15810 REGIONAL   13.33    14.52  1 h. 19 min.
   6          15090 MD   14.27    15.39  1 h. 12 min.
   7    15812 REGIONAL   15.39    17.09  1 h. 30 min.
   8          15072 MD   16.57    18.09  1 h. 12 min.
   9    15814 REGIONAL   17.39    18.55  1 h. 16 min.
   10         15018 MD   18.06    19.18  1 h. 12 min.
   11         15918 MD   18.57    20.09  1 h. 12 min.
   12         15074 MD   19.45    20.55  1 h. 10 min.
   13   15848 REGIONAL   20.01    21.09   1 h. 8 min.
   14   15850 REGIONAL   20.59    22.19  1 h. 20 min.
   15   15822 REGIONAL   21.38    22.55  1 h. 17 min.
   ==================================================

--------------

Issues
------

If Renfe’s website is changed please `create an
issue <https://github.com/gerardcl/renfe-cli/issues>`__ in order to
update the parsing methods and get it working again.

Installation alternatives (getting latest source code)
------------------------------------------------------

If you want to install latest source code:

::

   $ pip install git+http://github.com/gerardcl/renfe-cli

or

::

   $ git clone git://github.com/gerardcl/renfe-cli
   $ cd github-cli
   $ python setup.py install

.. |Build Status| image:: https://travis-ci.org/gerardcl/renfe-cli.svg?branch=master
   :target: https://travis-ci.org/gerardcl/renfe-cli


