Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,10 @@ or, optionally, a sequence of individual features. Since most software that
reads and writes GeoJSON expects a text containing a single feature collection,
that's the default, and a LF-delimited sequence of texts containing one GeoJSON
feature each is a feature that is turned on using the ``--sequence`` option.
To write sequences of feature texts that conform to the `JSON Text Sequences
proposed standard
<http://tools.ietf.org/html/draft-ietf-json-text-sequence-13>`__ (and might
contain pretty-printed JSON) with the ASCII Record Separator (0x1e) as
a delimiter, use the ``--rs`` option
To write sequences of feature texts that conform to the `RFC 7464 JSON Text
Sequences standard <https://tools.ietf.org/html/rfc7464>`__ (and might contain
pretty-printed JSON) with the ASCII Record Separator (0x1e) as a delimiter, use
the ``--rs`` option

.. code-block:: python

Expand Down
12 changes: 6 additions & 6 deletions cligj/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from .features import normalize_feature_inputs


# Arguments.

# Multiple input files.
Expand Down Expand Up @@ -95,18 +96,17 @@
# Feature collection or feature sequence switch.
sequence_opt = click.option(
'--sequence/--no-sequence',
default=False,
default=True,
help="Write a LF-delimited sequence of texts containing individual "
"objects or write a single JSON text containing a feature "
"collection object (the default).")
"objects (the default) or write a single JSON text containing a "
"feature collection object.")

use_rs_opt = click.option(
'--rs/--no-rs',
'use_rs',
default=False,
help="Use RS (0x1E) as a prefix for individual texts in a sequence "
"as per http://tools.ietf.org/html/draft-ietf-json-text-sequence-13 "
"(default is False).")
"as per https://tools.ietf.org/html/rfc7464 (default is False).")


# GeoJSON output mode option.
Expand All @@ -119,7 +119,7 @@ def geojson_type_collection_opt(default=False):
help="Output as GeoJSON feature collection(s).")


def geojson_type_feature_opt(default=False):
def geojson_type_feature_opt(default=True):
return click.option(
'--feature',
'geojson_type',
Expand Down
10 changes: 3 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


setup(name='cligj',
version='0.4.0',
version='0.5.0',
description=u"Click params for commmand line interfaces to GeoJSON",
long_description=long_description,
classifiers=[],
Expand All @@ -20,9 +20,5 @@
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
zip_safe=False,
install_requires=[
'click>=4.0'
],
extras_require={
'test': ['pytest-cov'],
})
install_requires=['click>=4.0'],
extras_require={'test': ['pytest-cov']})
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def cmd(sequence):

result = runner.invoke(cmd)
assert not result.exception
assert result.output.splitlines() == ['False']
assert result.output.splitlines() == ['True']

result = runner.invoke(cmd, ['--sequence'])
assert not result.exception
Expand Down