Skip to content
This repository was archived by the owner on Jan 7, 2021. It is now read-only.

Commit 3553f60

Browse files
committed
Upgraded to version 1.0.2
1 parent 151ec4f commit 3553f60

File tree

3 files changed

+23
-14
lines changed

3 files changed

+23
-14
lines changed

docs/changelog.rst

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Changelog
22
---------
33

4+
1.0.2
5+
-----
6+
7+
* URLs to PDFs can now be submitted for upload
8+
* Refactored setup.py and tests to be less complex
9+
410
1.0.1
511
~~~~~
612

@@ -19,21 +25,21 @@ Changelog
1925
0.2
2026
~~~
2127

22-
- Python 3 support
23-
- PEP8 and PyFlakes compliance
24-
- Coverage reports on testing via coveralls.io
28+
* Python 3 support
29+
* PEP8 and PyFlakes compliance
30+
* Coverage reports on testing via coveralls.io
2531

2632

2733
0.16
2834
~~~~
2935

30-
- Continuous integration testing with TravisCI
31-
- Fixed bug with empty strings in Document descriptions
32-
- Raise errors when a user tries to save a data keyword reserved by DocumentCloud
33-
- Allow all-caps file extensions
34-
- Retry requests that fail with an increasing backoff delay
35-
- Fixed a bug in how titles are assigned to a file object
36-
- Added access checks when retrieving txt, pdf, img about a document
36+
* Continuous integration testing with TravisCI
37+
* Fixed bug with empty strings in Document descriptions
38+
* Raise errors when a user tries to save a data keyword reserved by DocumentCloud
39+
* Allow all-caps file extensions
40+
* Retry requests that fail with an increasing backoff delay
41+
* Fixed a bug in how titles are assigned to a file object
42+
* Added access checks when retrieving txt, pdf, img about a document
3743

3844
0.15
3945
~~~~

docs/documents.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ Uploading
6969
>>> client.documents.get(new_id)
7070
<Document: Test PDF>
7171

72+
You can also URLs link to PDFs, if that's the kind of thing you want to do.
73+
74+
>>> client.documents.upload("http://ord.legistar.com/Chicago/attachments/e3a0cbcb-044d-4ec3-9848-23c5692b1943.pdf")
75+
7276
.. function:: client.documents.upload_directory(pdf, source=None, description=None, related_article=None, published_url=None, access='private', project=None, data=None, secure=False)
7377

7478
Searches through the provided path and attempts to upload all the PDFs it can find. Metadata provided to the other keyword arguments will be recorded for all uploads. Returns a list of document objects that are created. Be warned, this will upload any documents in directories inside the path you specify.
@@ -138,7 +142,7 @@ Metadata
138142
>>> obj.file_hash
139143
'872b9b858f5f3e6bb6086fec7f05dd464b60eb26'
140144

141-
You could recreate this hexadecimal hash yourself using the `SHA-1 algorithm <https://en.wikipedia.org/wiki/SHA-1>`_.
145+
You could recreate this hexadecimal hash yourself using the `SHA-1 algorithm <https://en.wikipedia.org/wiki/SHA-1>`_.
142146

143147
>>> import hashlib
144148
>>> hashlib.sha1(obj.pdf).hexdigest()
@@ -154,7 +158,7 @@ Metadata
154158

155159
.. attribute:: document_obj.full_text_url
156160

157-
Returns the URL that contains the full text of the document, as extracted from the original PDF by DocumentCloud.
161+
Returns the URL that contains the full text of the document, as extracted from the original PDF by DocumentCloud.
158162

159163
.. method:: document_obj.get_page_text(page)
160164

@@ -266,4 +270,3 @@ Metadata
266270
.. attribute:: document_obj.updated_at
267271

268272
The date and time that the document was last updated, in Python's datetime format.
269-

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
setup(
55
name='python-documentcloud',
6-
version='1.0.1',
6+
version='1.0.2',
77
description='A simple Python wrapper for the DocumentCloud API',
88
author='Ben Welsh',
99
author_email='[email protected]',

0 commit comments

Comments
 (0)