Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

0.4.9 - fix pdftotext requirement

  • Loading branch information...
commit 3c2550059664787859288902a7932c56935fee22 1 parent c02e5bd
Chris Johnson-Roberson authored
View
4 README.md
@@ -8,7 +8,7 @@ This project is a collaboration between historian [Jo Guldi](http://www.joguldi.
**NOTE:** Paper Machines now bundles Jython 2.7b1 to ensure broader compatibility. If you encounter problems using the extension, please create an issue describing what operating system and version of Java you have installed, and the nature of the issue.
-Additionally, if you have Paper Machines 0.3.6 installed and wish to upgrade to Zotero 4.0, you will need to manually install the new version from <a href="http://www.papermachines.org/download/papermachines-0.4.8.xpi">here</a>. Paper Machines 0.4.x users will receive updates automatically.
+Additionally, if you have Paper Machines 0.3.6 installed and wish to upgrade to Zotero 4.0, you will need to manually install the new version from <a href="http://www.papermachines.org/download/papermachines-0.4.9.xpi">here</a>. Paper Machines 0.4.x users will receive updates automatically.
## Prerequisites
@@ -19,7 +19,7 @@ In order to run Paper Machines, you will need the following (Java should be inst
* Java 6 or higher ([download page](http://java.com/en/download/index.jsp))
## Installation
-Paper Machines should work either in Zotero for Firefox or Zotero Standalone. To install, you must download the <a href="http://www.papermachines.org/download/papermachines-0.4.8.xpi">XPI file</a>. If you wish to use the extension in the Standalone version, right-click on the link and save the XPI file in your Downloads folder. Then, in Zotero Standalone, go to the Tools menu -> Add-Ons. Select the gear icon at the right, then "Install Add-On From File." Navigate to your Downloads folder (or wherever you have saved the XPI file) and open it.
+Paper Machines should work either in Zotero for Firefox or Zotero Standalone. To install, you must download the <a href="http://www.papermachines.org/download/papermachines-0.4.9.xpi">XPI file</a>. If you wish to use the extension in the Standalone version, right-click on the link and save the XPI file in your Downloads folder. Then, in Zotero Standalone, go to the Tools menu -> Add-Ons. Select the gear icon at the right, then "Install Add-On From File." Navigate to your Downloads folder (or wherever you have saved the XPI file) and open it.
## Usage
To begin, right-click (control-click for Mac) on the collection you wish to analyze and select "Extract Texts for Paper Machines." Once the extraction process is complete, this right-click menu will offer several different processes that may be run on a collection, each with an accompanying visualization. Once these processes have been run, selecting "Export Output of Paper Machines..." will allow you to choose which visualizations to export.
View
20 chrome/content/papermachines/processors/extract.py
@@ -53,10 +53,6 @@ class Extract(textprocessor.TextProcessor):
def _basic_params(self):
self.name = 'extract'
self.pdftotext = self.extra_args[0]
- if not os.path.exists(self.pdftotext):
- logging.error('pdftotext not found!')
- sys.exit(1)
-
self.force_update = False
if len(self.extra_args) > 1:
self.force_update = True
@@ -68,6 +64,9 @@ def _basic_params(self):
self.tika = Tika()
def process(self):
+ if not os.path.exists(self.pdftotext):
+ logging.error('pdftotext not found!')
+
logging.info('starting to process')
itemIDs = {}
@@ -115,11 +114,14 @@ def process(self):
filename,
'-',
]
- import_proc = subprocess.Popen(import_args,
- stdout=subprocess.PIPE)
- text += \
- import_proc.communicate()[0].decode('utf-8'
- )
+ try:
+ import_proc = subprocess.Popen(import_args,
+ stdout=subprocess.PIPE)
+ text += \
+ import_proc.communicate()[0].decode('utf-8'
+ )
+ except:
+ logging.error(traceback.format_exc())
logging.info('processed ' + out_file)
with codecs.open(out_file, 'w', encoding='utf-8'
) as f:
View
2  install.rdf
@@ -5,7 +5,7 @@
<Description about="urn:mozilla:install-manifest">
<em:id>papermachines@chrisjr.org</em:id>
<em:name>Paper Machines</em:name>
- <em:version>0.4.8</em:version>
+ <em:version>0.4.9</em:version>
<em:description>A Zotero extension for analysis and visualization in the digital humanities.</em:description>
<em:creator>Chris Johnson-Roberson</em:creator>
<em:homepageURL>http://www.papermachines.org/</em:homepageURL>
Please sign in to comment.
Something went wrong with that request. Please try again.