Package: overview-upload
overview-upload===============Upload files to an `Overview <https://www.overviewdocs.com>`__ documentset.Installation============Requires `python3 <https://www.python.org/>`__.``pip3 install overview_upload``, maybe with ``sudo`` in front. Thatwill install a ``overview-upload`` program in your path.Command-Line Usage==================overview-upload: upload files-----------------------------``overview-upload --server <SERVER_URL> --token <API_TOKEN> [options] DIRECTORY``Required arguments:-  ``SERVER_URL`` is the base URL for the server, which defaults tohttp://localhost:9000 for use with`overview-local <https://github.com/overview/overview-local>`__.-  ``API_TOKEN`` is the access token for a particular document set,which you get like this:1. Browse to your document set. The URL will look like``https://www.overviewdocs.com/documentsets/123456``.2. Note the document set number, in this case ``123456``3. Browse to``https://www.overviewdocs.com/documentsets/[your number here]/api-tokens``and click "Generate token".-  ``DIRECTORY`` is a path to the file or directory you want to upload.Optional arguments:-  ``--skip-duplicate`` (the default), ``--noskip``: skip files that arealready part of the document set your API token refers to. Files arecompared by their sha1 hashes, meaning even if you move or rename thefile it will not be uploaded if the document set already includes it.This feature is helpful for synchronizing a local directory with anOverview document set; however, it will not delete Overview documentscorresponding to files you deleted locally.-  ``--split-by-page``: tell Overview to turn a multi-page file (like aPDF or Word document) into several Overview documents.-  ``--ocr`` (the default), ``--no-ocr``: tell Overview what to do whena PDF page has only images but no text. Overview can either try torecognize text using`Tesseract <https://github.com/tesseract-ocr/tesseract>`__ (which isslow and will prevent you from viewing the document set until itfinishes), or it can assume the page contains no text.-- ``create-document-set-with-title``: create a new document set with thegiven title and then add files to it. ``API_TOKEN`` here is one youcreate at http://www.overviewdocs.com/api-tokens orhttp://localhost:9000/api-tokens.If you upload a single file, its Overview document title will be itsfilename, without any directory information. If you upload a directory,filenames will include subdirectory informatin: for instance, if``overview-upload /some/path`` uploads ``/some/path/to/file.pdf``, theOverview document title will be ``to/file.pdf``.overview-upload-csv: upload from a CSV manifest-----------------------------------------------Given a CSV like this:.. csv-table:: manifest.csv:header: id,title,url,field1,field21,doc1.pdf,http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf,some metadata,some more metadata2,doc2.pdf,http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf,more metadata,and even more metadataYou can upload the referenced files to Overview like this:``overview-upload-csv <API_TOKEN> <manifest.csv> --url-field url --title-field title --server https://www.overviewdocs.com``If you browse to the document set and add ``field1`` and ``field2`` fields, youwill see the values from the CSV.You can use ``--local-file-field`` instead of ``--url-field`` to use a field containing paths on your filesystem.overview-create-document-set: Create an empty document set----------------------------------------------------------------You can create an empty document set using this incantation:``overview-create-document-set --server <SERVER_URL> --token <API_TOKEN> [options] "DOCUMENT SET TITLE"``Required arguments:-  ``SERVER_URL`` is the base URL for the server, which defaults tohttp://localhost:9000 for use with`overview-local <https://github.com/overview/overview-local>`__.-  ``API_TOKEN`` is the *global* access token for creating document sets,which you can create at https://www.overviewdocs.com/api-tokensOptional arguments:- ``--metadata-schema-field-names``: Fields to display for each document. Example: ``"Title,Author"``.The program will display an API token you can use to add documents to the newdocument set.API usage=========You can also ``import overview_upload`` from your own Python3 programand then use the ``overview_upload.Upload`` class. See the``overview-server`` source code for more information.Developing==========Releasing a new version-----------------------0. `Register onPyPI <https://pypi.python.org/pypi?%3Aaction=register_form>`__ andcreate ``~/.pypirc`` with ``[pypi]\nusername = ...\npassword = ...``1. Update ``version`` in ``setup.py``2. ``rm -r dist && ./setup.py sdist``3. ``gpg --detach-sign -a dist/*.tar.gz``4. ``twine upload dist/*.tar.gz dist/*.asc``License=======This software is distributed under the terms of the GNU Affero GeneralPublic License. See the LICENSE file for details.