-
standards
directory contains the adopted OpenLCB standards and the matching technical notes, with the version that is adopted. -
standards/lcc
directory contains the cover pages for the NMRA and the document versions submitted to the NMRA. These are always the same version as the adopted OpenLCB standard at the time plus the additional title page. -
drafts
directory contains the next version of adopted standards, as well as work in progress documents for protocols that were not adopted yet. -
schema
directory contains machine-readable standards used for validating the correctness for XML documents. -
archive
directory contains a variety prior artifacts (some of these might be outdated); includes some articles intended for users, an older versions of the web site, text files with collection of ideas and correspondence with the NMRA. -
bin
directory contains scripts and rules for generated artifacts.
If you need to change any standards or drafts, use the following process:
-
Create a new branch, either in your fork or in the main repository; prefixed with your username, e.g. bracz-fix-typo-in-message-network-std.
-
Make your edits in the ODT file. When you are in the drafts folder, make sure to have "Edit > Change tracking > Record" and "Show changes" both on.
-
Update the last changed date in menu > File > Properties, select Custom Properties, and update OlcbDate to the current date.
-
Save the ODT file and exit soffice.
-
Run make in the respective directory (standards or drafts) to generate PDF and TXT output.
-
Commit all three files (ODT, PDF, TXT).
-
Create a pull request. Make sure the pull request sets the "allow changes by the maintainer of the repository" if you are working from a fork. Assign reviewers from the repository maintainers to check your changes.
-
Wait for the reviewer to approve the change. Fix any comments. If the ODT file is changed, run
make
again to re-generate the PDF and TXT files.
If you are unable to run make
, ask a repository maintainer or help on the
openlcb@groups.io mailing list for someone to generate the PDF and TXT files
and push them to your branch.
When merging a PR, always use the "squash and merge" method in GitHub.
In order to successfully run make
, you need the following packages besides
libreoffice:
sudo apt-get install writer2latex links
The technical process for adopting a document is described in standards/Conventions.html.
- Perform a git copy with history for all three of these files on the master branch:
git checkout master
git cp standards/FooStandardS.odt drafts/FooStandardS.odt
git cp standards/FooStandardS.pdf drafts/FooStandardS.pdf
git cp standards/generated/FooStandardS.txt drafts/generated/FooStandardS.txt
git push
The git-cp script is available in the bin directory to do this. The script will only work if your repository is clean.
This step can only be done by a maintainer -- ask someone on the openlcb@groups.io list.
- Create a new brach:
git checkout master
git pull
git checkout -b bracz-fork-foo-standard-to-draft
- Add the DRAFT watermark:
- open drafts/StandardS.odt with openoffice
- menu > format > watermark...
- set watermark to DRAFT, font to Times New Roman, 45 degree, 50% gray.
- Update state
- menu > File > Properties
- select Custom Properties
- update OlcbStatus to Draft, and OlcbDate to the current date
-
Save the odt file, quit openoffice. Run
make
in the drafts folder. -
Commit all your changes (to the bracz-fork-foo-standard-to-draft branch)
- Note that there should be no changes to the generated/FooStandardS.txt at this point.
-
Push the branch to github. Create a PR. Ask for review.
-
Ask a maintainer to merge the PR. IMPORTANT: the PR MUST be merged using the "Create a Merge Commit" method.
- Create a new branch for the adoption process.
git checkout master
git pull
git checkout -b bracz-adopt-foo-standard
- Update the ODT file for adopted.
- Review all changes in menu > Edit > Track Changes > Manage...
- Accept all changes. There should be no changes left in the Manage changes dialog.
- In menu > File > Properties > Custom Properties, set OlcbStatus to Adopted, the date, and the year as a range up till now, e.g. 2013-2021.
- menu > Format > Watermark..., replace the DRAFT text with a single space.
-
Save the ODT file, quit openoffice. Run
make
to generate the PDF and TXT output. -
Commit the odt, pdf, txt files to your branch.
-
Delete the files from the standards directory. This step should be skipped if we are adopting a standard the first time, and there are no previous adopted files.
git rm standards/FooStandardS.odt
git rm standards/FooStandardS.pdf
git rm standards/generated/FooStandardS.txt
-
Commit these to your branch.
-
Move the files from draft to standards.
git mv {drafts,standards}/FooStandardS.odt
git mv {drafts,standards}/FooStandardS.pdf
git mv {drafts,standards}/generated/FooStandardS.txt
-
Commit these to your branch.
-
Create a PR with your changes on GitHub. Ask a maintainer to review the PR.
-
IMPORTANT: The PR must be merged with a "Create a merge commit" option.
A Docker image file has been added to provide a consistent file conversion processing environment in a Docker Container.
To build your own Docker execute the following command in a bash shell:
docker build -t openlcb-doc-build-env --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) .
To run your own Docker execute the following command in a bash shell:
docker run -it --rm -v $PWD:/home/openlcb -u $(id -u):$(id -g) openlcb-doc-build-env