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

fixed sphinx build for readthedocs.org

parent 4b50d859
......@@ -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
clean:
find -name '*~' -delete
......
.. role:: js(code)
:language: javascript
.. _list-of-available-storages:
List of Available Storages
......@@ -28,9 +25,9 @@ LocalStorage
Three methods are provided:
* :js:`.createDescription(username, [application_name], [mode='localStorage'])`
* :js:`.createLocalDescription(username, [application_name])`
* :js:`.createMemoryDescription(username, [application_name])`
* ``.createDescription(username, [application_name], [mode='localStorage'])``
* ``.createLocalDescription(username, [application_name])``
* ``.createMemoryDescription(username, [application_name])``
All parameters are strings.
......
......@@ -27,7 +27,7 @@ import sys, os
# Add any Sphinx extension module names here, as strings. They can be extensions
# 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.
templates_path = ['_templates']
......@@ -50,9 +50,9 @@ copyright = u'2013, Nexedi'
# built documents.
#
# The short X.Y version.
version = '2.0.0'
version = '2.0.0-wip'
# 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
# for a list of supported languages.
......
.. role:: js(code)
:language: javascript
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.
======================= ========================================================
======================= ======================================================
Method Example
======================= ========================================================
``.post()`` | :js:`my_jio.post(document, [options]);`
======================= ======================================================
``.post()`` | ``my_jio.post(document, [options]);``
| Creates a new document
``.put()`` | :js:`my_jio.put(document, [options]);`
``.put()`` | ``my_jio.put(document, [options]);``
| Creates/Updates a document
``.putAttachment()`` | :js:`my_jio.putAttachement(attachment, [options]);`
``.putAttachment()`` | ``my_jio.putAttachement(attachment, [options]);```
| Updates/Adds an attachment to a document
``.get()`` | :js:`my_jio.get(document, [options]);`
``.get()`` | ``my_jio.get(document, [options]);``
| Reads a document
``.getAttachment()`` | :js:`my_jio.getAttachment(attachment, [options]);`
``.getAttachment()`` | ``my_jio.getAttachment(attachment, [options]);``
| Reads a document attachment
``.remove()`` | :js:`my_jio.remove(document, [options]);`
``.remove()`` | ``my_jio.remove(document, [options]);``
| Deletes a document and its attachments
``.removeAttachment()`` | :js:`my_jio.removeAttachment(attachment, [options]);`
``.removeAttachment()`` | ``my_jio.removeAttachment(attachment, [options]);``
| Deletes a document's attachment
``.allDocs()`` | :js:`my_jio.allDocs([options]);`
``.allDocs()`` | ``my_jio.allDocs([options]);``
| Retrieves a list of existing documents
``.check()`` | :js:`my_jio.check(document, [options]);`
``.check()`` | ``my_jio.check(document, [options]);``
| Checks the document state
``.repair()`` | :js:`my_jio.repair(document, [options]);`
``.repair()`` | ``my_jio.repair(document, [options]);``
| Repairs the document
======================= ========================================================
======================= ======================================================
......@@ -89,10 +86,12 @@ Getting started
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:
`Full download (172k) <_static/jio-2.0.0.zip>`_
`Minified download (87k) <_static/jio-2.0.0-min.zip>`_
`Full download (172k) <_static/jio-2.0.0-wip.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:
......
.. role:: js(code)
:language: javascript
.. _metadata-head:
Metadata
......@@ -67,9 +64,9 @@ Identification
* **identifer**
| :js:`{"identifier": "http://domain/jio_home_page"}`
| :js:`{"identifier": "urn:ISBN:978-1-2345-6789-X"}`
| :js:`{"identifier": [{"scheme": "DCTERMS.URI", "content": "http://domain/jio_home_page"}]}`
| ``{"identifier": "http://domain/jio_home_page"}``
| ``{"identifier": "urn:ISBN:978-1-2345-6789-X"}``
| ``{"identifier": [{"scheme": "DCTERMS.URI", "content": "http://domain/jio_home_page"}]}``
An unambiguous reference to the resource within a given context. Recommended
best practice is to identify the resource with a string or number
......@@ -81,8 +78,8 @@ Identification
* **format**
| :js:`{"format": ["text/html", "52 kB"]}`
| :js:`{"format": ["image/jpeg", "100 x 100 pixels", "13.2 KiB"]}`
| ``{"format": ["text/html", "52 kB"]}``
| ``{"format": ["image/jpeg", "100 x 100 pixels", "13.2 KiB"]}``
The physical or digital manifestation of the resource. Typically, Format may
include the media-type or dimensions of the resource. Examples of dimensions
......@@ -91,8 +88,8 @@ Identification
* **date**
| :js:`{"date": "2011-12-13T14:15:16Z"}`
| :js:`{"date": {"scheme": "DCTERMS.W3CDTF", "content": "2011-12-13"}}`
| ``{"date": "2011-12-13T14:15:16Z"}``
| ``{"date": {"scheme": "DCTERMS.W3CDTF", "content": "2011-12-13"}}``
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.
......@@ -102,9 +99,9 @@ Identification
* **type**
| :js:`{"type": "Text"}`
| :js:`{"type": "Image"}`
| :js:`{"type": "Dataset"}`
| ``{"type": "Text"}``
| ``{"type": "Image"}``
| ``{"type": "Dataset"}``
The nature or genre of the content of the resource. Type includes terms describing
general categories, functions, genres, or aggregation levels for content.
......@@ -117,8 +114,8 @@ Intellectual property
* **creator**
| :js:`{"creator": "Tristan Cavelier"}`
| :js:`{"creator": ["Tristan Cavelier", "Sven Franck"]}`
| ``{"creator": "Tristan Cavelier"}``
| ``{"creator": ["Tristan Cavelier", "Sven Franck"]}``
An entity primarily responsible for creating the content of the resource.
Examples of a Creator include a person, an organization, or a service.
......@@ -126,7 +123,7 @@ Intellectual property
* **publisher**
| :js:`{"publisher": "Nexedi"}`
| ``{"publisher": "Nexedi"}``
The entity responsible for making the resource available. Examples of a
Publisher include a person, an organization, or a service. Typically, the name
......@@ -134,7 +131,7 @@ Intellectual property
* **contributor**
| :js:`{"contributor": ["Full Name", "Full Name", ...]}`
| ``{"contributor": ["Full Name", "Full Name", ...]}``
An entity responsible for making contributions to the content of the
resource. Examples of a Contributor include a person, an organization or a
......@@ -143,8 +140,8 @@ Intellectual property
* **rights**
| :js:`{"rights": "Access limited to members"}`
| :js:`{"rights": "https://www.j-io.org/documentation/jio-documentation/#copyright-and-license"}`
| ``{"rights": "Access limited to members"}``
| ``{"rights": "https://www.j-io.org/documentation/jio-documentation/#copyright-and-license"}``
Information about rights held in and over the resource. Typically a Rights
element will contain a rights management statement for the resource, or
......@@ -159,14 +156,14 @@ Content
* **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.
* **subject**
| :js:`{"subject": "jIO"}`
| :js:`{"subject": ["jIO", "basics"]}`
| ``{"subject": "jIO"}``
| ``{"subject": ["jIO", "basics"]}``
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
......@@ -175,8 +172,8 @@ Content
* **description**
| :js:`{"description": "Simple guide to show the basics of jIO"}`
| :js:`{"description": {"lang": "fr", "content": "Ma description"}}`
| ``{"description": "Simple guide to show the basics of jIO"}``
| ``{"description": {"lang": "fr", "content": "Ma description"}}``
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
......@@ -184,7 +181,7 @@ Content
* **language**
| :js:`{"language": "en"}`
| ``{"language": "en"}``
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>`_
......@@ -195,7 +192,7 @@ Content
* **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
present resource may be derived from the Source resource in whole or part.
......@@ -204,7 +201,7 @@ Content
* **relation**
| :js:`{"relation": "Resilience project"}`
| ``{"relation": "Resilience project"}``
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
......@@ -212,7 +209,7 @@ Content
* **coverage**
| :js:`{"coverage": "France"}`
| ``{"coverage": "France"}``
The extent or scope of the content of the resource. Coverage will typically
include spatial location (a place name or geographic co-ordinates), temporal
......@@ -225,7 +222,7 @@ Content
* **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
navigational facets, they correspond to the properties of the resource which
......@@ -233,13 +230,13 @@ Content
* **product**
| :js:`{"product": "..."}`
| ``{"product": "..."}``
For e-commerce use.
* **custom**
| :js:`{custom1: value1, custom2: value2, ...}`
| ``{custom1: value1, custom2: value2, ...}``
......
.. role:: js(code)
:language: 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