-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from OpenGov-OpenData/jguo144/2024-06-11/merge-…
…upstream Merge upstream changes
- Loading branch information
Showing
12 changed files
with
94 additions
and
190 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,5 +40,5 @@ coverage.xml | |
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
.DS_Store | ||
.vscode/ | ||
.DS_Store |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# ckanext-officedocs | ||
|
||
This plugin provides the option of using the [Microsoft Office Web | ||
Viewer](https://www.microsoft.com/en-us/microsoft-365/blog/2013/04/10/office-web-viewer-view-office-documents-in-a-browser/) | ||
for previewing both MS Office and OpenOffice documents as an | ||
IResourceView | ||
|
||
## Supported formats | ||
|
||
This plugin will attempt to preview the following formats | ||
|
||
> \"DOC\", \"DOCX\", \"XLS\", \"XLSX\", \"XLSB\", \"PPT\", \"PPTX\", \"PPS\", | ||
> \"PPSX\", \"ODT\", \"ODS\", \"ODP\" | ||
## Installation | ||
|
||
To install ckanext-officedocs: | ||
|
||
1. Clone this repository into the place where you normally install | ||
extensions, by default this will be /usr/lib/ckan/default/src/ | ||
|
||
2. Activate your CKAN virtual environment, for example: | ||
|
||
. /usr/lib/ckan/default/bin/activate | ||
|
||
3. Install the ckanext-officedocs Python package into your virtual | ||
environment: | ||
|
||
cd ckanext-officedocs | ||
python setup.py install | ||
|
||
4. Add `officedocs_view` to the `ckan.plugins` setting in your CKAN | ||
config file (by default the config file is located at | ||
`/etc/ckan/default/production.ini`). | ||
|
||
5. If you wish for views to be created automatically for you, then you | ||
should add `officedocs_view` to the end of the | ||
`ckan.views.default_views` option in your config file. | ||
|
||
> ckan.views.default\_views = \... officedocs\_view | ||
6. Restart CKAN. For example if you\'ve deployed CKAN with Apache on | ||
Ubuntu: | ||
|
||
sudo service apache2 reload | ||
|
||
or if you\'re using `supervisor`: | ||
|
||
sudo supervisorctl restart ckan-uwsgi:\* | ||
|
||
## FAQ | ||
|
||
Q: It doesn\'t work, my documents aren\'t previewing | ||
|
||
A: For this extension to work, the documents to be previewed must be | ||
accessible to the wider internet (i.e. the Dataset Package is PUBLIC, not PRIVATE), | ||
and will only work if you use a hostname, and not just an IP address. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
six>=1.10.0 #pytest has requirement six>=1.10.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
here = path.abspath(path.dirname(__file__)) | ||
|
||
# Get the long description from the relevant file | ||
with open(path.join(here, 'README.rst'), encoding='utf-8') as f: | ||
with open(path.join(here, 'README.md'), encoding='utf-8') as f: | ||
long_description = f.read() | ||
|
||
setup( | ||
|
@@ -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='0.0.1', | ||
version='1.1.0', | ||
|
||
description='''A ResourceView that uses Microsoft's Doc preview''', | ||
long_description=long_description, | ||
|
@@ -23,8 +23,8 @@ | |
url='https://github.com/rossjones/ckanext-officedocs', | ||
|
||
# Author details | ||
author='''Ross Jones''', | ||
author_email='''[email protected]''', | ||
author='''Ross Jones, Joel Natividad''', | ||
author_email='''[email protected], [email protected]''', | ||
|
||
# Choose your license | ||
license='AGPL', | ||
|
@@ -35,15 +35,15 @@ | |
# 3 - Alpha | ||
# 4 - Beta | ||
# 5 - Production/Stable | ||
'Development Status :: 4 - Beta', | ||
'Production/Stable :: 5', | ||
|
||
# Pick your license as you wish (should match "license" above) | ||
'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)', | ||
|
||
# Specify the Python versions you support here. In particular, ensure | ||
# that you indicate whether you support Python 2, Python 3 or both. | ||
'Programming Language :: Python :: 2.6', | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3.8', | ||
], | ||
|
||
|
||
|