Skip to content

Commit

Permalink
Merge 16d94fe into e79a91e
Browse files Browse the repository at this point in the history
  • Loading branch information
djhoese committed Sep 19, 2018
2 parents e79a91e + 16d94fe commit 858559b
Show file tree
Hide file tree
Showing 6 changed files with 324 additions and 276 deletions.
5 changes: 2 additions & 3 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
contain the root `toctree` directive.
.. meta::
description: Trollsift project, modules for formatting, parsing and filtering satellite granule file names
keywords: Python, pytroll, format, parse, filter, string
:description: Trollsift project, modules for formatting, parsing and filtering satellite granule file names
:keywords: Python, pytroll, format, parse, filter, string

Welcome to the trollsift documentation!
=========================================
Expand All @@ -26,7 +26,6 @@ Contents

installation
usage
examples
api

Indices and tables
Expand Down
14 changes: 8 additions & 6 deletions doc/source/usage.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@

.. .. sectnum::
.. :depth: 4
.. :start: 2
.. :suffix: .
.. _string-format: https://docs.python.org/2/library/string.html#format-string-syntax

Usage
Expand Down Expand Up @@ -44,6 +38,14 @@ a new file name,
>>> p.compose(data)
'/somedir/otherdir/hrpt_noaa16_20120101_0101_69022.l1b'

In addition to python's builtin string formatting functionality trollsift also
provides extra conversion options such as making all characters lowercase:

>>> my_parser = Parser("{platform_name:l}")
>>> my_parser.compose({'platform_name': 'NPP'})
'npp'

For all of the options see :class:`~trollsift.parser.StringFormatter`.

standalone parse and compose
+++++++++++++++++++++++++++++++++++++++++
Expand Down
5 changes: 4 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ requires=python python-six
release=1

[bdist_wheel]
universal=1
universal=1

[flake8]
max-line-length = 120
Loading

0 comments on commit 858559b

Please sign in to comment.