Commit 2f5f21ae authored by Marco Mariani's avatar Marco Mariani

fixed sphinx build for readthedocs.org

parent 4b50d859
...@@ -83,35 +83,6 @@ zip: ...@@ -83,35 +83,6 @@ zip:
# mkdir "$tmpdir"/storage && \
#
# cp -r jio.storage/localstorage.js "$tmpdir"/storage && \
# cp -r jio.storage/davstorage.js "$tmpdir"/storage && \
# cp -r jio.storage/erp5storage.js "$tmpdir"/storage && \
# cp -r jio.storage/indexstorage.js "$tmpdir"/storage && \
# cp -r jio.storage/gidstorage.js "$tmpdir"/storage && \
# cp -r jio.storage/replicatestorage.js "$tmpdir"/storage && \
# cp -r jio.storage/splitstorage.js "$tmpdir"/storage && \
#
# ##############################
#
# cd "$tmpdir" && \
# res=$?
#
# #cd - >/dev/null && \
# rm -rf "$tmpdir"
# exit $res
#
.phony: clean .phony: clean
clean: clean:
find -name '*~' -delete find -name '*~' -delete
......
.. role:: js(code)
:language: javascript
.. _list-of-available-storages: .. _list-of-available-storages:
List of Available Storages List of Available Storages
...@@ -28,9 +25,9 @@ LocalStorage ...@@ -28,9 +25,9 @@ LocalStorage
Three methods are provided: Three methods are provided:
* :js:`.createDescription(username, [application_name], [mode='localStorage'])` * ``.createDescription(username, [application_name], [mode='localStorage'])``
* :js:`.createLocalDescription(username, [application_name])` * ``.createLocalDescription(username, [application_name])``
* :js:`.createMemoryDescription(username, [application_name])` * ``.createMemoryDescription(username, [application_name])``
All parameters are strings. All parameters are strings.
......
...@@ -27,7 +27,7 @@ import sys, os ...@@ -27,7 +27,7 @@ import sys, os
# Add any Sphinx extension module names here, as strings. They can be extensions # Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.todo', 'sphinx.ext.ifconfig', 'sphinxcontrib.jsdemo'] extensions = ['sphinx.ext.todo', 'sphinx.ext.ifconfig'] # , 'sphinxcontrib.jsdemo']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']
...@@ -50,9 +50,9 @@ copyright = u'2013, Nexedi' ...@@ -50,9 +50,9 @@ copyright = u'2013, Nexedi'
# built documents. # built documents.
# #
# The short X.Y version. # The short X.Y version.
version = '2.0.0' version = '2.0.0-wip'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '2.0.0' release = '2.0.0-wip'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.
......
.. role:: js(code)
:language: javascript
Getting started Getting started
=============== ===============
...@@ -57,30 +54,30 @@ Getting started ...@@ -57,30 +54,30 @@ Getting started
#. The jIO API provides ten main methods to manage documents across the storage(s) specified in your jIO storage tree. #. The jIO API provides ten main methods to manage documents across the storage(s) specified in your jIO storage tree.
======================= ======================================================== ======================= ======================================================
Method Example Method Example
======================= ======================================================== ======================= ======================================================
``.post()`` | :js:`my_jio.post(document, [options]);` ``.post()`` | ``my_jio.post(document, [options]);``
| Creates a new document | Creates a new document
``.put()`` | :js:`my_jio.put(document, [options]);` ``.put()`` | ``my_jio.put(document, [options]);``
| Creates/Updates a document | Creates/Updates a document
``.putAttachment()`` | :js:`my_jio.putAttachement(attachment, [options]);` ``.putAttachment()`` | ``my_jio.putAttachement(attachment, [options]);```
| Updates/Adds an attachment to a document | Updates/Adds an attachment to a document
``.get()`` | :js:`my_jio.get(document, [options]);` ``.get()`` | ``my_jio.get(document, [options]);``
| Reads a document | Reads a document
``.getAttachment()`` | :js:`my_jio.getAttachment(attachment, [options]);` ``.getAttachment()`` | ``my_jio.getAttachment(attachment, [options]);``
| Reads a document attachment | Reads a document attachment
``.remove()`` | :js:`my_jio.remove(document, [options]);` ``.remove()`` | ``my_jio.remove(document, [options]);``
| Deletes a document and its attachments | Deletes a document and its attachments
``.removeAttachment()`` | :js:`my_jio.removeAttachment(attachment, [options]);` ``.removeAttachment()`` | ``my_jio.removeAttachment(attachment, [options]);``
| Deletes a document's attachment | Deletes a document's attachment
``.allDocs()`` | :js:`my_jio.allDocs([options]);` ``.allDocs()`` | ``my_jio.allDocs([options]);``
| Retrieves a list of existing documents | Retrieves a list of existing documents
``.check()`` | :js:`my_jio.check(document, [options]);` ``.check()`` | ``my_jio.check(document, [options]);``
| Checks the document state | Checks the document state
``.repair()`` | :js:`my_jio.repair(document, [options]);` ``.repair()`` | ``my_jio.repair(document, [options]);``
| Repairs the document | Repairs the document
======================= ======================================================== ======================= ======================================================
...@@ -89,10 +86,12 @@ Getting started ...@@ -89,10 +86,12 @@ Getting started
Download & Fork Download & Fork
--------------- ---------------
Please note that the current (2.0.0-wip) version is not stable yet.
You can use one of the ZIP packages, which include all the dependencies and storages: You can use one of the ZIP packages, which include all the dependencies and storages:
`Full download (172k) <_static/jio-2.0.0.zip>`_ `Full download (172k) <_static/jio-2.0.0-wip.zip>`_
`Minified download (87k) <_static/jio-2.0.0-min.zip>`_ `Minified download (87k) <_static/jio-2.0.0-wip-min.zip>`_
or you can create your own set of files, which are are provided in the above packages and the source repository: or you can create your own set of files, which are are provided in the above packages and the source repository:
......
.. role:: js(code)
:language: javascript
.. _metadata-head: .. _metadata-head:
Metadata Metadata
...@@ -61,15 +58,15 @@ Identification ...@@ -61,15 +58,15 @@ Identification
^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
* **_id** * **_id**
A specific jIO metadata which helps the storage to find a document A specific jIO metadata which helps the storage to find a document
(can be a real path name, a dc:identifier, a uuid, ...). **String Only** (can be a real path name, a dc:identifier, a uuid, ...). **String Only**
* **identifer** * **identifer**
| :js:`{"identifier": "http://domain/jio_home_page"}` | ``{"identifier": "http://domain/jio_home_page"}``
| :js:`{"identifier": "urn:ISBN:978-1-2345-6789-X"}` | ``{"identifier": "urn:ISBN:978-1-2345-6789-X"}``
| :js:`{"identifier": [{"scheme": "DCTERMS.URI", "content": "http://domain/jio_home_page"}]}` | ``{"identifier": [{"scheme": "DCTERMS.URI", "content": "http://domain/jio_home_page"}]}``
An unambiguous reference to the resource within a given context. Recommended An unambiguous reference to the resource within a given context. Recommended
best practice is to identify the resource with a string or number best practice is to identify the resource with a string or number
...@@ -80,9 +77,9 @@ Identification ...@@ -80,9 +77,9 @@ Identification
and the `International Standard Book Number <http://en.wikipedia.org/wiki/Isbn>`_ (ISBN). and the `International Standard Book Number <http://en.wikipedia.org/wiki/Isbn>`_ (ISBN).
* **format** * **format**
| :js:`{"format": ["text/html", "52 kB"]}` | ``{"format": ["text/html", "52 kB"]}``
| :js:`{"format": ["image/jpeg", "100 x 100 pixels", "13.2 KiB"]}` | ``{"format": ["image/jpeg", "100 x 100 pixels", "13.2 KiB"]}``
The physical or digital manifestation of the resource. Typically, Format may The physical or digital manifestation of the resource. Typically, Format may
include the media-type or dimensions of the resource. Examples of dimensions include the media-type or dimensions of the resource. Examples of dimensions
...@@ -90,9 +87,9 @@ Identification ...@@ -90,9 +87,9 @@ Identification
hardware or other equipment needed to display or operate the resource. hardware or other equipment needed to display or operate the resource.
* **date** * **date**
| :js:`{"date": "2011-12-13T14:15:16Z"}` | ``{"date": "2011-12-13T14:15:16Z"}``
| :js:`{"date": {"scheme": "DCTERMS.W3CDTF", "content": "2011-12-13"}}` | ``{"date": {"scheme": "DCTERMS.W3CDTF", "content": "2011-12-13"}}``
A date associated with an event in the life cycle of the resource. Typically, A date associated with an event in the life cycle of the resource. Typically,
Date will be associated with the creation or availability of the resource. Date will be associated with the creation or availability of the resource.
...@@ -101,10 +98,10 @@ Identification ...@@ -101,10 +98,10 @@ Identification
and follows the YYYY-MM-DD format. and follows the YYYY-MM-DD format.
* **type** * **type**
| :js:`{"type": "Text"}` | ``{"type": "Text"}``
| :js:`{"type": "Image"}` | ``{"type": "Image"}``
| :js:`{"type": "Dataset"}` | ``{"type": "Dataset"}``
The nature or genre of the content of the resource. Type includes terms describing The nature or genre of the content of the resource. Type includes terms describing
general categories, functions, genres, or aggregation levels for content. general categories, functions, genres, or aggregation levels for content.
...@@ -116,25 +113,25 @@ Intellectual property ...@@ -116,25 +113,25 @@ Intellectual property
^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^
* **creator** * **creator**
| :js:`{"creator": "Tristan Cavelier"}` | ``{"creator": "Tristan Cavelier"}``
| :js:`{"creator": ["Tristan Cavelier", "Sven Franck"]}` | ``{"creator": ["Tristan Cavelier", "Sven Franck"]}``
An entity primarily responsible for creating the content of the resource. An entity primarily responsible for creating the content of the resource.
Examples of a Creator include a person, an organization, or a service. Examples of a Creator include a person, an organization, or a service.
Typically the name of the Creator should be used to indicate the entity. Typically the name of the Creator should be used to indicate the entity.
* **publisher** * **publisher**
| :js:`{"publisher": "Nexedi"}` | ``{"publisher": "Nexedi"}``
The entity responsible for making the resource available. Examples of a The entity responsible for making the resource available. Examples of a
Publisher include a person, an organization, or a service. Typically, the name Publisher include a person, an organization, or a service. Typically, the name
of a Publisher should be used to indicate the entity. of a Publisher should be used to indicate the entity.
* **contributor** * **contributor**
| :js:`{"contributor": ["Full Name", "Full Name", ...]}` | ``{"contributor": ["Full Name", "Full Name", ...]}``
An entity responsible for making contributions to the content of the An entity responsible for making contributions to the content of the
resource. Examples of a Contributor include a person, an organization or a resource. Examples of a Contributor include a person, an organization or a
...@@ -142,9 +139,9 @@ Intellectual property ...@@ -142,9 +139,9 @@ Intellectual property
entity. entity.
* **rights** * **rights**
| :js:`{"rights": "Access limited to members"}` | ``{"rights": "Access limited to members"}``
| :js:`{"rights": "https://www.j-io.org/documentation/jio-documentation/#copyright-and-license"}` | ``{"rights": "https://www.j-io.org/documentation/jio-documentation/#copyright-and-license"}``
Information about rights held in and over the resource. Typically a Rights Information about rights held in and over the resource. Typically a Rights
element will contain a rights management statement for the resource, or element will contain a rights management statement for the resource, or
...@@ -158,15 +155,15 @@ Content ...@@ -158,15 +155,15 @@ Content
^^^^^^^ ^^^^^^^
* **title** * **title**
| :js:`{"title": "jIO Home Page"}` | ``{"title": "jIO Home Page"}``
The name given to the resource. Typically, a Title will be a name by which the resource is formally known. The name given to the resource. Typically, a Title will be a name by which the resource is formally known.
* **subject** * **subject**
| :js:`{"subject": "jIO"}` | ``{"subject": "jIO"}``
| :js:`{"subject": ["jIO", "basics"]}` | ``{"subject": ["jIO", "basics"]}``
The topic of the content of the resource. Typically, a Subject will be The topic of the content of the resource. Typically, a Subject will be
expressed as keywords or key phrases or classification codes that describe the expressed as keywords or key phrases or classification codes that describe the
...@@ -174,17 +171,17 @@ Content ...@@ -174,17 +171,17 @@ Content
controlled vocabulary or formal classification scheme. controlled vocabulary or formal classification scheme.
* **description** * **description**
| :js:`{"description": "Simple guide to show the basics of jIO"}` | ``{"description": "Simple guide to show the basics of jIO"}``
| :js:`{"description": {"lang": "fr", "content": "Ma description"}}` | ``{"description": {"lang": "fr", "content": "Ma description"}}``
An account of the content of the resource. Description may include but is not An account of the content of the resource. Description may include but is not
limited to: an abstract, table of contents, reference to a graphical limited to: an abstract, table of contents, reference to a graphical
representation of content or a free-text account of the content. representation of content or a free-text account of the content.
* **language** * **language**
| :js:`{"language": "en"}` | ``{"language": "en"}``
The language of the intellectual content of the resource. Recommended best The language of the intellectual content of the resource. Recommended best
practice for the values of the Language element is defined by `RFC 3066 <http://www.ietf.org/rfc/rfc3066.txt>`_ practice for the values of the Language element is defined by `RFC 3066 <http://www.ietf.org/rfc/rfc3066.txt>`_
...@@ -194,8 +191,8 @@ Content ...@@ -194,8 +191,8 @@ Content
United Kingdom. United Kingdom.
* **source** * **source**
| :js:`{"source": ["Image taken from a drawing by Mr. Artist", "<phone number>"]}` | ``{"source": ["Image taken from a drawing by Mr. Artist", "<phone number>"]}``
A Reference to a resource from which the present resource is derived. The A Reference to a resource from which the present resource is derived. The
present resource may be derived from the Source resource in whole or part. present resource may be derived from the Source resource in whole or part.
...@@ -203,16 +200,16 @@ Content ...@@ -203,16 +200,16 @@ Content
number conforming to a formal identification system. number conforming to a formal identification system.
* **relation** * **relation**
| :js:`{"relation": "Resilience project"}` | ``{"relation": "Resilience project"}``
A reference to a related resource. Recommended best practice is to reference A reference to a related resource. Recommended best practice is to reference
the resource by means of a string or number conforming to a formal the resource by means of a string or number conforming to a formal
identification system. identification system.
* **coverage** * **coverage**
| :js:`{"coverage": "France"}` | ``{"coverage": "France"}``
The extent or scope of the content of the resource. Coverage will typically The extent or scope of the content of the resource. Coverage will typically
include spatial location (a place name or geographic co-ordinates), temporal include spatial location (a place name or geographic co-ordinates), temporal
...@@ -224,22 +221,22 @@ Content ...@@ -224,22 +221,22 @@ Content
as sets of co-ordinates or date ranges. as sets of co-ordinates or date ranges.
* **category** * **category**
| :js:`{"category": ["parent/26323", "resilience/javascript", "javascript/library/io"]}` | ``{"category": ["parent/26323", "resilience/javascript", "javascript/library/io"]}``
The category the resource is associated with. The categories may look like The category the resource is associated with. The categories may look like
navigational facets, they correspond to the properties of the resource which navigational facets, they correspond to the properties of the resource which
can be generated with metadata or some other information (see `faceted search <https://en.wikipedia.org/wiki/Faceted_search>`_). can be generated with metadata or some other information (see `faceted search <https://en.wikipedia.org/wiki/Faceted_search>`_).
* **product** * **product**
| :js:`{"product": "..."}` | ``{"product": "..."}``
For e-commerce use. For e-commerce use.
* **custom** * **custom**
| :js:`{custom1: value1, custom2: value2, ...}` | ``{custom1: value1, custom2: value2, ...}``
...@@ -353,7 +350,7 @@ Posting a book ...@@ -353,7 +350,7 @@ Posting a book
}, },
"format" : "application/pdf", "format" : "application/pdf",
"date" : { "date" : {
"scheme": "DCTERMS.W3CDTF", "scheme": "DCTERMS.W3CDTF",
"content": getW3CDate() "content": getW3CDate()
}, // see tools below }, // see tools below
"creator" : "Original Author(s)", "creator" : "Original Author(s)",
......
.. role:: js(code)
:language: javascript
.. _style-guide: .. _style-guide:
JavaScript Style Guide JavaScript Style Guide
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment