├── .gitignore
├── .gitmodules
├── BatchTestSuite.php
├── Doxyfile
├── Guardfile
├── LICENSE
├── README.md
├── UnitTestBootstrap.php
├── assets.yml
├── composer.json
├── composer.lock
├── composer.phar
├── config
├── application.config.php
└── autoload
│ ├── .gitignore
│ ├── README.md
│ ├── global.php
│ ├── local.php.dist
│ ├── slm_queue_doctrine.global.php
│ └── zenddevelopertools.local.php.dist
├── docs
├── fonts
│ ├── README.md
│ └── icomoon
│ │ ├── Read Me.txt
│ │ ├── fonts
│ │ ├── icomoon.dev.svg
│ │ ├── icomoon.eot
│ │ ├── icomoon.svg
│ │ ├── icomoon.ttf
│ │ └── icomoon.woff
│ │ ├── index.html
│ │ ├── license.txt
│ │ ├── lte-ie7.js
│ │ └── style.css
├── init.d
│ ├── README.md
│ └── xmlps-queues
└── xmlps.conf
├── init_autoloader.php
├── javascript
├── footable.js
├── jquery-2.0.3.js
├── jquery.autocomplete.js
└── script.js
├── module
├── Admin
│ ├── Module.php
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── Admin
│ │ │ ├── Controller
│ │ │ ├── SystemLogController.php
│ │ │ └── UserManagementController.php
│ │ │ └── Form
│ │ │ ├── UserEditForm.php
│ │ │ └── UserRemovalForm.php
│ ├── test
│ │ └── AdminTest
│ │ │ └── Controller
│ │ │ ├── SystemLogControllerTest.php
│ │ │ └── UserManagementControllerTest.php
│ └── view
│ │ └── admin
│ │ ├── system-log
│ │ └── list.phtml
│ │ └── user-management
│ │ ├── edit.phtml
│ │ ├── list.phtml
│ │ └── remove.phtml
├── Api
│ ├── Module.php
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── Api
│ │ │ └── Controller
│ │ │ ├── JobController.php
│ │ │ └── SiteController.php
│ └── test
│ │ └── ApiTest
│ │ └── Controller
│ │ ├── JobControllerTest.php
│ │ └── SiteControllerTest.php
├── Application
│ ├── Module.php
│ ├── config
│ │ └── module.config.php
│ ├── language
│ │ ├── en_US.mo
│ │ └── en_US.po
│ ├── src
│ │ └── Application
│ │ │ ├── Controller
│ │ │ └── IndexController.php
│ │ │ ├── Entity
│ │ │ └── Log.php
│ │ │ └── Model
│ │ │ └── DAO
│ │ │ └── LogDAO.php
│ ├── test
│ │ ├── ApplicationTest
│ │ │ └── Controller
│ │ │ │ └── IndexControllerTest.php
│ │ └── Entity
│ │ │ └── LogTest.php
│ └── view
│ │ ├── application
│ │ └── index
│ │ │ └── index.phtml
│ │ ├── error
│ │ ├── 404.phtml
│ │ └── index.phtml
│ │ ├── layout
│ │ ├── editor.phtml
│ │ └── layout.phtml
│ │ └── partial
│ │ └── paginator.phtml
├── BibtexConversion
│ ├── Module.php
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── BibtexConversion
│ │ │ └── Model
│ │ │ ├── Converter
│ │ │ └── Bibtex.php
│ │ │ └── Queue
│ │ │ └── Job
│ │ │ └── BibtexJob.php
│ └── test
│ │ ├── BibtexConversionTest
│ │ └── Model
│ │ │ ├── Converter
│ │ │ └── BibtexTest.php
│ │ │ └── Queue
│ │ │ └── BibtexJobTest.php
│ │ └── assets
│ │ └── document.bib.xml
├── BibtexreferencesConversion
│ ├── Module.php
│ ├── assets
│ │ ├── biblatex2xml.xsl
│ │ ├── document.bib.xml
│ │ └── document.xml
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── BibtexreferencesConversion
│ │ │ └── Model
│ │ │ ├── Converter
│ │ │ └── Bibtexreferences.php
│ │ │ └── Queue
│ │ │ └── Job
│ │ │ └── BibtexreferencesJob.php
│ └── test
│ │ ├── BibtexreferencesConversionTest
│ │ └── Model
│ │ │ ├── Converter
│ │ │ └── BibtexreferencesTest.php
│ │ │ └── Queue
│ │ │ └── BibtexreferencesJobTest.php
│ │ └── assets
│ │ ├── document.bib.xml
│ │ └── document.xml
├── Cermine
│ ├── Module.php
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── Cermine
│ │ │ └── Model
│ │ │ ├── Converter
│ │ │ └── Cermine.php
│ │ │ └── Queue
│ │ │ └── Job
│ │ │ └── CermineJob.php
│ └── test
│ │ ├── CermineTest
│ │ └── Model
│ │ │ ├── Converter
│ │ │ └── CermineTest.php
│ │ │ └── Queue
│ │ │ └── CermineJobTest.php
│ │ └── assets
│ │ ├── example1.pdf
│ │ ├── example2.pdf
│ │ └── example3.pdf
├── CitationstyleConversion
│ ├── Module.php
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── CitationstyleConversion
│ │ │ └── Model
│ │ │ ├── Citationstyles.php
│ │ │ ├── Converter
│ │ │ └── Pandoc.php
│ │ │ ├── Queue
│ │ │ └── Job
│ │ │ │ └── CitationstyleJob.php
│ │ │ └── Validator
│ │ │ └── Title.php
│ └── test
│ │ ├── CitationstyleConversion
│ │ └── Model
│ │ │ ├── CitationstylesTest.php
│ │ │ ├── Converter
│ │ │ └── PandocTest.php
│ │ │ └── Queue
│ │ │ └── CitationstyleJobTest.php
│ │ └── assets
│ │ ├── document.bib
│ │ ├── document.xml
│ │ └── html.zip
├── DocxConversion
│ ├── Module.php
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── DocxConversion
│ │ │ └── Model
│ │ │ ├── Converter
│ │ │ └── Unoconv.php
│ │ │ └── Queue
│ │ │ └── Job
│ │ │ └── DocxJob.php
│ └── test
│ │ ├── DocxConversionTest
│ │ └── Model
│ │ │ ├── Converter
│ │ │ └── UnoconvTest.php
│ │ │ └── Queue
│ │ │ └── DocxJobTest.php
│ │ └── assets
│ │ └── document.odt
├── EpubConversion
│ ├── Module.php
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── EpubConversion
│ │ │ └── Model
│ │ │ ├── Converter
│ │ │ └── Epub.php
│ │ │ └── Queue
│ │ │ └── Job
│ │ │ └── EpubJob.php
│ └── test
│ │ ├── EpubConversionTest
│ │ └── Model
│ │ │ ├── Converter
│ │ │ ├── EpubGraphicsTest.php
│ │ │ └── EpubTest.php
│ │ │ └── Queue
│ │ │ └── EpubJobTest.php
│ │ └── assets
│ │ ├── document.xml
│ │ ├── eeg_comicsans.xml
│ │ └── eeg_media
│ │ └── media
│ │ ├── image1.png
│ │ ├── image1.wmf
│ │ ├── image2.png
│ │ ├── image2.wmf
│ │ ├── image3.png
│ │ ├── image3.wmf
│ │ ├── image4.png
│ │ └── image4.wmf
├── GrobidConversion
│ ├── Module.php
│ ├── assets
│ │ └── grobid-jats.xsl
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── GrobidConversion
│ │ │ └── Model
│ │ │ ├── Converter
│ │ │ └── Grobid.php
│ │ │ └── Queue
│ │ │ └── Job
│ │ │ └── GrobidJob.php
│ └── test
│ │ ├── GrobidConversionTest
│ │ └── Model
│ │ │ ├── Converter
│ │ │ └── GrobidTest.php
│ │ │ └── Queue
│ │ │ └── GrobidJobTest.php
│ │ └── assets
│ │ └── document.pdf
├── HtmlConversion
│ ├── Module.php
│ ├── assets
│ │ ├── html.xsl
│ │ └── html
│ │ │ ├── css
│ │ │ └── article.css
│ │ │ └── js
│ │ │ └── article.js
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── HtmlConversion
│ │ │ └── Model
│ │ │ ├── Converter
│ │ │ └── Html.php
│ │ │ └── Queue
│ │ │ └── Job
│ │ │ └── HtmlJob.php
│ └── test
│ │ ├── HtmlConversionTest
│ │ └── Model
│ │ │ ├── Converter
│ │ │ └── HtmlTest.php
│ │ │ └── Queue
│ │ │ └── HtmlJobTest.php
│ │ └── assets
│ │ └── document.xml
├── Manager
│ ├── Module.php
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── Manager
│ │ │ ├── Controller
│ │ │ └── ManagerController.php
│ │ │ ├── Entity
│ │ │ ├── Document.php
│ │ │ ├── Job.php
│ │ │ └── Queue.php
│ │ │ ├── Form
│ │ │ ├── UploadForm.php
│ │ │ └── UploadFormInputFilter.php
│ │ │ └── Model
│ │ │ ├── Converter
│ │ │ ├── AbstractConverter.php
│ │ │ └── ConverterInterface.php
│ │ │ ├── DAO
│ │ │ ├── DocumentDAO.php
│ │ │ └── JobDAO.php
│ │ │ └── Queue
│ │ │ ├── Job
│ │ │ ├── AbstractQueueJob.php
│ │ │ └── JobInterface.php
│ │ │ └── Manager.php
│ ├── test
│ │ ├── ManagerTest
│ │ │ ├── Controller
│ │ │ │ └── ManagerControllerTest.php
│ │ │ └── Entity
│ │ │ │ ├── DocumentEntityTest.php
│ │ │ │ └── JobEntityTest.php
│ │ └── assets
│ │ │ ├── document.odt
│ │ │ └── document.xml
│ └── view
│ │ └── manager
│ │ └── manager
│ │ ├── details.phtml
│ │ ├── list.phtml
│ │ └── upload.phtml
├── MergeXMLOutputs
│ ├── Module.php
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── MergeXMLOutputs
│ │ │ └── Model
│ │ │ ├── Converter
│ │ │ └── Merge.php
│ │ │ └── Queue
│ │ │ └── Job
│ │ │ └── MergeJob.php
│ └── test
│ │ ├── MergeXMLOutputsTest
│ │ └── Model
│ │ │ ├── Converter
│ │ │ └── MergeTest.php
│ │ │ └── Queue
│ │ │ └── MergeJobTest.php
│ │ └── assets
│ │ ├── document_cermine_out.xml
│ │ ├── document_grobid_out.xml
│ │ ├── document_nlm_out.xml
│ │ ├── eeg_cermine_out.xml
│ │ ├── eeg_nlm_out.xml
│ │ └── metadata.json
├── NERExtraction
│ ├── Module.php
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── NERExtraction
│ │ │ └── Model
│ │ │ ├── Converter
│ │ │ └── NERExtractor.php
│ │ │ └── Queue
│ │ │ └── Job
│ │ │ └── NERExtractionJob.php
│ └── test
│ │ ├── NERExtractionTest
│ │ └── Model
│ │ │ ├── Converter
│ │ │ └── NERExtractorTest.php
│ │ │ └── Queue
│ │ │ └── NERExtractionJobTest.php
│ │ └── assets
│ │ └── document.xml
├── NlmxmlConversion
│ ├── Module.php
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── NlmxmlConversion
│ │ │ └── Model
│ │ │ ├── Converter
│ │ │ └── Metypeset.php
│ │ │ └── Queue
│ │ │ └── Job
│ │ │ └── NlmxmlJob.php
│ └── test
│ │ ├── NlmxmlConversionTest
│ │ └── Model
│ │ │ ├── Converter
│ │ │ └── MetypesetTest.php
│ │ │ └── Queue
│ │ │ └── NlmxmlJobTest.php
│ │ └── assets
│ │ └── document.docx
├── ParsCitConversion
│ ├── Module.php
│ ├── assets
│ │ └── parsCit.xsl
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── ParsCitConversion
│ │ │ └── Model
│ │ │ ├── Converter
│ │ │ └── ParsCit.php
│ │ │ └── Queue
│ │ │ └── Job
│ │ │ └── ParsCitJob.php
│ └── test
│ │ ├── ParsCitConversionTest
│ │ └── Model
│ │ │ ├── Converter
│ │ │ └── ParsCitTest.php
│ │ │ └── Queue
│ │ │ └── ParsCitJobTest.php
│ │ └── assets
│ │ └── references.txt
├── PathFinder
│ ├── Module.php
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── PathFinder
│ │ │ └── Model
│ │ │ └── Queue
│ │ │ └── Job
│ │ │ └── PathFinderJob.php
│ └── test
│ │ ├── PathFinder
│ │ └── Model
│ │ │ └── Queue
│ │ │ ├── PathFinderPdfJobTest.php
│ │ │ └── PathFinderWpJobTest.php
│ │ └── assets
│ │ ├── document.odt
│ │ └── document.pdf
├── PdfConversion
│ ├── Module.php
│ ├── assets
│ │ ├── wkhtmltopdf-0.11.0_rc1-amd64
│ │ └── wkhtmltopdf-0.11.0_rc1-i386
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── PdfConversion
│ │ │ └── Model
│ │ │ ├── Converter
│ │ │ └── Pdf.php
│ │ │ └── Queue
│ │ │ └── Job
│ │ │ └── PdfJob.php
│ └── test
│ │ ├── PdfConversionTest
│ │ └── Model
│ │ │ ├── Converter
│ │ │ └── PdfTest.php
│ │ │ └── Queue
│ │ │ └── PdfJobTest.php
│ │ └── assets
│ │ └── html.zip
├── ReferencesConversion
│ ├── Module.php
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── ReferencesConversion
│ │ │ └── Model
│ │ │ ├── Converter
│ │ │ └── References.php
│ │ │ └── Queue
│ │ │ └── Job
│ │ │ └── ReferencesJob.php
│ └── test
│ │ ├── ReferencesConversionTest
│ │ └── Model
│ │ │ ├── Converter
│ │ │ └── ReferencesTest.php
│ │ │ └── Queue
│ │ │ └── ReferencesJobTest.php
│ │ └── assets
│ │ ├── document.xml
│ │ └── document_from_pdf.xml
├── User
│ ├── Module.php
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── User
│ │ │ ├── Controller
│ │ │ └── UserController.php
│ │ │ ├── Entity
│ │ │ └── User.php
│ │ │ ├── Event
│ │ │ └── Handler
│ │ │ │ └── UserRegisterHandler.php
│ │ │ ├── Form
│ │ │ ├── ApiAuthTokenForm.php
│ │ │ ├── LoginForm.php
│ │ │ ├── LoginFormInputFilter.php
│ │ │ ├── PasswordResetForm.php
│ │ │ ├── PasswordResetFormInputFilter.php
│ │ │ ├── RegistrationForm.php
│ │ │ └── RegistrationFormInputFilter.php
│ │ │ └── Model
│ │ │ └── DAO
│ │ │ └── UserDAO.php
│ ├── test
│ │ └── UserTest
│ │ │ ├── Controller
│ │ │ └── UserControllerTest.php
│ │ │ ├── Entity
│ │ │ └── UserEntityTest.php
│ │ │ └── Form
│ │ │ ├── LoginFormInputFilterTest.php
│ │ │ ├── PasswordResetFormInputFilterTest.php
│ │ │ └── RegistrationFormInputFilterTest.php
│ └── view
│ │ ├── _sideBar.phtml
│ │ └── user
│ │ └── user
│ │ ├── index.phtml
│ │ └── settings.phtml
├── WpPdfConversion
│ ├── Module.php
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── WpPdfConversion
│ │ │ └── Model
│ │ │ └── Queue
│ │ │ └── Job
│ │ │ └── WpPdfJob.php
│ └── test
│ │ ├── WpPdfConversionTest
│ │ └── Model
│ │ │ ├── Converter
│ │ │ └── UnoconvTest.php
│ │ │ └── Queue
│ │ │ └── WpPdfJobTest.php
│ │ └── assets
│ │ └── document.odt
├── XmlFinal
│ ├── Module.php
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── XmlFinal
│ │ │ └── Model
│ │ │ ├── Converter
│ │ │ └── XmlFinal.php
│ │ │ └── Queue
│ │ │ └── Job
│ │ │ └── XmlFinalJob.php
│ └── test
│ │ ├── XmlFinalTest
│ │ └── Model
│ │ │ └── Converter
│ │ │ └── XmlFinalTest.php
│ │ └── assets
│ │ ├── document-stage-14.xml
│ │ └── document-stage-5.xml
├── XmpConversion
│ ├── Module.php
│ ├── autoload_classmap.php
│ ├── config
│ │ └── module.config.php
│ ├── src
│ │ └── XmpConversion
│ │ │ └── Model
│ │ │ ├── Converter
│ │ │ └── Xmp.php
│ │ │ └── Queue
│ │ │ └── Job
│ │ │ └── XmpJob.php
│ └── test
│ │ ├── XmpConversionTest
│ │ └── Model
│ │ │ ├── Converter
│ │ │ └── XmpTest.php
│ │ │ └── Queue
│ │ │ └── XmpJobTest.php
│ │ └── assets
│ │ ├── document.pdf
│ │ ├── document.xml
│ │ └── html.zip
└── ZipConversion
│ ├── Module.php
│ ├── autoload_classmap.php
│ ├── config
│ └── module.config.php
│ ├── src
│ └── ZipConversion
│ │ └── Model
│ │ └── Queue
│ │ └── Job
│ │ └── ZipJob.php
│ └── test
│ └── ZipConversionTest
│ └── Model
│ └── Queue
│ └── ZipJobTest.php
├── phpunit.xml
├── public
├── .htaccess
├── css
│ └── style.min.css
├── favicon.ico
├── fonts
│ ├── FontAwesome.otf
│ ├── fontawesome-webfont.eot
│ ├── fontawesome-webfont.svg
│ ├── fontawesome-webfont.ttf
│ ├── fontawesome-webfont.woff
│ ├── fontawesome-webfont.woff2
│ ├── icons
│ │ ├── icomoon.dev.svg
│ │ ├── icomoon.eot
│ │ ├── icomoon.svg
│ │ ├── icomoon.ttf
│ │ └── icomoon.woff
│ ├── inika-bold-webfont.eot
│ ├── inika-bold-webfont.svg
│ ├── inika-bold-webfont.ttf
│ ├── inika-bold-webfont.woff
│ ├── inika-regular-webfont.eot
│ ├── inika-regular-webfont.svg
│ ├── inika-regular-webfont.ttf
│ ├── inika-regular-webfont.woff
│ ├── oswald-bold-webfont.eot
│ ├── oswald-bold-webfont.svg
│ ├── oswald-bold-webfont.ttf
│ ├── oswald-bold-webfont.woff
│ ├── oswald-light-webfont.eot
│ ├── oswald-light-webfont.svg
│ ├── oswald-light-webfont.ttf
│ ├── oswald-light-webfont.woff
│ ├── oswald-regular-webfont.eot
│ ├── oswald-regular-webfont.svg
│ ├── oswald-regular-webfont.ttf
│ └── oswald-regular-webfont.woff
├── img
│ ├── logo-mobile.png
│ ├── logo-tablet.png
│ └── logo.png
├── index.php
├── js
│ └── script.min.js
└── texture
│ ├── css
│ ├── font-awesome.min.css
│ ├── substance.css
│ ├── texture-pagestyle.css
│ ├── texture-reset.css
│ └── texture.css
│ ├── fonts
│ ├── FontAwesome.otf
│ ├── fontawesome-webfont.eot
│ ├── fontawesome-webfont.svg
│ ├── fontawesome-webfont.ttf
│ ├── fontawesome-webfont.woff
│ └── fontawesome-webfont.woff2
│ └── js
│ ├── app.js
│ ├── editor.js
│ ├── fetch.min.js
│ ├── jquery.min.js
│ ├── promise.min.js
│ ├── store.js
│ ├── substance.js
│ └── texture.js
├── start_queues.sh
├── style
├── css
│ ├── jquery.autocomplete.css
│ ├── scss
│ │ └── style.css
│ └── style.css
└── scss
│ ├── _colors.scss
│ ├── _fonts.scss
│ ├── _footable.scss
│ ├── _forms.scss
│ ├── _grid-settings.scss
│ ├── _icons.scss
│ ├── _mixins.scss
│ ├── _variables.scss
│ ├── bourbon
│ ├── _bourbon-deprecated-upcoming.scss
│ ├── _bourbon.scss
│ ├── addons
│ │ ├── _button.scss
│ │ ├── _clearfix.scss
│ │ ├── _font-family.scss
│ │ ├── _hide-text.scss
│ │ ├── _html5-input-types.scss
│ │ ├── _position.scss
│ │ ├── _prefixer.scss
│ │ ├── _retina-image.scss
│ │ ├── _size.scss
│ │ ├── _timing-functions.scss
│ │ └── _triangle.scss
│ ├── css3
│ │ ├── _animation.scss
│ │ ├── _appearance.scss
│ │ ├── _backface-visibility.scss
│ │ ├── _background-image.scss
│ │ ├── _background.scss
│ │ ├── _border-image.scss
│ │ ├── _border-radius.scss
│ │ ├── _box-sizing.scss
│ │ ├── _columns.scss
│ │ ├── _flex-box.scss
│ │ ├── _font-face.scss
│ │ ├── _hidpi-media-query.scss
│ │ ├── _image-rendering.scss
│ │ ├── _inline-block.scss
│ │ ├── _keyframes.scss
│ │ ├── _linear-gradient.scss
│ │ ├── _perspective.scss
│ │ ├── _placeholder.scss
│ │ ├── _radial-gradient.scss
│ │ ├── _transform.scss
│ │ ├── _transition.scss
│ │ └── _user-select.scss
│ ├── functions
│ │ ├── _compact.scss
│ │ ├── _flex-grid.scss
│ │ ├── _grid-width.scss
│ │ ├── _linear-gradient.scss
│ │ ├── _modular-scale.scss
│ │ ├── _px-to-em.scss
│ │ ├── _radial-gradient.scss
│ │ ├── _tint-shade.scss
│ │ └── _transition-property-name.scss
│ └── helpers
│ │ ├── _deprecated-webkit-gradient.scss
│ │ ├── _gradient-positions-parser.scss
│ │ ├── _linear-positions-parser.scss
│ │ ├── _radial-arg-parser.scss
│ │ ├── _radial-positions-parser.scss
│ │ ├── _render-gradients.scss
│ │ └── _shape-size-stripper.scss
│ ├── neat
│ ├── _neat-helpers.scss
│ ├── _neat.scss
│ ├── functions
│ │ ├── _new-breakpoint.scss
│ │ ├── _private.scss
│ │ └── _px-to-em.scss
│ ├── grid
│ │ ├── _fill-parent.scss
│ │ ├── _grid.scss
│ │ ├── _media.scss
│ │ ├── _omega.scss
│ │ ├── _outer-container.scss
│ │ ├── _pad.scss
│ │ ├── _private.scss
│ │ ├── _reset.scss
│ │ ├── _row.scss
│ │ ├── _shift.scss
│ │ ├── _span-columns.scss
│ │ ├── _to-deprecate.scss
│ │ └── _visual-grid.scss
│ └── settings
│ │ ├── _grid.scss
│ │ └── _visual-grid.scss
│ └── style.scss
├── unittest.sh
├── var
├── cache
│ └── .gitignore
├── doctrine
│ └── .gitignore
├── documents
│ └── .gitignore
└── uploads
│ └── .gitignore
└── vendor
├── .gitignore
├── README.md
└── xmlps
├── autoload_classmap.php
└── library
├── Command
└── Command.php
├── Controller
└── Plugin
│ └── ControllerAcl.php
├── DAO
├── DAO.php
└── DAOInterface.php
├── DataObject
└── DataObject.php
├── Doctrine
└── Listener
│ └── ServiceManagerListener.php
├── Event
└── Handler
│ ├── AclDispatchHandler.php
│ └── FlashMessengerRenderHandler.php
├── Libxml
└── Libxml.php
├── Log
├── Logger.php
└── Writer
│ └── Doctrine.php
└── UnitTest
├── ControllerTest.php
├── ModelTest.php
└── TestHelper.php
/.gitignore:
--------------------------------------------------------------------------------
1 | html
2 | vendor/bin
3 | .sass-cache
4 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "vendor/ZF2"]
2 | path = vendor/ZF2
3 | url = https://github.com/zendframework/zf2.git
4 |
--------------------------------------------------------------------------------
/Guardfile:
--------------------------------------------------------------------------------
1 | # More info at https://github.com/guard/guard#readme
2 |
3 | # SASS
4 | guard :sass, :input => "style/scss", :output => "style/css"
5 |
6 | # JAMMIT
7 | guard :jammit, :config_path => "assets.yml", :output_folder => "." do
8 | watch(%r{(?:style|javascript)(/.+)\.(?:css|js)}) { |m| m[0] unless m[1] =~ /\/\./ }
9 | end
10 |
--------------------------------------------------------------------------------
/assets.yml:
--------------------------------------------------------------------------------
1 | gzip_assets: off
2 | javascript_compressor: uglifier
3 |
4 | stylesheets:
5 | public/css/style.min:
6 | - style/css/jquery.autocomplete.css
7 | - style/css/style.css
8 |
9 |
10 | javascripts:
11 | public/js/script.min:
12 | - javascript/jquery-2.0.3.js
13 | - javascript/footable.js
14 | - javascript/jquery.autocomplete.js
15 | - javascript/script.js
16 |
--------------------------------------------------------------------------------
/composer.phar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/composer.phar
--------------------------------------------------------------------------------
/config/autoload/.gitignore:
--------------------------------------------------------------------------------
1 | local.php
2 | *.local.php
3 |
--------------------------------------------------------------------------------
/config/autoload/README.md:
--------------------------------------------------------------------------------
1 | About this directory:
2 | =====================
3 |
4 | By default, this application is configured to load all configs in
5 | `./config/autoload/{,*.}{global,local}.php`. Doing this provides a
6 | location for a developer to drop in configuration override files provided by
7 | modules, as well as cleanly provide individual, application-wide config files
8 | for things like database connections, etc.
9 |
--------------------------------------------------------------------------------
/config/autoload/local.php.dist:
--------------------------------------------------------------------------------
1 | array(
5 | 'ZendDeveloperTools',
6 | ),
7 | 'conversion' => array(
8 | 'docx' => array(
9 | 'unoconv' => array(
10 | 'command' => 'unoconv',
11 | ),
12 | ),
13 | ),
14 | 'doctrine' => array(
15 | 'connection' => array(
16 | 'orm_default' => array(
17 | 'params' => array(
18 | 'user' => '',
19 | 'password' => '',
20 | ),
21 | ),
22 | ),
23 | ),
24 | 'log' => array(
25 | 'level' => 4,
26 | ),
27 | );
28 |
--------------------------------------------------------------------------------
/config/autoload/slm_queue_doctrine.global.php:
--------------------------------------------------------------------------------
1 | array(
4 | 'resources' => array(
5 | 'controller:SlmQueueDoctrine\Controller\DoctrineWorkerController:process',
6 | ),
7 | 'rules' => array(
8 | array('allow', 'guest', 'controller:SlmQueueDoctrine\Controller\DoctrineWorkerController:process'),
9 | ),
10 | ),
11 | 'slm_queue' => array(
12 | 'doctrine' => array(
13 | 'connection' => 'doctrine.connection.orm_default',
14 | 'table_name' => 'queue',
15 | ),
16 | 'queue_manager' => array(
17 | 'factories' => array(
18 | 'pathfinder' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory',
19 | 'docx' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory',
20 | 'wppdf' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory',
21 | 'nlmxml' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory',
22 | 'references' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory',
23 | 'bibtex' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory',
24 | 'bibtexreferences' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory',
25 | 'html' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory',
26 | 'epub' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory',
27 | 'citationstyle' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory',
28 | 'pdf' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory',
29 | 'xmp' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory',
30 | 'zip' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory',
31 | 'cermine' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory',
32 | 'merge' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory',
33 | 'ner' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory',
34 | 'parscit' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory',
35 | 'grobid' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory',
36 | 'xmlfinal' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory',
37 | )
38 | )
39 | )
40 | );
41 |
--------------------------------------------------------------------------------
/docs/fonts/README.md:
--------------------------------------------------------------------------------
1 | The icon font used is called Icomoon (http://icomoon.io). icomoon/index.html lists all the icons available.
2 |
--------------------------------------------------------------------------------
/docs/fonts/icomoon/Read Me.txt:
--------------------------------------------------------------------------------
1 | To modify your generated font, use the *dev.svg* file, located in the *fonts* folder in this package. You can import this dev.svg file to the IcoMoon app. All the tags (class names) and the Unicode points of your glyphs are saved in this file.
2 |
3 | See the documentation for more info on how to use this package: http://icomoon.io/#docs/font-face
--------------------------------------------------------------------------------
/docs/fonts/icomoon/fonts/icomoon.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/docs/fonts/icomoon/fonts/icomoon.eot
--------------------------------------------------------------------------------
/docs/fonts/icomoon/fonts/icomoon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/docs/fonts/icomoon/fonts/icomoon.ttf
--------------------------------------------------------------------------------
/docs/fonts/icomoon/fonts/icomoon.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/docs/fonts/icomoon/fonts/icomoon.woff
--------------------------------------------------------------------------------
/docs/fonts/icomoon/license.txt:
--------------------------------------------------------------------------------
1 | Icon Set: IcoMoon - Free -- http://keyamoon.com/icomoon/
2 | License: CC BY 3.0 -- http://creativecommons.org/licenses/by/3.0/
--------------------------------------------------------------------------------
/docs/init.d/README.md:
--------------------------------------------------------------------------------
1 | init.d start script for the queues.
2 |
--------------------------------------------------------------------------------
/docs/xmlps.conf:
--------------------------------------------------------------------------------
1 |
2 | ServerAdmin webmaster@localhost
3 |
4 | DocumentRoot /var/www/html/public
5 |
6 | Options FollowSymLinks
7 | AllowOverride All
8 |
9 |
10 | Options -Indexes +FollowSymLinks +MultiViews
11 | AllowOverride All
12 | Order allow,deny
13 | allow from all
14 |
15 |
16 |
17 |
18 | ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
19 |
20 | AllowOverride None
21 | Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
22 | Order allow,deny
23 | Allow from all
24 |
25 |
26 | ErrorLog ${APACHE_LOG_DIR}/error.log
27 |
28 | # Possible values include: debug, info, notice, warn, error, crit,
29 | # alert, emerg.
30 | LogLevel warn
31 |
32 | CustomLog ${APACHE_LOG_DIR}/access.log combined
33 |
34 | Alias /doc/ "/usr/share/doc/"
35 |
36 | Options Indexes MultiViews FollowSymLinks
37 | AllowOverride None
38 | Order deny,allow
39 | Deny from all
40 | Allow from 127.0.0.0/255.0.0.0 ::1/128
41 |
42 |
43 |
--------------------------------------------------------------------------------
/init_autoloader.php:
--------------------------------------------------------------------------------
1 | add('Zend', $zf2Path);
37 | } else {
38 | include $zf2Path . '/Zend/Loader/AutoloaderFactory.php';
39 | Zend\Loader\AutoloaderFactory::factory(array(
40 | 'Zend\Loader\StandardAutoloader' => array(
41 | 'autoregister_zf' => true
42 | )
43 | ));
44 | }
45 | }
46 |
47 | if (!class_exists('Zend\Loader\AutoloaderFactory')) {
48 | throw new RuntimeException('Unable to load ZF2. Run `php composer.phar install` or define a ZF2_PATH environment variable.');
49 | }
50 |
--------------------------------------------------------------------------------
/javascript/jquery.autocomplete.js:
--------------------------------------------------------------------------------
1 | /var/www/html/vendor/dyve/jquery-autocomplete/src/jquery.autocomplete.js
--------------------------------------------------------------------------------
/javascript/script.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 | // Initialize Footable plugin
3 | $('.footable').footable(
4 | {
5 | addRowToggle: true
6 | }
7 | );
8 |
9 | // Initialize the citationstyle autocomplete plugin
10 | $('input[name="citationStyle"]').autocomplete(
11 | '/api/site/citationStyleAutocomplete',
12 | {
13 | maxItemsToShow: 20,
14 | minchars: 2,
15 | queryParamName: 'fragment',
16 | remoteDataType: 'json',
17 | processData: function(data) {
18 | if (data.status == 'success') {
19 | return data.autocomplete;
20 | }
21 | else {
22 | return [];
23 | }
24 | }
25 | }
26 | );
27 | });
28 |
--------------------------------------------------------------------------------
/module/Admin/autoload_classmap.php:
--------------------------------------------------------------------------------
1 | logger = $logger;
28 | $this->translator = $translator;
29 | $this->logDAO = $logDAO;
30 | }
31 |
32 | /**
33 | * List log entries
34 | *
35 | * @return mixed Array containing view variables
36 | */
37 | public function listAction()
38 | {
39 | // Get the paginator
40 | $paginator = $this->logDAO->getLogPaginator();
41 | $page = $this->params()->fromRoute('page');
42 | $paginator ->setCurrentPageNumber($page);
43 | $paginator->setItemCountPerPage(50);
44 |
45 | // Display error if we got no messages
46 | if ($paginator->count() == 0) {
47 | $this->layout()->messages = array(
48 | 'info' => array( $this->translator->translate(
49 | 'admin.log.noEntriesFound'
50 | )),
51 | );
52 | return;
53 | }
54 |
55 | return array(
56 | 'logEntries' => $paginator,
57 | 'priorities' => $this->logger->getPriorities()
58 | );
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/module/Admin/src/Admin/Form/UserRemovalForm.php:
--------------------------------------------------------------------------------
1 | translator = $translator;
20 |
21 | parent::__construct('userRemovalForm');
22 | $this->setAttribute('method', 'post');
23 |
24 | // Add the user id field
25 | $this->add(
26 | array(
27 | 'name' => 'id',
28 | 'type' => '\Zend\Form\Element\Hidden',
29 | )
30 | );
31 |
32 | // Add the submit button
33 | $this->add(
34 | array(
35 | 'name' => 'submit',
36 | 'type' => '\Zend\Form\Element\Submit',
37 | 'attributes' => array(
38 | 'value' => $this->translator->translate('application.generic.remove'),
39 | )
40 | )
41 | );
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/module/Admin/view/admin/system-log/list.phtml:
--------------------------------------------------------------------------------
1 | headTitle($this->translate('application.layout.systemLog.list')); ?>
2 |
3 |
4 | logEntries) {
6 | echo '';
23 |
24 | echo $this->paginationControl(
25 | $this->logEntries,
26 | 'sliding',
27 | array('partial/paginator.phtml', 'Application'),
28 | array('route' => 'admin/system_log')
29 | );
30 | }
31 |
32 | ?>
33 |
34 |
--------------------------------------------------------------------------------
/module/Admin/view/admin/user-management/edit.phtml:
--------------------------------------------------------------------------------
1 | headTitle($this->translate('admin.userManagement.edit'));
2 |
3 | if (isset($this->userEditForm)) {
4 | $userEditForm->setAttribute('action', $this->url('admin/user_management', array('action' => 'edit')));
5 | $userEditForm = $this->userEditForm;
6 | $userEditForm->prepare();
7 | $userEditForm = $this->form()->render($userEditForm);
8 | }
9 |
10 | ?>
11 |
12 |
13 | translate('admin.userManagement.edit') ?>
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/module/Admin/view/admin/user-management/remove.phtml:
--------------------------------------------------------------------------------
1 | headTitle($this->translate('admin.userManagement.removeUser'));
3 |
4 | if (isset($this->userRemovalForm)) {
5 | $userRemovalForm->setAttribute('action', $this->url('admin/user_management', array('action' => 'remove')));
6 | $userRemovalForm = $this->userRemovalForm;
7 | $userRemovalForm->prepare();
8 | $userRemovalForm = $this->form()->render($userRemovalForm);
9 | }
10 |
11 | ?>
12 |
13 |
14 |
translate('application.generic.confirm') ?>
15 |
escapeHtml(sprintf($this->translate('admin.userManagement.userRemovalConfirm'), $user->email)) ?>
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/module/Api/autoload_classmap.php:
--------------------------------------------------------------------------------
1 | logger = $logger;
33 | $this->translator = $translator;
34 | $this->citationStyles = $citationStyles;
35 | }
36 |
37 |
38 | /**
39 | * Implements autocomplete functionality for the citationstyle text field
40 | * in the upload form
41 | *
42 | * @return array Array containing a list of titles that match the provided fragment
43 | */
44 | public function citationStyleAutocompleteAction()
45 | {
46 | // Make sure the file content parameter is provided
47 | if (!($fragment = $this->params()->fromQuery('fragment'))) {
48 | return new JsonModel(array(
49 | 'status' => 'error',
50 | 'error' => $this->translator->translate('job.api.error.fragmentParameterMissing')
51 | ));
52 | }
53 |
54 | $citationStyles = $this->citationStyles->getTitleList($fragment);
55 |
56 | return new JsonModel(array(
57 | 'autocomplete' => $citationStyles,
58 | 'status' => 'success'
59 | ));
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/module/Api/test/ApiTest/Controller/SiteControllerTest.php:
--------------------------------------------------------------------------------
1 | citationStyles = $this->sm->get('CitationstyleConversion\Model\Citationstyles');
24 |
25 | $this->resetTestData();
26 | }
27 |
28 | /**
29 | * Tests if the citationstyle autocomplete action works correctly
30 | *
31 | * @return void
32 | */
33 | public function testCitationStyleAutocompleteAction()
34 | {
35 | $this->mockLogin($this->user);
36 | $styleMap = $this->citationStyles->getStyleMap();
37 | $citationStyle = array_pop($styleMap);
38 | $fragment = substr($citationStyle['title'], 0, 3);
39 |
40 | $this->dispatch('/api/site/citationStyleAutocomplete?fragment=' . urlencode($fragment));
41 | $this->assertResponseStatusCode(200);
42 | $response = json_decode($this->getResponse()->getContent());
43 | $this->assertTrue(is_object($response));
44 | $this->assertSame($response->status, 'success');
45 | $this->assertTrue(isset($response->autocomplete));
46 | $this->assertTrue(
47 | (strpos(strtolower($response->autocomplete[0]), strtolower($fragment)) !== false)
48 | );
49 | }
50 |
51 | /**
52 | * Creates test data for this test
53 | *
54 | * @return void
55 | */
56 | protected function createTestData()
57 | {
58 | // Create test user
59 | $this->user = $this->createTestUser();
60 | }
61 |
62 | /**
63 | * Cleans test data after test
64 | *
65 | * @return void
66 | */
67 | protected function cleanTestData()
68 | {
69 | $this->deleteTestUser();
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/module/Application/language/en_US.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/Application/language/en_US.mo
--------------------------------------------------------------------------------
/module/Application/src/Application/Controller/IndexController.php:
--------------------------------------------------------------------------------
1 | getPaginator(
25 | 'SELECT l from Application\Entity\Log l ORDER BY l.id DESC'
26 | );
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/module/Application/test/ApplicationTest/Controller/IndexControllerTest.php:
--------------------------------------------------------------------------------
1 | dispatch('/');
11 | $this->assertResponseStatusCode(200);
12 |
13 | $this->assertModuleName('User');
14 | $this->assertControllerName('User\Controller\User');
15 | $this->assertControllerClass('UserController');
16 | $this->assertMatchedRouteName('home');
17 | }
18 |
19 | /**
20 | * Tests if the service manager provides access to the Logger
21 | *
22 | * @return void
23 | */
24 | public function testLoggerCanBeAccessed()
25 | {
26 | $sm = $this->getApplicationServiceLocator();
27 | $this->assertTrue($sm->get('Logger') instanceof \Xmlps\Logger\Logger);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/module/Application/test/Entity/LogTest.php:
--------------------------------------------------------------------------------
1 | log = new Log;
19 | }
20 |
21 | /**
22 | * Test if all the required properties exist
23 | *
24 | * @return void
25 | */
26 | public function testUserRegistrationDate()
27 | {
28 | $this->assertTrue(property_exists($this->log, 'timestamp'));
29 | $this->assertTrue(property_exists($this->log, 'priority'));
30 | $this->assertTrue(property_exists($this->log, 'message'));
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/module/Application/view/application/index/index.phtml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/Application/view/application/index/index.phtml
--------------------------------------------------------------------------------
/module/Application/view/layout/editor.phtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/module/Application/view/partial/paginator.phtml:
--------------------------------------------------------------------------------
1 | pageCount): ?>
2 |
36 |
37 |
--------------------------------------------------------------------------------
/module/BibtexConversion/Module.php:
--------------------------------------------------------------------------------
1 | array(
28 | __DIR__ . '/autoload_classmap.php'
29 | ),
30 | 'Zend\Loader\StandardAutoloader' => array(
31 | 'namespaces' => array(
32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
33 | ),
34 | ),
35 | );
36 | }
37 |
38 | /**
39 | * Get service config
40 | *
41 | * @return array
42 | */
43 | public function getServiceConfig()
44 | {
45 | return array(
46 | 'factories' => array(
47 | 'BibtexConversion\Model\Converter\Bibtex' => function($sm)
48 | {
49 | $config = $sm->get('Config');
50 | $logger = $sm->get('Logger');
51 | if (!isset($config['conversion']['bibtex']['xml2bib'])) {
52 | throw new \Exception('xml2bib configuration is missing');
53 | }
54 | $config = $config['conversion']['bibtex']['xml2bib'];
55 |
56 | return new Bibtex($config, $logger);
57 | },
58 | ),
59 | );
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/module/BibtexConversion/autoload_classmap.php:
--------------------------------------------------------------------------------
1 | bibtex = $this->sm->get('BibtexConversion\Model\Converter\Bibtex');
26 |
27 | $this->resetTestData();
28 | }
29 |
30 | /**
31 | * Test if the input file validation works properly
32 | *
33 | * @return void
34 | */
35 | public function testInputFileDoesntExist()
36 | {
37 | $this->setExpectedException('Exception');
38 | $this->bibtex->setInputFile($this->testInputFile . rand());
39 | }
40 |
41 | /**
42 | * Test if the bibtex conversion works correctly
43 | *
44 | * @return void
45 | */
46 | public function testConversion()
47 | {
48 | $this->bibtex->setInputFile($this->testInputFile);
49 | $this->bibtex->setOutputFile($this->testOutputFile);
50 | $this->bibtex->convert();
51 |
52 | $this->assertTrue(is_file($this->testOutputFile));
53 | $this->assertTrue($this->bibtex->getStatus());
54 |
55 | $this->assertNotSame(
56 | file_get_contents($this->testInputFile),
57 | file_get_contents($this->testOutputFile)
58 | );
59 |
60 | $finfo = finfo_open(FILEINFO_MIME_TYPE);
61 | $mimeType = finfo_file($finfo, $this->testOutputFile);
62 |
63 | $this->assertSame($mimeType, 'text/plain');
64 | }
65 |
66 | /**
67 | * Remove test data
68 | *
69 | * @return void
70 | */
71 | protected function cleanTestData()
72 | {
73 | @unlink($this->testOutputFile);
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/module/BibtexreferencesConversion/Module.php:
--------------------------------------------------------------------------------
1 | array(
28 | __DIR__ . '/autoload_classmap.php'
29 | ),
30 | 'Zend\Loader\StandardAutoloader' => array(
31 | 'namespaces' => array(
32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
33 | ),
34 | ),
35 | );
36 | }
37 |
38 | /**
39 | * Get service config
40 | *
41 | * @return array
42 | */
43 | public function getServiceConfig()
44 | {
45 | return array(
46 | 'factories' => array(
47 | 'BibtexreferencesConversion\Model\Converter\Bibtexreferences' => function($sm)
48 | {
49 | $config = $sm->get('Config');
50 | $logger = $sm->get('Logger');
51 | if (!isset($config['conversion']['bibtexreferences']['biblatex2xml'])) {
52 | throw new \Exception('biblatex2xml configuration is missing');
53 | }
54 | $config = $config['conversion']['bibtexreferences']['biblatex2xml'];
55 |
56 | return new Bibtexreferences($config, $logger);
57 | },
58 | ),
59 | );
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/module/BibtexreferencesConversion/autoload_classmap.php:
--------------------------------------------------------------------------------
1 | array(
28 | __DIR__ . '/autoload_classmap.php'
29 | ),
30 | 'Zend\Loader\StandardAutoloader' => array(
31 | 'namespaces' => array(
32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
33 | ),
34 | ),
35 | );
36 | }
37 |
38 | /**
39 | * Get service config
40 | *
41 | * @return array
42 | */
43 | public function getServiceConfig()
44 | {
45 | return array(
46 | 'factories' => array(
47 | 'Cermine\Model\Converter\Cermine' => function($sm)
48 | {
49 | $config = $sm->get('Config');
50 | $logger = $sm->get('Logger');
51 | if (!isset($config['conversion']['cermine'])) {
52 | throw new \Exception('CERMINE configuration is missing');
53 | }
54 | $config = $config['conversion']['cermine'];
55 |
56 | return new Cermine($config, $logger);
57 | }
58 | )
59 | );
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/module/Cermine/autoload_classmap.php:
--------------------------------------------------------------------------------
1 | citationStyles = $options['citationStyles'];
24 | }
25 | else {
26 | throw new Exception('An instance of CitationstyleConversion\Model\Citationstyles needs to be provided');
27 | }
28 | }
29 |
30 | protected $messageTemplates = array(
31 | self::MSG_TITLE => 'Invalid citation style',
32 | );
33 |
34 | public function isValid($title)
35 | {
36 | if (!$this->citationStyles->validTitle($title)) {
37 | $this->setValue($title);
38 | $this->error(self::MSG_TITLE);
39 | return false;
40 | }
41 |
42 | return true;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/module/CitationstyleConversion/test/assets/html.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/CitationstyleConversion/test/assets/html.zip
--------------------------------------------------------------------------------
/module/DocxConversion/Module.php:
--------------------------------------------------------------------------------
1 | array(
28 | __DIR__ . '/autoload_classmap.php'
29 | ),
30 | 'Zend\Loader\StandardAutoloader' => array(
31 | 'namespaces' => array(
32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
33 | ),
34 | ),
35 | );
36 | }
37 |
38 | /**
39 | * Get service config
40 | *
41 | * @return array
42 | */
43 | public function getServiceConfig()
44 | {
45 | return array(
46 | 'factories' => array(
47 | 'DocxConversion\Model\Converter\Unoconv' => function($sm)
48 | {
49 | $config = $sm->get('Config');
50 | $logger = $sm->get('Logger');
51 | if (!isset($config['conversion']['docx']['unoconv'])) {
52 | throw new \Exception('Unoconv configuration is missing');
53 | }
54 | $config = $config['conversion']['docx']['unoconv'];
55 |
56 | return new Unoconv($config, $logger);
57 | }
58 | )
59 | );
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/module/DocxConversion/autoload_classmap.php:
--------------------------------------------------------------------------------
1 | sm->get('DocxConversion\Model\Converter\Unoconv');
22 |
23 | // Fetch the document to convert
24 | $unconvertedDocument =
25 | $job->getStageDocument(JOB_CONVERSION_STAGE_WP_IN);
26 | if (!$unconvertedDocument) {
27 | throw new \Exception('Couldn\'t find the stage document');
28 | }
29 |
30 | // Convert the document
31 | $unoconv->setFilter('docx7');
32 | $unoconv->setInputFile($unconvertedDocument->path);
33 | $outputPath = $job->getDocumentPath() . '/document.docx';
34 | $unoconv->setOutputFile($outputPath);
35 | $unoconv->convert();
36 |
37 | if (!$unoconv->getStatus()) {
38 | $job->status = JOB_STATUS_FAILED;
39 | return $job;
40 | }
41 |
42 | $documentDAO = $this->sm->get('Manager\Model\DAO\DocumentDAO');
43 | $docxDocument = $documentDAO->getInstance();
44 | $docxDocument->path = $outputPath;
45 | $docxDocument->mimeType = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
46 | $docxDocument->job = $job;
47 | $docxDocument->conversionStage = JOB_CONVERSION_STAGE_DOCX;
48 |
49 | $job->documents[] = $docxDocument;
50 | $job->conversionStage = JOB_CONVERSION_STAGE_DOCX;
51 |
52 | return $job;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/module/DocxConversion/test/assets/document.odt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/DocxConversion/test/assets/document.odt
--------------------------------------------------------------------------------
/module/EpubConversion/Module.php:
--------------------------------------------------------------------------------
1 | array(
28 | __DIR__ . '/autoload_classmap.php'
29 | ),
30 | 'Zend\Loader\StandardAutoloader' => array(
31 | 'namespaces' => array(
32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
33 | ),
34 | ),
35 | );
36 | }
37 |
38 |
39 | /**
40 | * Get service config
41 | *
42 | * @return array
43 | */
44 | public function getServiceConfig()
45 | {
46 | return array(
47 | 'factories' => array(
48 | 'EpubConversion\Model\Converter\Epub' => function($sm)
49 | {
50 | $config = $sm->get('Config');
51 | $logger = $sm->get('Logger');
52 | if (!isset($config['conversion']['epub'])) {
53 | throw new \Exception('Epub converter configuration is missing');
54 | }
55 | $config = $config['conversion']['epub'];
56 |
57 | return new Epub($config, $logger);
58 | },
59 | ),
60 | );
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/module/EpubConversion/autoload_classmap.php:
--------------------------------------------------------------------------------
1 | sm->get('EpubConversion\Model\Converter\Epub');
25 |
26 | // Fetch the NLMXML document resulting from merge, or from
27 | // reference correction, or as extracted from PDF, in order of
28 | // preference.
29 | $document = $job->getStageDocument(JOB_CONVERSION_STAGE_XML_MERGE);
30 | if (!$document) {
31 | $document =
32 | $job->getStageDocument(JOB_CONVERSION_STAGE_BIBTEXREFERENCES);
33 | }
34 | if (!$document) {
35 | $document =
36 | $job->getStageDocument(JOB_CONVERSION_STAGE_PDF_EXTRACT);
37 | }
38 | if (!$document) {
39 | throw new \Exception('Couldn\'t find the stage document');
40 | }
41 |
42 | $outputFile = $job->getDocumentPath() . '/document.epub';
43 | $epub->setInputFile($document->path);
44 | $epub->setOutputFile($outputFile);
45 | $epub->convert();
46 |
47 | $job->conversionStage = JOB_CONVERSION_STAGE_EPUB;
48 |
49 | if (!$epub->getStatus()) {
50 | $job->status = JOB_STATUS_FAILED;
51 | return $job;
52 | }
53 |
54 | $documentDAO = $this->sm->get('Manager\Model\DAO\DocumentDAO');
55 | $epubDocument = $documentDAO->getInstance();
56 | $epubDocument->path = $outputFile;
57 | $epubDocument->job = $job;
58 | $epubDocument->conversionStage = JOB_CONVERSION_STAGE_EPUB;
59 |
60 | $job->documents[] = $epubDocument;
61 |
62 | return $job;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/module/EpubConversion/test/assets/eeg_media/media/image1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/EpubConversion/test/assets/eeg_media/media/image1.png
--------------------------------------------------------------------------------
/module/EpubConversion/test/assets/eeg_media/media/image1.wmf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/EpubConversion/test/assets/eeg_media/media/image1.wmf
--------------------------------------------------------------------------------
/module/EpubConversion/test/assets/eeg_media/media/image2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/EpubConversion/test/assets/eeg_media/media/image2.png
--------------------------------------------------------------------------------
/module/EpubConversion/test/assets/eeg_media/media/image2.wmf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/EpubConversion/test/assets/eeg_media/media/image2.wmf
--------------------------------------------------------------------------------
/module/EpubConversion/test/assets/eeg_media/media/image3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/EpubConversion/test/assets/eeg_media/media/image3.png
--------------------------------------------------------------------------------
/module/EpubConversion/test/assets/eeg_media/media/image3.wmf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/EpubConversion/test/assets/eeg_media/media/image3.wmf
--------------------------------------------------------------------------------
/module/EpubConversion/test/assets/eeg_media/media/image4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/EpubConversion/test/assets/eeg_media/media/image4.png
--------------------------------------------------------------------------------
/module/EpubConversion/test/assets/eeg_media/media/image4.wmf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/EpubConversion/test/assets/eeg_media/media/image4.wmf
--------------------------------------------------------------------------------
/module/GrobidConversion/Module.php:
--------------------------------------------------------------------------------
1 | array (
26 | __DIR__ . '/autoload_classmap.php'
27 | ),
28 | 'Zend\Loader\StandardAutoloader' => array (
29 | 'namespaces' => array (
30 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__
31 | )
32 | )
33 | );
34 | }
35 |
36 | /**
37 | * Get service config
38 | *
39 | * @return array
40 | */
41 | public function getServiceConfig() {
42 | return array (
43 | 'factories' => array (
44 | 'GrobidConversion\Model\Converter\Grobid' => function ($sm) {
45 | $config = $sm->get ( 'Config' );
46 | $logger = $sm->get ( 'Logger' );
47 |
48 | if (!isset($config['conversion']['grobid'])) {
49 | throw new \Exception('Grobid configuration is missing');
50 | }
51 | $config = $config['conversion']['grobid'];
52 |
53 | return new Grobid ( $config, $logger );
54 | }
55 | )
56 | );
57 | }
58 | }
--------------------------------------------------------------------------------
/module/GrobidConversion/autoload_classmap.php:
--------------------------------------------------------------------------------
1 | sm->get('GrobidConversion\Model\Converter\GrobId');
22 |
23 | // Fetch the document to convert
24 | if (!$pdfDocument = $job->getStageDocument(JOB_CONVERSION_STAGE_PDF_IN)) {
25 | $pdfDocument = $job->getStageDocument(JOB_CONVERSION_STAGE_WP_PDF);
26 | }
27 |
28 | if (!$pdfDocument) {
29 | throw new \Exception('Couldn\'t find the stage document');
30 | }
31 |
32 | $outputPath = $job->getDocumentPath() . '/grobid.xml';
33 |
34 | $job->conversionStage = JOB_CONVERSION_STAGE_GROBID;
35 |
36 | // Convert the document
37 | $grobid->setInputFile($pdfDocument->path);
38 | $grobid->setOutputFile($outputPath);
39 | $grobid->convert();
40 |
41 |
42 | if (!$grobid->getStatus()) {
43 | $job->status = JOB_STATUS_FAILED;
44 | return $job;
45 | }
46 |
47 | $documentDAO = $this->sm->get('Manager\Model\DAO\DocumentDAO');
48 | $teiDocument = $documentDAO->getInstance();
49 | $teiDocument->path = $outputPath;
50 | $teiDocument->job = $job;
51 | $teiDocument->conversionStage = JOB_CONVERSION_STAGE_GROBID;
52 |
53 | $job->documents[] = $teiDocument;
54 | $job->conversionStage = JOB_CONVERSION_STAGE_GROBID;
55 |
56 | return $job;
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/module/GrobidConversion/test/assets/document.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/GrobidConversion/test/assets/document.pdf
--------------------------------------------------------------------------------
/module/HtmlConversion/Module.php:
--------------------------------------------------------------------------------
1 | array(
28 | __DIR__ . '/autoload_classmap.php'
29 | ),
30 | 'Zend\Loader\StandardAutoloader' => array(
31 | 'namespaces' => array(
32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
33 | ),
34 | ),
35 | );
36 | }
37 |
38 | /**
39 | * Get service config
40 | *
41 | * @return array
42 | */
43 | public function getServiceConfig()
44 | {
45 | return array(
46 | 'factories' => array(
47 | 'HtmlConversion\Model\Converter\Html' => function($sm)
48 | {
49 | $config = $sm->get('Config');
50 | $logger = $sm->get('Logger');
51 | if (!isset($config['conversion']['html'])) {
52 | throw new \Exception('Html converter configuration is missing');
53 | }
54 | $config = $config['conversion']['html'];
55 |
56 | return new Html($config, $logger);
57 | },
58 | ),
59 | );
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/module/HtmlConversion/autoload_classmap.php:
--------------------------------------------------------------------------------
1 | sm->get('HtmlConversion\Model\Converter\Html');
25 |
26 | // Fetch the NLMXML document resulting from merge, or from
27 | // reference correction, or as extracted from PDF, in order of
28 | // preference.
29 | $document = $job->getStageDocument(JOB_CONVERSION_STAGE_XML_MERGE);
30 | if (!$document) {
31 | $document =
32 | $job->getStageDocument(JOB_CONVERSION_STAGE_BIBTEXREFERENCES);
33 | }
34 | if (!$document) {
35 | $document =
36 | $job->getStageDocument(JOB_CONVERSION_STAGE_PDF_EXTRACT);
37 | }
38 | if (!$document) {
39 | throw new \Exception('Couldn\'t find the stage document');
40 | }
41 |
42 | $outputFile = $job->getDocumentPath() . '/html.zip';
43 | $html->setInputFile($document->path);
44 | $html->setOutputFile($outputFile);
45 | $html->convert();
46 |
47 | $job->conversionStage = JOB_CONVERSION_STAGE_HTML;
48 |
49 | if (!$html->getStatus()) {
50 | $job->status = JOB_STATUS_FAILED;
51 | return $job;
52 | }
53 |
54 | $documentDAO = $this->sm->get('Manager\Model\DAO\DocumentDAO');
55 | $htmlDocument = $documentDAO->getInstance();
56 | $htmlDocument->path = $outputFile;
57 | $htmlDocument->job = $job;
58 | $htmlDocument->conversionStage = JOB_CONVERSION_STAGE_HTML;
59 |
60 | $job->documents[] = $htmlDocument;
61 |
62 | return $job;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/module/Manager/autoload_classmap.php:
--------------------------------------------------------------------------------
1 | translator = $translator;
22 |
23 | parent::__construct('upload');
24 | $this->setAttribute('method', 'post');
25 | $this->setAttribute('class', 'upload-form');
26 |
27 | // Add the upload field
28 | $this->add(
29 | array(
30 | 'name' => 'upload',
31 | 'type' => '\Zend\Form\Element\File',
32 | 'options' => array(
33 | 'label' => $this->translator->translate('manager.uploadForm.file'),
34 | ),
35 | )
36 | );
37 |
38 | $this->add(
39 | array(
40 | 'name' => 'citationStyle',
41 | 'type' => '\Zend\Form\Element\Text',
42 | 'options' => array(
43 | 'label' => $this->translator->translate('manager.uploadForm.citationStyles'),
44 | ),
45 | 'attributes' => array(
46 | 'placeholder' => $this->translator->translate('manager.uploadForm.citationStyleAutocomplete')
47 | ),
48 | )
49 | );
50 |
51 | // Add the submit button
52 | $this->add(
53 | array(
54 | 'name' => 'submit',
55 | 'type' => '\Zend\Form\Element\Submit',
56 | 'attributes' => array(
57 | 'value' => $this->translator->translate('manager.uploadForm.uploadDocument'),
58 | )
59 | )
60 | );
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/module/Manager/src/Manager/Model/Converter/AbstractConverter.php:
--------------------------------------------------------------------------------
1 | output;
22 | }
23 |
24 | /**
25 | * Returns the status
26 | *
27 | * @return void
28 | */
29 | public function getStatus()
30 | {
31 | return $this->status;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/module/Manager/src/Manager/Model/Converter/ConverterInterface.php:
--------------------------------------------------------------------------------
1 | getPaginator(
29 | 'SELECT d FROM Manager\Entity\Document AS d WHERE d.job = :jobId ORDER BY d.id DESC',
30 | array('jobId' => $job->id)
31 | );
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/module/Manager/src/Manager/Model/DAO/JobDAO.php:
--------------------------------------------------------------------------------
1 | getPaginator(
29 | 'SELECT j FROM Manager\Entity\Job AS j WHERE j.user = :userId ORDER BY j.id DESC',
30 | array('userId' => $user->id)
31 | );
32 | }
33 |
34 | /**
35 | * Returns a admin job paginator with all users jobs ordered by creation
36 | *
37 | * @return Zend\Paginator\Paginator
38 | */
39 | public function getAdminJobPaginator()
40 | {
41 | return $this->getPaginator(
42 | 'SELECT j FROM Manager\Entity\Job AS j ORDER BY j.id DESC'
43 | );
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/module/Manager/src/Manager/Model/Queue/Job/JobInterface.php:
--------------------------------------------------------------------------------
1 | headTitle($this->translate('application.manager.index'));
3 |
4 | if (isset($this->uploadForm)) {
5 | $uploadForm->setAttribute('action', $this->url('manager', array('action' => 'upload')));
6 | $uploadForm = $this->uploadForm;
7 | $uploadForm->prepare();
8 | $uploadForm = $this->form()->render($uploadForm);
9 | }
10 | ?>
11 |
12 |
13 |
14 |
15 | translate('manager.uploadForm.uploadDocument') ?>
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/module/MergeXMLOutputs/Module.php:
--------------------------------------------------------------------------------
1 | array(
28 | __DIR__ . '/autoload_classmap.php'
29 | ),
30 | 'Zend\Loader\StandardAutoloader' => array(
31 | 'namespaces' => array(
32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
33 | ),
34 | ),
35 | );
36 | }
37 |
38 | /**
39 | * Get service config
40 | *
41 | * @return array
42 | */
43 | public function getServiceConfig()
44 | {
45 | return array(
46 | 'factories' => array(
47 | 'MergeXMLOutputs\Model\Converter\Merge' => function($sm)
48 | {
49 | $config = $sm->get('Config');
50 | $logger = $sm->get('Logger');
51 |
52 | return new Merge($config, $logger);
53 | },
54 | ),
55 | );
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/module/MergeXMLOutputs/autoload_classmap.php:
--------------------------------------------------------------------------------
1 | array (
26 | __DIR__ . '/autoload_classmap.php'
27 | ),
28 | 'Zend\Loader\StandardAutoloader' => array (
29 | 'namespaces' => array (
30 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__
31 | )
32 | )
33 | );
34 | }
35 |
36 | /**
37 | * Get service config
38 | *
39 | * @return array
40 | */
41 | public function getServiceConfig() {
42 | return array (
43 | 'factories' => array (
44 | 'NERExtraction\Model\Converter\NERExtractor' => function ($sm) {
45 | $config = $sm->get ( 'Config' );
46 | $logger = $sm->get ( 'Logger' );
47 |
48 | if (!isset($config['conversion']['ner'])) {
49 | throw new \Exception('NER configuration is missing');
50 | }
51 | $config = $config['conversion']['ner'];
52 |
53 | return new NERExtractor ( $config, $logger );
54 | }
55 | )
56 | );
57 | }
58 | }
--------------------------------------------------------------------------------
/module/NERExtraction/autoload_classmap.php:
--------------------------------------------------------------------------------
1 | sm->get('NERExtraction\Model\Converter\NERExtractor');
22 |
23 | // fetch xml document
24 | $doc = $job->getStageDocument(JOB_CONVERSION_STAGE_XML_MERGE);
25 |
26 | if (!$doc) {
27 | throw new \Exception("Couldn't find the stage document");
28 | }
29 |
30 | $job->conversionStage = JOB_CONVERSION_STAGE_NER_EXTRACT;
31 |
32 | // generate named entities document
33 | $extractor->setInputFile($doc->path);
34 | $outputPath = $job->getDocumentPath() . '/named-entities.json';
35 | $extractor->setOutputFile($outputPath);
36 | $extractor->convert();
37 |
38 | if (!$extractor->getStatus()) {
39 | $job->status = JOB_STATUS_FAILED;
40 | return $job;
41 | }
42 |
43 | $documentDAO = $this->sm->get('Manager\Model\DAO\DocumentDAO');
44 | $jsonDocument = $documentDAO->getInstance();
45 | $jsonDocument->path = $outputPath;
46 | $jsonDocument->mimeType = 'application/json';
47 | $jsonDocument->job = $job;
48 | $jsonDocument->conversionStage = JOB_CONVERSION_STAGE_NER_EXTRACT;
49 |
50 | $job->documents[] = $jsonDocument;
51 |
52 | return $job;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/module/NlmxmlConversion/Module.php:
--------------------------------------------------------------------------------
1 | array(
28 | __DIR__ . '/autoload_classmap.php'
29 | ),
30 | 'Zend\Loader\StandardAutoloader' => array(
31 | 'namespaces' => array(
32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
33 | ),
34 | ),
35 | );
36 | }
37 |
38 | /**
39 | * Get service config
40 | *
41 | * @return array
42 | */
43 | public function getServiceConfig()
44 | {
45 | return array(
46 | 'factories' => array(
47 | 'NlmxmlConversion\Model\Converter\Metypeset' => function($sm)
48 | {
49 | $config = $sm->get('Config');
50 | $logger = $sm->get('Logger');
51 | if (!isset($config['conversion']['nlmxml']['metypeset'])) {
52 | throw new \Exception('meTypeset configuration is missing');
53 | }
54 | $config = $config['conversion']['nlmxml']['metypeset'];
55 |
56 | return new Metypeset($config, $logger);
57 | },
58 | ),
59 | );
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/module/NlmxmlConversion/autoload_classmap.php:
--------------------------------------------------------------------------------
1 | sm->get('NlmxmlConversion\Model\Converter\Metypeset');
22 |
23 | // Fetch the document to convert
24 | $docxDocument = $job->getStageDocument(JOB_CONVERSION_STAGE_DOCX);
25 | if (!$docxDocument) {
26 | throw new \Exception('Couldn\'t find the stage document');
27 | }
28 |
29 | // Convert the document
30 | $metypeset->setInputFile($docxDocument->path);
31 | $outputDirectory = $job->getDocumentPath() . '/metypeset';
32 | $metypeset->setOutputDirectory($outputDirectory);
33 | $metypeset->convert();
34 |
35 | $xmlFile = $docxDocument->getFileName(true) . '.xml';
36 | $meTypesetOutputPath = $outputDirectory . '/nlm/' . $xmlFile;
37 |
38 | if (!$metypeset->getStatus() or !file_exists($meTypesetOutputPath)) {
39 | $job->status = JOB_STATUS_FAILED;
40 | return $job;
41 | }
42 |
43 | $outputPath = $job->getDocumentPath() . '/document_metypeset.xml';
44 | @copy($meTypesetOutputPath, $outputPath);
45 |
46 | $documentDAO = $this->sm->get('Manager\Model\DAO\DocumentDAO');
47 | $docxDocument = $documentDAO->getInstance();
48 | $docxDocument->path = $outputPath;
49 | $docxDocument->job = $job;
50 | $docxDocument->conversionStage = JOB_CONVERSION_STAGE_NLMXML;
51 |
52 | $job->documents[] = $docxDocument;
53 | $job->conversionStage = JOB_CONVERSION_STAGE_NLMXML;
54 |
55 | return $job;
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/module/NlmxmlConversion/test/assets/document.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/NlmxmlConversion/test/assets/document.docx
--------------------------------------------------------------------------------
/module/ParsCitConversion/Module.php:
--------------------------------------------------------------------------------
1 | array (
26 | __DIR__ . '/autoload_classmap.php'
27 | ),
28 | 'Zend\Loader\StandardAutoloader' => array (
29 | 'namespaces' => array (
30 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__
31 | )
32 | )
33 | );
34 | }
35 |
36 | /**
37 | * Get service config
38 | *
39 | * @return array
40 | */
41 | public function getServiceConfig() {
42 | return array (
43 | 'factories' => array (
44 | 'ParsCitConversion\Model\Converter\ParsCit' => function ($sm) {
45 | $config = $sm->get ( 'Config' );
46 | $logger = $sm->get ( 'Logger' );
47 |
48 | if (!isset($config['conversion']['parsCit'])) {
49 | throw new \Exception('ParsCit configuration is missing');
50 | }
51 | $config = $config['conversion']['parsCit'];
52 |
53 | return new ParsCit ( $config, $logger );
54 | }
55 | )
56 | );
57 | }
58 | }
--------------------------------------------------------------------------------
/module/ParsCitConversion/autoload_classmap.php:
--------------------------------------------------------------------------------
1 | array(
26 | __DIR__ . '/autoload_classmap.php'
27 | ),
28 | 'Zend\Loader\StandardAutoloader' => array(
29 | 'namespaces' => array(
30 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
31 | ),
32 | ),
33 | );
34 | }
35 |
36 | /**
37 | * Get service config
38 | *
39 | * @return array
40 | */
41 | public function getServiceConfig()
42 | {
43 | return array();
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/module/PathFinder/autoload_classmap.php:
--------------------------------------------------------------------------------
1 | array(
28 | __DIR__ . '/autoload_classmap.php'
29 | ),
30 | 'Zend\Loader\StandardAutoloader' => array(
31 | 'namespaces' => array(
32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
33 | ),
34 | ),
35 | );
36 | }
37 |
38 | /**
39 | * Get service config
40 | *
41 | * @return array
42 | */
43 | public function getServiceConfig()
44 | {
45 | return array(
46 | 'factories' => array(
47 | 'PdfConversion\Model\Converter\Pdf' => function($sm)
48 | {
49 | $config = $sm->get('Config');
50 | $logger = $sm->get('Logger');
51 | if (!isset($config['conversion']['pdf'])) {
52 | throw new \Exception('Pdf converter configuration is missing');
53 | }
54 | $config = $config['conversion']['pdf'];
55 |
56 | return new Pdf($config, $logger);
57 | },
58 | ),
59 | );
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/module/PdfConversion/assets/wkhtmltopdf-0.11.0_rc1-amd64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/PdfConversion/assets/wkhtmltopdf-0.11.0_rc1-amd64
--------------------------------------------------------------------------------
/module/PdfConversion/assets/wkhtmltopdf-0.11.0_rc1-i386:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/PdfConversion/assets/wkhtmltopdf-0.11.0_rc1-i386
--------------------------------------------------------------------------------
/module/PdfConversion/autoload_classmap.php:
--------------------------------------------------------------------------------
1 | sm->get('PdfConversion\Model\Converter\Pdf');
22 |
23 | // Fetch the zip file containing the html; check if we got one that has
24 | // the citations converted first and fall back to unconverted HTML
25 | if (
26 | !($document = $job->getStageDocument(JOB_CONVERSION_STAGE_CITATIONSTYLE)) and
27 | !($document = $job->getStageDocument(JOB_CONVERSION_STAGE_HTML))
28 | ) {
29 | throw new \Exception('Couldn\'t find the stage document');
30 | }
31 |
32 | $outputFile = $job->getDocumentPath() . '/document.pdf';
33 | $pdf->setInputFile($document->path);
34 | $pdf->setOutputFile($outputFile);
35 | $pdf->convert();
36 |
37 | $job->conversionStage = JOB_CONVERSION_STAGE_PDF;
38 |
39 | if (!$pdf->getStatus()) {
40 | $job->status = JOB_STATUS_FAILED;
41 | return $job;
42 | }
43 |
44 | $documentDAO = $this->sm->get('Manager\Model\DAO\DocumentDAO');
45 | $pdfDocument = $documentDAO->getInstance();
46 | $pdfDocument->path = $outputFile;
47 | $pdfDocument->job = $job;
48 | $pdfDocument->conversionStage = JOB_CONVERSION_STAGE_PDF;
49 |
50 | $job->documents[] = $pdfDocument;
51 |
52 | return $job;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/module/PdfConversion/test/assets/html.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/PdfConversion/test/assets/html.zip
--------------------------------------------------------------------------------
/module/ReferencesConversion/Module.php:
--------------------------------------------------------------------------------
1 | array(
28 | __DIR__ . '/autoload_classmap.php'
29 | ),
30 | 'Zend\Loader\StandardAutoloader' => array(
31 | 'namespaces' => array(
32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
33 | ),
34 | ),
35 | );
36 | }
37 |
38 | /**
39 | * Get service config
40 | *
41 | * @return array
42 | */
43 | public function getServiceConfig()
44 | {
45 | return array(
46 | 'factories' => array(
47 | 'ReferencesConversion\Model\Converter\References' => function($sm)
48 | {
49 | $config = $sm->get('Config');
50 | $logger = $sm->get('Logger');
51 | if (!isset($config['conversion']['references'])) {
52 | throw new \Exception("CrossRef's configuration is missing");
53 | }
54 | $config = $config['conversion']['references'];
55 |
56 | return new References($config, $logger);
57 | },
58 | ),
59 | );
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/module/ReferencesConversion/autoload_classmap.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | International Journal of Pharmaceutical and Life Sciences
6 |
7 |
8 |
9 |
10 | Mohammed Raihan Chowdhury 15 August 2012
11 |
12 |
13 | Two research paper, one review article and one conceptual paper are included in this issue. Due to delayed feedback concerning post-review revision from authors, some articles are not included in this issue. We expect fast response from authors if their article is sent back to them to edit. Thanks to all who were involved in review process, technical/functional support and authors who sent their papers to this journal.
14 |
15 | 1
16 | 1
17 |
18 | 2012
19 |
20 |
21 |
22 |