- Create virtualenv:
virtualenv .
- Install cnx-query-grammar
git clone https://github.com/Connexions/cnx-query-grammar.git
cd cnx-query-grammar && ../bin/python setup.py install && cd ..
- Install cnx-epub
git clone https://github.com/Connexions/cnx-epub.git
cd cnx-epub && ../bin/python setup.py install && cd ..
- Install cnx-authoring
./bin/python setup.py install
- Make a copy of
development.ini.example
and call itdevelopment.ini
.
cp development.ini.example development.ini
Edit settings in
development.ini
as necessary.cnx-authoring will not run without correct openstax accounts settings.
A fabric script has been written to help set up a dev environment for openstax/accounts.
- If you are using the postgresql storage option:
sudo -u postgres psql -d postgres -c "CREATE USER cnxauthoring WITH SUPERUSER PASSWORD 'cnxauthoring';"
sudo -u postgres createdb -O cnxauthoring authoring
./bin/cnx-authoring-initialize_db development.ini
- Start the server:
./bin/pserve development.ini
Known bugs: pickle storage is currently broken.
The connexions authoring environment is made up of three content objects:
- Documents
Modular HTML documents that contain written text by one or more authors.
- Binders
Collections of Documents bound together to make comprehensive subject matter from otherwise disconnected pieces. These could also be called collections, books, binders, scrollls, etc.
- Resources
Any file that is referenced within a document. This can be anything from an image to a suplimentary PDF.
Documents and binders have the following required pieces of data (aka metadata):
- title
A human readable title or name for the document.
- id
(Autogenerated) (saved internally as a UUID v4) (The user should never see this except indirectly in the url.)
- creation-datetime
(Autogenerated) The date and time the item was created.
- last-modified-datetime
(Computed) The date and time the item was last revised/edited.
Optional pieces of data (aka metadata):
- license
(Defaults to CC-BY-40) A protective license for the content is under.
- language
(Defaults to en-US) The language the content is written in.
- summary
A brief summary (aka abstract) of the document or binder.
- derived-from-*
The source or origin this work is derived from, where '*' can be url, isbn, or (internal) id.
Documents contains a content body of data as well. Binders have a tree or table of contents structure rather than a content body. The binder tree structures can have an infinite depth.
Resources are files which could be binary or text based data. Resources require a mimetype and hash (SHA1 hash is autogenerated).
Attribution are a set of data on document or binders that ascribe the work to people and/or organizations. They do not and should never be confused with the permissions someone has on a piece of work. Attributions are author(s), translator(s), illustrator(s), editor(s), and copyright-holder(s). Furthermore, attribution can be a simple name (e.g. 'Edgar Allen Poe') or a user id associated user authentication and profile system (i.e. an osc-accounts user id).
This software is subject to the provisions of the GNU Affero General Public License Version 3.0 (AGPL). See license.txt for details. Copyright (c) 2013 Rice University