Skip to content

Commit a19ede2

Browse files
authored
Merge pull request #77 from openSUSE/feature/76-geekodoc2
Create geekodoc2 release
2 parents 572d38d + 28ce05c commit a19ede2

File tree

76 files changed

+33332
-11273
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+33332
-11273
lines changed

.github/workflows/validate.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Validating GeekoDoc"
2+
3+
on: push
4+
5+
jobs:
6+
validate:
7+
name: "Test GeekoDoc"
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v2
13+
14+
- name: Checkout rnginline
15+
uses: actions/checkout@v2
16+
with:
17+
repository: h4l/rnginline
18+
path: rnginline
19+
20+
- name: Install dependencies
21+
run: |
22+
sudo apt-get install libxml2-utils trang python3-setuptools python3-wheel
23+
24+
- name: Preparing rnginline
25+
26+
run: |
27+
(cd rnginline; sudo pip3 install -e .)
28+
whereis rnginline
29+
30+
- name: Building GeekoDoc
31+
run: ./build.sh -vvv
32+
33+
- name: Testing GeekoDoc
34+
run: ./tests/run-tests.sh

.gitignore

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,14 @@
1-
# Ignore DocBook5 schema
2-
3-
geekodoc/rng/docbookxi.rnc
4-
geekodoc/rng/docbookxi.rng
5-
geekodoc/rng/its.rng
6-
geekodoc/rng/*.srng
7-
geekodoc/rng/catalog.dtd
8-
geekodoc/rng/geekodoc5*.rng
9-
geekodoc/tests/*/*.err
10-
geekodoc/tests/last-test-run-errors
1+
tests/*/*.err
2+
tests/last-test-run-errors
113

124
build/
135
autom4te.cache/
146
# Makefile
7+
dist/
158

169
# Generated files, not to be added
1710
config.log
1811
config.status
19-
novdoc/rng/novdocx.rng
20-
novdoc/rng/novdocxi.rng
21-
novdoc/rng/novdocx-core.rnc
22-
novdoc/rng/novdocx-core.rng
23-
novdoc/rng/novdocxi-flat.rnc
24-
novdoc/rng/novdocxi-flat.rng
25-
geekodoc/rng/transclusion.rng
2612

2713
# Editor backups
2814
\#*#

.travis.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

ChangeLog

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
------------------------------------------------------------------
2-
Fri Feb 01 14:48:00 UTC 2018 - toms@opensuse.org
2+
Fri Aug 27 11:45:00 UTC 2021 - toms@opensuse.org
3+
4+
Release 2.0.0
5+
6+
This release contains a first distinction between GeekoDoc v1
7+
and GeekoDoc v2.
8+
9+
GeekoDoc v1 is frozen, only bugfixes will be integrated. Its main purpose
10+
is to validate old maintenance branches which weren't updated.
11+
12+
GeekoDoc v2 contains further changes and is based on the dbits schema
13+
(DocBook5 + ITS).
14+
15+
Common changes:
16+
* Revamp directory structure and introduce geekodoc/rng/<GDVER>_<DBVER>
17+
DBVER is the DocBook5 version which GeekoDoc is based upon (currently
18+
it's 5.2 at the time of writing)
19+
GDVER is the GeekoDoc version (1 or 2)
20+
* Add test cases for both GeekoDoc versions
21+
22+
GeekoDoc v1:
23+
* Describe installation on Debian/Ubuntu (#85)
24+
* Fix #69: reduce content model of replaceable (#71)
25+
* Fix #64: disallow empty sections (#72)
26+
* Fix #59: Reduce content model of command (#66)
27+
* Fix #63: restrict content model of book
28+
* Fix #61: remove depth attribute on imagedata
29+
30+
GeekoDoc v2:
31+
* Use all the changes from GeekoDoc v1
32+
* Fix #73: Restrict xml:id/linkend to alphanum + "-" (#75)
33+
* Release GeekoDoc 2.0.0 (#76)
34+
* Use dbitsxi.rnc (DocBook 5.2b10a5) as a basis, instead of
35+
docbookxi.rnc for GeekoDoc v1.
36+
This is needed for translation purposes.
37+
38+
39+
------------------------------------------------------------------
40+
Fri Feb 01 14:48:00 UTC 2019 - toms@opensuse.org
341

442
Release 1.0.4
543

GeekoDoc.xpr

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project>
3+
<meta>
4+
<filters directoryPatterns="" filePatterns="\QGeekoDoc.xpr\E" positiveFilePatterns="" showHiddenFiles="false"/>
5+
<options>
6+
<serialized xml:space="preserve">
7+
<serializableOrderedMap>
8+
<entry>
9+
<String>catalog.verbose.level</String>
10+
<Integer>1</Integer>
11+
</entry>
12+
<entry>
13+
<String>catalogs.v5</String>
14+
<String-array>
15+
<String>${pdu}/geekodoc/rng/catalog.xml</String>
16+
</String-array>
17+
</entry>
18+
<entry>
19+
<String>enable.project.master.files.support</String>
20+
<Boolean>true</Boolean>
21+
</entry>
22+
<entry>
23+
<String>key.xml.catalog.option.pane</String>
24+
<Boolean>true</Boolean>
25+
</entry>
26+
<entry>
27+
<String>prefer</String>
28+
<String>system</String>
29+
</entry>
30+
</serializableOrderedMap>
31+
</serialized>
32+
</options>
33+
</meta>
34+
<projectTree name="GeekoDoc.xpr">
35+
<folder masterFiles="true" name="Master Files">
36+
<file name="geekodoc/rng/1_5.1/geekodoc-v1.rnc"/>
37+
<file name="geekodoc/rng/2_5.2/geekodoc-v2.rnc"/>
38+
</folder>
39+
<folder path="."/>
40+
</projectTree>
41+
</project>

README.md

Lines changed: 99 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,96 @@
1-
# SUSE Schemas
1+
# GeekoDoc
22

3-
[![Build Status](https://travis-ci.org/openSUSE/geekodoc.svg?branch=develop)](https://travis-ci.org/openSUSE/geekodoc)
43

4+
[![Validating GeekoDoc](https://github.com/openSUSE/geekodoc/actions/workflows/validate.yml/badge.svg)](https://github.com/openSUSE/geekodoc/actions/workflows/validate.yml)
55

6-
## GeekoDoc
76

8-
GeekoDoc is a RELAX NG schema and a subset of DocBook 5. Currently, it can be
9-
used in two variants:
7+
## What is GeekoDoc?
108

11-
1. As the file `geekodoc5.rn{c,g}` which is based on `docbookxi.rn{c,g}`. In
12-
other words, the GeekoDoc schema cannot life without the DocBook schema.
13-
2. As a single`geekodoc5-flat.rn{c,g}`. This file is independant from the
14-
DocBook schema and can be used without having DocBook 5 installed on
15-
your system.
9+
GeekoDoc is a RELAX NG schema and a subset of DocBook 5. It restricts the
10+
content model of some elements and attributes to make it easier to
11+
write documents.
1612

17-
Both variants contain the same structure, elements, and attributes. They
18-
serve different purposes.
13+
Valid GeekoDoc documents are also valid DocBook 5 documents.
14+
15+
16+
## GeekoDoc Versions
17+
18+
GeekoDoc comes in two versions that are currently very similar.
19+
Their main difference is that GeekoDoc 2 restricts `xml:id` attributes
20+
to a more SEO-friendly subset of characters. More changes are to be
21+
expected in the future.
22+
23+
In general, we recommend using GeekoDoc 2 for all new projects.
24+
25+
* GeekoDoc 1: available via the URI `urn:x-suse:rng:v1:geekodoc-flat`
26+
* GeekoDoc 2: available via the URI `urn:x-suse:rng:v2:geekodoc-flat`
27+
28+
## Additional versions of GeekoDoc
29+
30+
* New, versioned URIs:
31+
* Available for GeekoDoc 1 and GeekoDoc 2
32+
* General syntax: `urn:x-suse:FORMAT:VERSION:SCHEMA`
33+
* FORMAT: can be `rnc` or `rng`
34+
* VERSION: can be `v1` or `v2`
35+
* SCHEMA: `geekodoc-flat`
36+
* Includes the following URIs:
37+
38+
urn:x-suse:rnc:v1:geekodoc-flat
39+
urn:x-suse:rng:v1:geekodoc-flat
40+
urn:x-suse:rnc:v2:geekodoc-flat
41+
urn:x-suse:rng:v2:geekodoc-flat
42+
43+
* Old, unversioned URIs (do not use for new projects):
44+
* Only available for GeekoDoc 1
45+
* General syntax: `urn:x-suse:rng:FILE`
46+
* Includes the following URIs:
47+
48+
urn:x-suse:rng:geekodoc5.rnc
49+
urn:x-suse:rng:geekodoc5-flat.rnc
50+
urn:x-suse:rng:geekodoc5.rng
51+
urn:x-suse:rng:geekodoc5-flat.rng
52+
53+
## Using GeekoDoc with DAPS
54+
55+
To use GeekoDoc for validating your XML documents with DAPS, add the
56+
following line in your `~/.config/daps/dapsrc` and replace `<URI>`
57+
with one of the URIs above:
58+
59+
DOCBOOK5_RNG_URI="<URI>"
60+
61+
It is possible to add the previous line into a DC file.
1962

2063

2164
## Creating Flat GeekoDoc
2265

23-
Creating the flat GeekoDoc schema requires the `rnginline` tool at
24-
https://github.com/h4l/rnginline/
66+
Creating the flat GeekoDoc schema requires the `rnginline` tool from
67+
https://github.com/h4l/rnginline/.
2568

2669
Use one of the following methods to install `rnginline`:
2770

2871
* Install from an RPM package
2972
* Install it in a Python virtual environment
3073

3174

32-
### Installing rnginline from RPM Package
75+
### Installing rnginline from RPM Package on openSUSE
3376

3477
The following procedure can be used for the latest openSUSE Leap release:
3578

36-
1. Add the repository:
79+
1. Add the `devel:languages:python` repository:
3780

38-
```
39-
$ sudo zypper ar https://download.opensuse.org/repositories/devel:/languages:/python/openSUSE_Leap_\$releasever/devel:languages:python.repo
40-
```
81+
* for openSUSE Leap:
82+
83+
```
84+
$ sudo zypper ar https://download.opensuse.org/repositories/devel:/languages:/python/openSUSE_Leap_\$releasever/devel:languages:python.repo
85+
```
86+
87+
* for openSUSE Tumbleweed:
88+
89+
```
90+
$ sudo zypper ar https://download.opensuse.org/repositories/devel:/languages:/python/openSUSE_Tumbleweed/devel:languages:python.repo
91+
```
4192
42-
2. Install it:
93+
2. Install the package:
4394
4495
```
4596
$ sudo zypper in python3-rnginline
@@ -51,6 +102,11 @@ The executable can be found in `/usr/bin/rnginline`.
51102
### Installing rnginline using a Python Virtual Environment
52103
53104
1. Install the RPM packages `python3-devel`, `libxml2-devel`, and `libxslt-devel`.
105+
On openSUSE, run:
106+
107+
```
108+
$ sudo zypper in python3-devel libxml2-devel libxslt-devel
109+
```
54110
55111
2. Create a Python3 virtual environment:
56112
@@ -64,7 +120,7 @@ The executable can be found in `/usr/bin/rnginline`.
64120
$ source .env3/bin/activate
65121
```
66122
67-
=> You should see a changed prompt (look for the "(.env3)" part).
123+
You should see a changed prompt (look for the `(.env3)` part).
68124
69125
3. Install the `rnginline` library from PyPi:
70126
@@ -80,9 +136,9 @@ The executable can be found in `.env3/bin/rnginline`.
80136
81137
1. Update your GitHub repository.
82138
83-
2. Change the directory to `geekodoc/rng`.
139+
2. Run `./build.sh`.
84140
85-
3. Run `make`.
141+
3. Find the built schema in `dist/geekodoc/rng/`.
86142
87143
88144
### Installing it on Debian/Ubuntu
@@ -119,7 +175,11 @@ To install GeekoDoc on Debian or Ubuntu from scratch, do the following steps:
119175
120176
$ xmlcatalog /etc/xml/catalog \
121177
https://github.com/openSUSE/geekodoc/raw/master/geekodoc/rng/geekodoc5-flat.rnc \
122-
urn:x-suse:rng:geekodoc5.rng
178+
urn:x-suse:rng:geekodoc5.rng \
179+
urn:x-suse:rnc:v1:geekodoc-flat \
180+
urn:x-suse:rng:v1:geekodoc-flat \
181+
urn:x-suse:rnc:v2:geekodoc-flat \
182+
urn:x-suse:rng:v2:geekodoc-flat
123183
124184
You should get something like this:
125185
@@ -141,3 +201,18 @@ $ rng2vim geekodoc5-flat.rng geekodoc
141201
```
142202
143203
The file `geekodoc.vim` can be used with vim.
204+
205+
206+
## Creating an Archive for Open Build Service
207+
208+
If you develop on GeekoDoc and would like to create an archive file
209+
for OBS, use the following steps:
210+
211+
1. Configure first the `bzip` command (this has to be done only once):
212+
213+
$ git config tar.tar.bz2.command "bzip2 -c"
214+
215+
2. Create an archive and save it in your OBS directory (`OBSDIR`):
216+
217+
$ git archive --format=tar.bz2 --prefix=geekodoc-2.0.1/ -o <OBSDIR>/geekodoc-2.0.1.tar.bz2 HEAD
218+

0 commit comments

Comments
 (0)