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.
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.
git checkout master
git pull
git checkout -b bracz-fork-foo-standard-to-draft
Add the DRAFT watermark:
Update state
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)
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.
git checkout master
git pull
git checkout -b bracz-adopt-foo-standard
Check the changes for gross errors
Update the ODT file to mark it as adopted
Save the ODT file, quit openoffice. Run make
to generate the PDF and TXT
output.
Update the ODT file to remove change markers
Save the ODT file, quit openoffice. Run make
to generate the PDF and TXT
output.
Commit the odt, pdf, txt files to your branch with comment "adopted with changes accepted"
Delete the files from the standards directory. This step should be skipped if we are adopting a document for 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 with comment "previous files removed"
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 with comment "move adopted files to standards/"
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