cnxml-3.1.9
توضیحات
Connexions CNXML Library
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | cnxml-3.1.9 |
| نام | cnxml |
| نسخه کتابخانه | 3.1.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Connexions team |
| ایمیل نویسنده | info@cnx.org |
| آدرس صفحه اصلی | https://github.com/connexions/cnxml |
| آدرس اینترنتی | https://pypi.org/project/cnxml/ |
| مجوز | AGPL, See also LICENSE.txt |
CNXML Library
=============
This is a python library for working with CNXML content, which includes the CNXML and COLLXML formats.
Install
-------
This library requires Python >=3.5.
Install using::
pip install -e "."
Tests
-----
Use the tox to run the tests::
tox
If tox is not installed, run the following::
pip install tox
Edit/Validate files using `atom.io <https://atom.io>`_
------------------------------------------------------
Preparation
^^^^^^^^^^^
#. Install https://atom.io
#. Get the cnxml RNG Schema files
#. Download the most recent version from https://github.com/Connexions/cnxml/releases (click the "zip" link)
- It should be in your Download foler
- Move it to ~/.neb/
#. Unzip the file
#. It should have created a folder named something like `cnxml-2.0.0` (with `/cnxml/xml/cnxml/schema/rng/0.7/cnxml-jing.rng` in it)
#. Rename the folder to be something you are unlikely to accidentally delete (like `cnxml-validation`)
- Remember the name for later when you are editing `~/.atom/config.cson`
Install
^^^^^^^
#. Start up Atom
#. Install the `linter-autocomplete-jing` package
#. Type <kbd>⌘</kbd>+<kbd>,</kbd> (for Mac) to open Settings (or click **Atom**, **Preferences...** in the menu bar)
#. Click **Install** in the left-hand-side
#. Enter `linter-autocomplete-jing` and click **Install**
#. **Alternative:** run `apm install linter-autocomplete-jing` from the commandline
#. Edit `~/.atom/config.cson` by clicking **Atom**, **Config** in the menu bar and add the following lines (at the bottom of this document)
#. Restart Atom
#. Open an unzipped complete-zip. (I run `atom ~/Downloads/col1234_complete` **From a terminal**)
#. Verify by opening an `index.cnxml` file and typing in `<figure>` somewhere in the file. If it is a valid location then it should auto-add `id=""` for you
Changes to `~/.atom/config.cson`::
"*":
core:
customFileTypes:
# Add this to the bottom of the customFileTypes area.
# Note: Indentation is important!
"text.xml": [
"index.cnxml"
]
# And then this to the bottom of the file
# 1. Make sure "linter-autocomplete-jing" only occurs once in this file!
# 1. make sure it is indented by 2 spaces just like it is in this example.
"linter-autocomplete-jing":
displaySchemaWarnings: true
rules: [
{
priority: 1
test:
pathRegex: ".cnxml$"
outcome:
schemaProps: [
{
lang: "rng"
path: "~/.neb/cnxml-validation/cnxml/xml/cnxml/schema/rng/0.7/cnxml-jing.rng"
}
]
}
]
License
-------
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) 2016 Rice University
Change Log
==========
.. Use the following to start a new version entry:
|version|
----------------------
- feature message
3.1.9
-----
- Add structured parsing of licenses (#56)
- Ensure that https is acceptable in license urls (#57)
3.1.6
-----
- Fix derived metadata validation error (#49)
3.1.5
-----
- Require md:language for collxml but not cnxml (#39)
3.1.4
-----
- Make module titles in collection optional (#35)
3.1.3
-----
- Support using document title once it is removed from metadata (#33)
- Remove some metadata unused by git storage (#32)
3.1.2
-----
- Update schema and add support for slug in metadata (#30)
3.1.1
-----
- Add support for new optional metadata (#28)
3.1.0
-----
- Relax required information when parsing metadata (#25)
3.0.1
-----
- Re-release of 3.0.0
3.0.0
-----
- Add tests for cnxml <md:derived-from ...> validation
- Fix failing derived-from cnxml validation tests
- Use a self-closing md:derived-from as the valid repr
- Move the metadata parsing from
`Press <https://github.com/openstax/cnx-press>`_ to cnxml (#20)
- Add a CLI utility for extracting cnxml metadata to json (#22)
2.2.0
-----
- Extend validation API to accept multiple documents to validate
2.1.1
-----
- Tweak mdml schema to properly allow any metadata element under derived-from
2.1.0
-----
- Remove external pathlib dependency
- Drop support for Python <= 2.7
- Use versioneer for project versioning
- Correct license in setup.py
- Add instructions to validate with the atom.io editor
2.0.0
-----
- Add a commandline interface for collxml validation
- Rename main cli function to make room for another entrypoint
- Make the metadata section required in collxml
- Add collxml validation function
1.1.0
-----
- Use a namedtuple for validation error line data.
1.0.0
-----
- Initial release.
نیازمندی
| مقدار | نام |
|---|---|
| - | lxml |
| - | pytest |
نحوه نصب
نصب پکیج whl cnxml-3.1.9:
pip install cnxml-3.1.9.whl
نصب پکیج tar.gz cnxml-3.1.9:
pip install cnxml-3.1.9.tar.gz