Skip to content

Commit

Permalink
Merge pull request #49 from OpenDataServices/ods-support
Browse files Browse the repository at this point in the history
conversion: Accept .ods format
  • Loading branch information
Bjwebb authored Feb 25, 2020
2 parents 71fb186 + 6acd31d commit 12b2ca0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [0.15.0] - 2020-02-24

- Accept .ods format

## [0.14.0] - 2020-02-13

### Added
Expand Down
2 changes: 1 addition & 1 deletion libcove/lib/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class UnrecognisedFileType(CoveInputDataError):
"link": "index",
"link_text": _("Try Again"),
"msg": _(
"We did not recognise the file type.\n\nWe can only process json, csv and xlsx files."
"We did not recognise the file type.\n\nWe can only process json, csv, ods and xlsx files."
),
}

Expand Down
2 changes: 2 additions & 0 deletions libcove/lib/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ def get_file_type(file_name):
return "json"
if file_name.lower().endswith(".xlsx"):
return "xlsx"
if file_name.lower().endswith(".ods"):
return "ods"
if file_name.lower().endswith(".csv"):
return "csv"
# Try and load the first bit of the file to see if it's JSON?
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="libcove",
version="0.14.0",
version="0.15.0",
author="Open Data Services",
author_email="code@opendataservices.coop",
url="https://github.com/OpenDataServices/lib-cove",
Expand All @@ -18,7 +18,7 @@
"requests",
"json-merge-patch",
"cached-property",
"flattentool>=0.5.0",
"flattentool>=0.11.0",
# Required for jsonschema to validate URIs
"rfc3987",
# Required for jsonschema to validate date-time
Expand Down

0 comments on commit 12b2ca0

Please sign in to comment.