Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Private check, remove obsolete files #27

Merged
merged 6 commits into from
Dec 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions .coveragerc

This file was deleted.

11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include README.rst
recursive-include ckanext/officedocs *.html *.json *.js *.less *.css
include README.md
recursive-include ckanext/officedocs *.html *.json *.js *.less *.css
36 changes: 0 additions & 36 deletions bin/travis-build.bash

This file was deleted.

6 changes: 0 additions & 6 deletions bin/travis-run.sh

This file was deleted.

14 changes: 9 additions & 5 deletions ckanext/officedocs/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def info(self):
"name": "officedocs_view",
"title": tk._("Office Previewer"),
"default_title": tk._("Preview"),
"icon": "compass",
"always_available": True,
"icon": "windows",
"always_available": False,
"iframed": False,
}

Expand All @@ -32,13 +32,17 @@ def setup_template_variables(self, context, data_dict):

def can_view(self, data_dict):
supported_formats = [
"DOC", "DOCX", "XLS", "CSV",
"DOC", "DOCX", "XLS",
"XLSX", "XLSB", "PPT", "PPTX",
"PPS", "PPSX", "ODT", "ODS", "ODP"
]
try:
res = data_dict["resource"].get("format", "").upper()
return res in supported_formats
pkg_private = data_dict["package"].get("private", False)
if not pkg_private:
res = data_dict["resource"].get("format", "").upper()
return res in supported_formats
else:
return False
except:
return False

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# http://packaging.python.org/en/latest/tutorial.html#version
version='1.0.1',
version='1.1.0',

description='''A ResourceView that uses Microsoft's Doc preview''',
long_description=long_description,
Expand Down
49 changes: 0 additions & 49 deletions test.ini

This file was deleted.