-
Notifications
You must be signed in to change notification settings - Fork 0
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
Anonymous access? #1
Comments
Hi, thank you for your valuable feedback. Your sphinx extension looks nice. I wasn't aware of any DocuShare site that does not require login. I removed a couple of check points that raise an error when the user has not been logged in. Hope it works for your use case. It hasn't been well tested, but will include this change in the next release. Regarding the question about PyPI, I just felt that this library heavily relies on specific DocuShare configurations that are probably not universal for all DocuShare sites. Actually, looking at your LSST's DocuShare site, there is handle 'presentation-xxxx' which I have never seen and this library does not support that. So, I am still reluctant to put this library in PyPI, but may change my mind if there are more requests. |
Thank you for the change! This will specifically help to have some public tests! --- a/docushare/docushare.py
+++ b/docushare/docushare.py
@@ -735,6 +735,7 @@ class DocuShare:
title = title,
object_handles = object_handles
)
+ self.__dsobjects[hdl].properties = properties
return self.__dsobjects[hdl]
elif hdl.type == HandleType.Document:
# Get properties
@@ -754,6 +755,7 @@ class DocuShare:
document_control_number = document_control_number,
version_handles = version_handles
)
+ self.__dsobjects[hdl].properties = properties
return self.__dsobjects[hdl]
elif hdl.type == HandleType.Version:
# Get properties
@@ -769,6 +771,7 @@ class DocuShare:
filename = filename,
version_number = version_number
)
+ self.__dsobjects[hdl].properties = properties
return self.__dsobjects[hdl]
else:
assert False, 'code must not reach here' but the better way would probably be to add the property to the constructor of For the non-standard handles: a pragmatic way would be to treat all non-standard handles as If you like, I could prepare one or two Pull Requests for there things. |
Hi, thank you your additional ideas for the properties and custom handles. They were moved to separate issues as I want to have one topic in one issue: Issue #2 and Issue #3 . I like both of your ideas. I think that adding "properties" is a good idea, and I would like to include your modification in my source tree, so please make a pull request. For non-standard handles, treading them as DoumentObject is probably good, but I think more consideration would be necessary as in my comments in Issue #3. |
Hi,
FYI, based on your package, I created a sphinxdoc "role" that can refer to docushare documents within sphinxdoc: https://github.com/olebole/sphinx-docushare
My main question here is how it is possible to retrieve documents anonymously, f.e. from https://docushare.lsstcorp.org/docushare? Without the login() method, one cannot proceed.
Unrelated to this: Is there a reason why this package is only on test.pypi.org and not on the main PyPI?
The text was updated successfully, but these errors were encountered: