From 94e0abbac1635c4baf4b8a51ccd7370d95b6be54 Mon Sep 17 00:00:00 2001 From: Bruno Kleinert Date: Fri, 6 Feb 2026 09:50:37 +0100 Subject: [PATCH] Optionally build documentation in small HTML files Add build target 'chunked-doc' for cmake and make. This calls pandoc in "chunked HTML" mode and creates a directory 'chunkedhtml/$LANG/' that contains multiple HTML files instead of a monolithic one. The output is intended for future use in the web interface like an "online help" system. It is unsuitable as a standalone documentation due to limitations of pandoc and does *not* replace the existing doc build target. --- CMakeLists.txt | 336 ++++++++++++++++++++++---------------- Documentation/de/index.md | 14 +- Documentation/en/index.md | 14 +- Documentation/es/index.md | 14 +- Makefile | 260 ++++++++++++++++++----------- 5 files changed, 380 insertions(+), 258 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e6bf271..2dc5cb96 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -428,144 +428,6 @@ set(DOC_DE Documentation/de/config-counter.md Documentation/de/automatic.md ) - -set(DOC_EN - Documentation/en/index.md - Documentation/en/startup-arguments.md - Documentation/en/general-settings.md - Documentation/en/config-controls.md - Documentation/en/config-intellibox.md - Documentation/en/config-mastercontrol2.md - Documentation/en/config-mastercontrol.md - Documentation/en/config-redbox.md - Documentation/en/config-twincenter.md - Documentation/en/control-6051.md - Documentation/en/control-cc-schnitte.md - Documentation/en/control-cs2-tcp.md - Documentation/en/control-cs2-udp.md - Documentation/en/control-hsi88.md - Documentation/en/control-opendcc-z1.md - Documentation/en/control-z21.md - Documentation/en/config-rs232-usb.md - Documentation/en/config-locomotives.md - Documentation/en/config-multipleunits.md - Documentation/en/config-layers.md - Documentation/en/config-tracks.md - Documentation/en/config-groups.md - Documentation/en/config-switches.md - Documentation/en/config-signals.md - Documentation/en/config-accessories.md - Documentation/en/config-routes.md - Documentation/en/config-feedbacks.md - Documentation/en/config-texts.md - Documentation/en/config-counter.md - Documentation/en/automatic.md -) - -set(DOC_ES - Documentation/es/index.md - Documentation/es/startup-arguments.md - Documentation/es/general-settings.md - Documentation/es/config-controls.md - Documentation/es/config-intellibox.md - Documentation/es/config-mastercontrol2.md - Documentation/es/config-mastercontrol.md - Documentation/es/config-redbox.md - Documentation/es/config-twincenter.md - Documentation/es/control-6051.md - Documentation/es/control-cc-schnitte.md - Documentation/es/control-cs2-tcp.md - Documentation/es/control-cs2-udp.md - Documentation/es/control-hsi88.md - Documentation/es/control-opendcc-z1.md - Documentation/es/control-z21.md - Documentation/es/config-rs232-usb.md - Documentation/es/config-locomotives.md - Documentation/es/config-multipleunits.md - Documentation/es/config-layers.md - Documentation/es/config-tracks.md - Documentation/es/config-groups.md - Documentation/es/config-switches.md - Documentation/es/config-signals.md - Documentation/es/config-accessories.md - Documentation/es/config-routes.md - Documentation/es/config-feedbacks.md - Documentation/es/config-texts.md - Documentation/es/config-counter.md - Documentation/es/automatic.md -) - -set(OUTPUT_HTML_DE ${CMAKE_BINARY_DIR}/doc/de/index.html) -set(OUTPUT_HTML_EN ${CMAKE_BINARY_DIR}/doc/en/index.html) -set(OUTPUT_HTML_ES ${CMAKE_BINARY_DIR}/doc/es/index.html) - -file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/doc/de) -file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/doc/en) -file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/doc/es) - -add_custom_command( - OUTPUT ${OUTPUT_HTML_DE} - COMMAND pandoc --toc --toc-depth=2 --standalone --css=../style.css - --template=Documentation/template.html - --metadata-file=Documentation/de/metadata.yaml ${DOC_DE} - --output=${OUTPUT_HTML_DE} - DEPENDS ${DOC_DE} - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - COMMENT "Generating German HTML documentation" - VERBATIM -) - -add_custom_command( - OUTPUT ${OUTPUT_HTML_EN} - COMMAND pandoc --toc --toc-depth=2 --standalone --css=../style.css - --template=Documentation/template.html - --metadata-file=Documentation/en/metadata.yaml ${DOC_EN} - --output=${OUTPUT_HTML_EN} - DEPENDS ${DOC_EN} - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - COMMENT "Generating English HTML documentation" - VERBATIM -) - -add_custom_command( - OUTPUT ${OUTPUT_HTML_ES} - COMMAND pandoc --toc --toc-depth=2 --standalone --css=../style.css - --template=Documentation/template.html - --metadata-file=Documentation/es/metadata.yaml ${DOC_ES} - --output=${OUTPUT_HTML_ES} - DEPENDS ${DOC_ES} - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - COMMENT "Generating Spanish HTML documentation" - VERBATIM -) - -set(DOCDATA - ${PROJECT_SOURCE_DIR}/Documentation/menu_accessory.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_booster.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_control.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_counter.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_feedback.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_fullscreen.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_group.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_layer.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_loco.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_menu.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_multipleunit.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_program.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_quit.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_route.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_settings.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_signalgreen.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_signal.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_signalred.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_stop.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_street.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_switch.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_text.png - ${PROJECT_SOURCE_DIR}/Documentation/menu_track.png - ${PROJECT_SOURCE_DIR}/Documentation/style.css -) - set(DOCDATA_DE ${PROJECT_SOURCE_DIR}/Documentation/de/config_layers_de.png ${PROJECT_SOURCE_DIR}/Documentation/de/control_list_de.png @@ -606,6 +468,38 @@ set(DOCDATA_DE ${PROJECT_SOURCE_DIR}/Documentation/de/tracks_position_de.png ) +set(DOC_EN + Documentation/en/index.md + Documentation/en/startup-arguments.md + Documentation/en/general-settings.md + Documentation/en/config-controls.md + Documentation/en/config-intellibox.md + Documentation/en/config-mastercontrol2.md + Documentation/en/config-mastercontrol.md + Documentation/en/config-redbox.md + Documentation/en/config-twincenter.md + Documentation/en/control-6051.md + Documentation/en/control-cc-schnitte.md + Documentation/en/control-cs2-tcp.md + Documentation/en/control-cs2-udp.md + Documentation/en/control-hsi88.md + Documentation/en/control-opendcc-z1.md + Documentation/en/control-z21.md + Documentation/en/config-rs232-usb.md + Documentation/en/config-locomotives.md + Documentation/en/config-multipleunits.md + Documentation/en/config-layers.md + Documentation/en/config-tracks.md + Documentation/en/config-groups.md + Documentation/en/config-switches.md + Documentation/en/config-signals.md + Documentation/en/config-accessories.md + Documentation/en/config-routes.md + Documentation/en/config-feedbacks.md + Documentation/en/config-texts.md + Documentation/en/config-counter.md + Documentation/en/automatic.md +) set(DOCDATA_EN ${PROJECT_SOURCE_DIR}/Documentation/en/config_layers_en.png ${PROJECT_SOURCE_DIR}/Documentation/en/control_list_en.png @@ -644,6 +538,38 @@ set(DOCDATA_EN ${PROJECT_SOURCE_DIR}/Documentation/en/tracks_position_en.png ) +set(DOC_ES + Documentation/es/index.md + Documentation/es/startup-arguments.md + Documentation/es/general-settings.md + Documentation/es/config-controls.md + Documentation/es/config-intellibox.md + Documentation/es/config-mastercontrol2.md + Documentation/es/config-mastercontrol.md + Documentation/es/config-redbox.md + Documentation/es/config-twincenter.md + Documentation/es/control-6051.md + Documentation/es/control-cc-schnitte.md + Documentation/es/control-cs2-tcp.md + Documentation/es/control-cs2-udp.md + Documentation/es/control-hsi88.md + Documentation/es/control-opendcc-z1.md + Documentation/es/control-z21.md + Documentation/es/config-rs232-usb.md + Documentation/es/config-locomotives.md + Documentation/es/config-multipleunits.md + Documentation/es/config-layers.md + Documentation/es/config-tracks.md + Documentation/es/config-groups.md + Documentation/es/config-switches.md + Documentation/es/config-signals.md + Documentation/es/config-accessories.md + Documentation/es/config-routes.md + Documentation/es/config-feedbacks.md + Documentation/es/config-texts.md + Documentation/es/config-counter.md + Documentation/es/automatic.md +) set(DOCDATA_ES ${PROJECT_SOURCE_DIR}/Documentation/es/config_layers_es.png ${PROJECT_SOURCE_DIR}/Documentation/es/control_list_es.png @@ -680,6 +606,79 @@ set(DOCDATA_ES ${PROJECT_SOURCE_DIR}/Documentation/es/tracks_position_es.png ) +set(DOCDATA + ${PROJECT_SOURCE_DIR}/Documentation/menu_accessory.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_booster.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_control.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_counter.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_feedback.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_fullscreen.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_group.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_layer.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_loco.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_menu.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_multipleunit.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_program.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_quit.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_route.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_settings.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_signalgreen.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_signal.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_signalred.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_stop.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_street.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_switch.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_text.png + ${PROJECT_SOURCE_DIR}/Documentation/menu_track.png + ${PROJECT_SOURCE_DIR}/Documentation/style.css +) + +set(OUTPUT_HTML_DE ${CMAKE_BINARY_DIR}/doc/de/index.html) +set(OUTPUT_HTML_EN ${CMAKE_BINARY_DIR}/doc/en/index.html) +set(OUTPUT_HTML_ES ${CMAKE_BINARY_DIR}/doc/es/index.html) + +file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/doc/de) +file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/doc/en) +file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/doc/es) + +set(PANDOC_OPTS --toc --toc-depth=2 + --standalone + --css=../style.css + --template=Documentation/template.html) + +add_custom_command( + OUTPUT ${OUTPUT_HTML_DE} + COMMAND pandoc ${PANDOC_OPTS} + --metadata-file=Documentation/de/metadata.yaml + --output=${OUTPUT_HTML_DE} ${DOC_DE} + DEPENDS ${DOC_DE} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + COMMENT "Generating German HTML documentation" + VERBATIM +) + +add_custom_command( + OUTPUT ${OUTPUT_HTML_EN} + COMMAND pandoc ${PANDOC_OPTS} + --metadata-file=Documentation/en/metadata.yaml + --output=${OUTPUT_HTML_EN} ${DOC_EN} + DEPENDS ${DOC_EN} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + COMMENT "Generating English HTML documentation" + VERBATIM +) + +add_custom_command( + OUTPUT ${OUTPUT_HTML_ES} + COMMAND pandoc ${PANDOC_OPTS} + --metadata-file=Documentation/es/metadata.yaml + --output=${OUTPUT_HTML_ES} ${DOC_ES} + DEPENDS ${DOC_ES} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + COMMENT "Generating Spanish HTML documentation" + VERBATIM +) + add_custom_target(doc DEPENDS ${OUTPUT_HTML_DE} ${OUTPUT_HTML_EN} ${OUTPUT_HTML_ES} ) @@ -732,5 +731,66 @@ add_custom_command(TARGET doc-for-web POST_BUILD ${PROJECT_BINARY_DIR}/doc/es/documentation-es ) +# Build documentation as small HTML files ("chunked html") +set(OUTPUT_CHUNKEDHTML_DE ${CMAKE_BINARY_DIR}/chunkedhtml/de) +set(OUTPUT_CHUNKEDHTML_EN ${CMAKE_BINARY_DIR}/chunkedhtml/en) +set(OUTPUT_CHUNKEDHTML_ES ${CMAKE_BINARY_DIR}/chunkedhtml/es) +file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/chunkedhtml) + +set(PANDOC_CHUNKEDOPTS --toc --toc-depth=2 + --standalone + --css=../style.css + --template=Documentation/template.html + --write=chunkedhtml + --embed-resources + --split-level=1) +add_custom_command( + OUTPUT ${OUTPUT_CHUNKEDHTML_DE}/index.html + COMMAND pandoc ${PANDOC_CHUNKEDOPTS} + --resource-path=".:Documentation:Documentation/de:doc:doc/de" + --metadata-file=Documentation/de/metadata.yaml + --output=${OUTPUT_CHUNKEDHTML_DE} ${DOC_DE} + DEPENDS ${DOC_DE} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + COMMENT "Generating German Chunked HTML documentation" + VERBATIM +) + +add_custom_command( + OUTPUT ${OUTPUT_CHUNKEDHTML_EN}/index.html + COMMAND pandoc ${PANDOC_CHUNKEDOPTS} + --resource-path=".:Documentation:Documentation/en:doc:doc/en" + --metadata-file=Documentation/en/metadata.yaml + --output=${OUTPUT_CHUNKEDHTML_EN} ${DOC_EN} + DEPENDS ${DOC_EN} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + COMMENT "Generating English Chunked HTML documentation" + VERBATIM +) + +add_custom_command( + OUTPUT ${OUTPUT_CHUNKEDHTML_ES}/index.html + COMMAND pandoc ${PANDOC_CHUNKEDOPTS} + --resource-path="doc/en:Documentation/en:.:Documentation:Documentation/es:doc:doc/es" + --metadata-file=Documentation/es/metadata.yaml + --output=${OUTPUT_CHUNKEDHTML_ES} ${DOC_ES} + DEPENDS ${DOC_ES} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + COMMENT "Generating Spanish Chunked HTML documentation" + VERBATIM +) + +add_custom_target(chunked-doc + DEPENDS ${OUTPUT_CHUNKEDHTML_DE}/index.html ${OUTPUT_CHUNKEDHTML_EN}/index.html ${OUTPUT_CHUNKEDHTML_ES}/index.html +) + +foreach(DOCDATA ${DOCDATA}) + add_custom_command(TARGET chunked-doc POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + ${DOCDATA} + ${PROJECT_BINARY_DIR}/chunkedhtml + ) +endforeach() + include(CTest) add_test(NAME pytest COMMAND pytest -vv ${CMAKE_SOURCE_DIR}/tests) diff --git a/Documentation/de/index.md b/Documentation/de/index.md index d4310686..a19a550d 100644 --- a/Documentation/de/index.md +++ b/Documentation/de/index.md @@ -1,14 +1,14 @@ # Herunterladen RailControl kann auf der [Download](https://www.railcontrol.org/index.php/de/download-de "Download-Seite")-Seite heruntergeladen werden. -# Installieren +## Installieren Das heruntergeladene Archiv kann an jedem Ort auf dem PC ausgepackt werden. -## Installieren unter Windows +### Installieren unter Windows Unter Windows muss beachtet werden, dass RailControl in einem Unterverzeichnis entpackt wird. z.B. ist D:\\ nicht zulässig, D:\\Modellbahn\\ hingegen ist in Ordnung. -## Installieren unter Debian GNU/Linux +### Installieren unter Debian GNU/Linux Ab Debian GNU/Linux 13 "trixie" ist RailControl in Debian. Mit diesem Befehl wird RailControl installiert: @@ -19,20 +19,20 @@ sudo apt install railcontrol **Hinweis:** Debian-spezifische Dokumentation befindet sich im Verzeichnis `/usr/share/doc/railcontrol`. -# Konfigurations-Datei +## Konfigurations-Datei Im ausgepackten Archiv befindet sich eine Vorlage der Konfigurations-Datei (railcontrol.conf.dist). Diese wird beim ersten Start von RailControl nach railcontrol.conf kopiert. Üblicherweise ist es nicht nötig darin Einstellungen zu ändern. -# Starten von RailControl +## Starten von RailControl RailControl kann gestartet werden mit einem Doppelklick auf die ausführbare Datei railcontrol.exe (Windows) bzw. railcontrol (andere Betriebssysteme). Um ausführliche Informationen zu erhalten wird empfohlen RailControl von der Kommandozeile aus zu starten. Bei einem Start von der Kommandozeile aus kann das Verhalten von RailControl noch angepasst werden mit verschiedenen [Argumenten beim Programmstart](#argumente-beim-programmstart). -# Beenden von RailControl +## Beenden von RailControl RailControl sollte beendet werden, indem man in der Server-Konsole q+Enter eingibt oder Ctrl+C drückt oder im Browser auf den entsprechenden Button klickt. **Wichtig: Wenn einfach oben rechts das X gedrückt wird, werden die Einstellungen nicht vollständig gespeichert und beim nächsten Start treten Probleme auf.** Mehrmaliges drücken von q+Enter, Ctrl+C oder Beenden-Button im Browser beendet RailControl vorzeitig. Dies sollte nur gemacht werden, wenn RailControl nicht sauber herunterfährt. -# Browser +## Browser Wenn RailControl gestartet wurde, kann mit einem aktuellen Browser zu RailControl verbunden werden. RailControl listet die möglichen Links im Fenster auf. Einer dieser Links kann in den Browser kopiert werden. Die Links mit localhost, 127.0.0.1 und [::1] funktionieren nur auf dem Gerät auf dem auch RailControl ausgeführt wird. # Funktionen und Konfigurationen diff --git a/Documentation/en/index.md b/Documentation/en/index.md index e67c1957..4c3d2351 100644 --- a/Documentation/en/index.md +++ b/Documentation/en/index.md @@ -1,13 +1,13 @@ # Download RailControl can be downloaded on the [Download](https://www.railcontrol.org/index.php/en/download-en)-page. -# Installation +## Installation The downloaded archive can be extracted everywhere on the computer. -## Installing on Windows +### Installing on Windows On Windows the archive has to be extracted in a subdirectory. For example D:\\ is not allowed, D:\\ModelRailway\\ is OK. -## Installing on Debian GNU/Linux +### Installing on Debian GNU/Linux Since Debian GNU/Linux 13 "trixie" RailControl is included in Debian. To install, execute in a terminal @@ -19,20 +19,20 @@ sudo apt install railcontrol **Note:** Debian-specific documentation is located in the directory `/usr/share/doc/railcontrol`. -# Configuration-File +## Configuration-File In the extracted archive there is a template of the configuration file (railcontrol.conf.dist). At first start of RailControl it will be copied to railcontrol.conf. Usually it is not needed to change any settings in the config file. -# Starting RailControl +## Starting RailControl RailControl can be started with a double click on the executable file railcontrol.exe (Windows) respectively railcontrol (other operation systems). To get logging informations from RailControl it is recommended to start RailControl from a console. Also possible is to change the behavior of RailControl with [startup arguments](#startup-arguments). -# Shutdown RailControl +## Shutdown RailControl RailControl should be terminated by entering q+Enter or Ctrl+C in the RailControl-terminal or by using the top left button in the browser. **Important: If the X in the top right of the RailControl-terminal is used some settings are not stored correctly and problems can apear when starting RailControl again.** Entering q+Enter or Ctrl+C in the terminal or using the terminate-button in the browser multiple times will terminate RailControl early. This should only be used if RailControl does not shutdown cleanly. -# Browser +## Browser If RailControl already has started one can connect with a recent Browser. RailControl lists the possible links that can be used in the browser. One of these links can be copied into the browser. Links with localhost, 127.0.0.1 and [::1] only work on the device where RailControl is executed. The other links also work on other devices. # Functions and Configuration diff --git a/Documentation/es/index.md b/Documentation/es/index.md index f8277ade..16d39739 100644 --- a/Documentation/es/index.md +++ b/Documentation/es/index.md @@ -1,13 +1,13 @@ # Descargar Se puede descargar RailControl de la pagina [Download](https://www.railcontrol.org/index.php/es/download-es). -# Instalación +## Instalación Se puede extraer el archivo descargado en qualquier lugar de la computadora. -## Instalación en Windows +### Instalación en Windows En Windows se tiene que extraer el archivo en una subcarpeta. D:\\ no vale, D:\\Modelismo está bien. -## Instalación en Debian GNU/Linux +### Instalación en Debian GNU/Linux Deste Debian GNU/Linux 13 "trixie" RailControl está incluido en Debian. Se puede installar con este commando: @@ -18,20 +18,20 @@ sudo apt install railcontrol **Nota:** La documentación específica de Debian se encuentra en el directorio `/usr/share/doc/railcontrol`. -# Fichero de la configuración +## Fichero de la configuración En el archivo extraido hay una plantilla de archivo de la configuración (railcontrol.conf.dist). Durante el primero inicio de RailControl la plantilla está copiado a railcontrol.conf. Normalmente no es necesario cambiar algo en el archivo de configuración. -# Arrancar RailControl +## Arrancar RailControl Con un doble clic en railcontrol.exe (Windows) o railcontrol (otras sistemas) se puede poner en marcha RailControl. Está recomendado utilizar RailControl en un terminal para recibir más informaciones sobre RailControl. Tambien en un terminal se puede cambiar el funcionamiento de Railcontrol con argumentos de inicio. -# Terminar RailControl +## Terminar RailControl Se puede terminar RailControl por entrar q+Enter o Ctrl+C en el terminal de RailControl o usar el botón en el navegador internet. **Importante: Usar la X arriba en la derecha del terminal de RailControl puede dar problemas para guardar los ajustes y puede dar problemas para arrancar Railcontrol otra vez.** Entrar q+Enter o Ctrl+C en el terminal o usar el botton en el navegador multiples veces va a terminar RailControl de inmediatamente. Usa eso opción solamente si RailControl no termina correctamente. -# Navegador Internet +## Navegador Internet Despues poner RailControl en marcha, se puede conectar a RailControl con un navegador internet actual. RailControl muestra los enlaces posibles durante el inicio. Se puede copiar uno de los enlaces al navegador internet. Los enlaces con localhost, 127.0.0.1 y [::1] solamente funcionan en el mismo dispositivo como RailControl. # Funciones y configuración diff --git a/Makefile b/Makefile index cf09983d..b1f5a7d3 100644 --- a/Makefile +++ b/Makefile @@ -105,6 +105,7 @@ clean: rm -f *.o DataModel/*.o Hardware/*.o Hardware/Protocols/*.o Hardware/zlib/*.o Logger/*.o Network/*.o Storage/*.o Storage/sqlite/*.o Utils/*.o Server/Web/*.o Server/CS2/*.o Server/Z21/*.o rm -f railcontrol rm -f Documentation/de/index.html Documentation/en/index.html Documentation/es/index.html + rm -rf Documentation/chunkedhtml clean-sqlite-shell: make -C Storage/sqlite clean @@ -123,110 +124,171 @@ Version.cpp: Version.cpp.in VERSION_RAILCONTROL VERSION_GIT_HASH VERSION_GIT_TIM -e s/@RAILCONTROL_VERSION@/$(RAILCONTROL_VERSION)/ \ < $< > $@ +DOC_DE=Documentation/de/index.md \ + Documentation/de/startup-arguments.md \ + Documentation/de/general-settings.md \ + Documentation/de/config-controls.md \ + Documentation/de/config-intellibox.md \ + Documentation/de/config-mastercontrol2.md \ + Documentation/de/config-mastercontrol.md \ + Documentation/de/config-redbox.md \ + Documentation/de/config-twincenter.md \ + Documentation/de/control-6051.md \ + Documentation/de/control-cc-schnitte.md \ + Documentation/de/control-cs2-tcp.md \ + Documentation/de/control-cs2-udp.md \ + Documentation/de/control-hsi88.md \ + Documentation/de/control-opendcc-z1.md \ + Documentation/de/control-z21.md \ + Documentation/de/config-rs232-usb.md \ + Documentation/de/config-locomotives.md \ + Documentation/de/config-multipleunits.md \ + Documentation/de/config-layers.md \ + Documentation/de/config-tracks.md \ + Documentation/de/config-groups.md \ + Documentation/de/config-switches.md \ + Documentation/de/config-signals.md \ + Documentation/de/config-accessories.md \ + Documentation/de/config-routes.md \ + Documentation/de/config-feedbacks.md \ + Documentation/de/config-texts.md \ + Documentation/de/config-counter.md \ + Documentation/de/automatic.md + +DOC_EN=Documentation/en/index.md \ + Documentation/en/startup-arguments.md \ + Documentation/en/general-settings.md \ + Documentation/en/config-controls.md \ + Documentation/en/config-intellibox.md \ + Documentation/en/config-mastercontrol2.md \ + Documentation/en/config-mastercontrol.md \ + Documentation/en/config-redbox.md \ + Documentation/en/config-twincenter.md \ + Documentation/en/control-6051.md \ + Documentation/en/control-cc-schnitte.md \ + Documentation/en/control-cs2-tcp.md \ + Documentation/en/control-cs2-udp.md \ + Documentation/en/control-hsi88.md \ + Documentation/en/control-opendcc-z1.md \ + Documentation/en/control-z21.md \ + Documentation/en/config-rs232-usb.md \ + Documentation/en/config-locomotives.md \ + Documentation/en/config-multipleunits.md \ + Documentation/en/config-layers.md \ + Documentation/en/config-tracks.md \ + Documentation/en/config-groups.md \ + Documentation/en/config-switches.md \ + Documentation/en/config-signals.md \ + Documentation/en/config-accessories.md \ + Documentation/en/config-routes.md \ + Documentation/en/config-feedbacks.md \ + Documentation/en/config-texts.md \ + Documentation/en/config-counter.md \ + Documentation/en/automatic.md + +DOC_ES=Documentation/es/index.md \ + Documentation/es/startup-arguments.md \ + Documentation/es/general-settings.md \ + Documentation/es/config-controls.md \ + Documentation/es/config-intellibox.md \ + Documentation/es/config-mastercontrol2.md \ + Documentation/es/config-mastercontrol.md \ + Documentation/es/config-redbox.md \ + Documentation/es/config-twincenter.md \ + Documentation/es/control-6051.md \ + Documentation/es/control-cc-schnitte.md \ + Documentation/es/control-cs2-tcp.md \ + Documentation/es/control-cs2-udp.md \ + Documentation/es/control-hsi88.md \ + Documentation/es/control-opendcc-z1.md \ + Documentation/es/control-z21.md \ + Documentation/es/config-rs232-usb.md \ + Documentation/es/config-locomotives.md \ + Documentation/es/config-multipleunits.md \ + Documentation/es/config-layers.md \ + Documentation/es/config-tracks.md \ + Documentation/es/config-groups.md \ + Documentation/es/config-switches.md \ + Documentation/es/config-signals.md \ + Documentation/es/config-accessories.md \ + Documentation/es/config-routes.md \ + Documentation/es/config-feedbacks.md \ + Documentation/es/config-texts.md \ + Documentation/es/config-counter.md \ + Documentation/es/automatic.md + +DOCDATA=Documentation/menu_accessory.png \ + Documentation/menu_booster.png \ + Documentation/menu_control.png \ + Documentation/menu_counter.png \ + Documentation/menu_feedback.png \ + Documentation/menu_fullscreen.png \ + Documentation/menu_group.png \ + Documentation/menu_layer.png \ + Documentation/menu_loco.png \ + Documentation/menu_menu.png \ + Documentation/menu_multipleunit.png \ + Documentation/menu_program.png \ + Documentation/menu_quit.png \ + Documentation/menu_route.png \ + Documentation/menu_settings.png \ + Documentation/menu_signalgreen.png \ + Documentation/menu_signal.png \ + Documentation/menu_signalred.png \ + Documentation/menu_stop.png \ + Documentation/menu_street.png \ + Documentation/menu_switch.png \ + Documentation/menu_text.png \ + Documentation/menu_track.png \ + Documentation/style.css + +PANDOC_OPTS=--toc --toc-depth=2 \ + --standalone \ + --css=../style.css \ + --template=Documentation/template.html + doc: - pandoc --toc --toc-depth=2 --standalone --css=../style.css \ - --template=Documentation/template.html \ + pandoc $(PANDOC_OPTS) \ --metadata-file=Documentation/de/metadata.yaml \ - Documentation/de/index.md \ - Documentation/de/startup-arguments.md \ - Documentation/de/general-settings.md \ - Documentation/de/config-controls.md \ - Documentation/de/config-intellibox.md \ - Documentation/de/config-mastercontrol2.md \ - Documentation/de/config-mastercontrol.md \ - Documentation/de/config-redbox.md \ - Documentation/de/config-twincenter.md \ - Documentation/de/control-6051.md \ - Documentation/de/control-cc-schnitte.md \ - Documentation/de/control-cs2-tcp.md \ - Documentation/de/control-cs2-udp.md \ - Documentation/de/control-hsi88.md \ - Documentation/de/control-opendcc-z1.md \ - Documentation/de/control-z21.md \ - Documentation/de/config-rs232-usb.md \ - Documentation/de/config-locomotives.md \ - Documentation/de/config-multipleunits.md \ - Documentation/de/config-layers.md \ - Documentation/de/config-tracks.md \ - Documentation/de/config-groups.md \ - Documentation/de/config-switches.md \ - Documentation/de/config-signals.md \ - Documentation/de/config-accessories.md \ - Documentation/de/config-routes.md \ - Documentation/de/config-feedbacks.md \ - Documentation/de/config-texts.md \ - Documentation/de/config-counter.md \ - Documentation/de/automatic.md \ - --output=Documentation/de/index.html - pandoc --toc --toc-depth=2 --standalone --css=../style.css \ - --template=Documentation/template.html \ + --output=Documentation/de/index.html \ + $(DOC_DE) + pandoc $(PANDOC_OPTS) \ --metadata-file=Documentation/en/metadata.yaml \ - Documentation/en/index.md \ - Documentation/en/startup-arguments.md \ - Documentation/en/general-settings.md \ - Documentation/en/config-controls.md \ - Documentation/en/config-intellibox.md \ - Documentation/en/config-mastercontrol2.md \ - Documentation/en/config-mastercontrol.md \ - Documentation/en/config-redbox.md \ - Documentation/en/config-twincenter.md \ - Documentation/en/control-6051.md \ - Documentation/en/control-cc-schnitte.md \ - Documentation/en/control-cs2-tcp.md \ - Documentation/en/control-cs2-udp.md \ - Documentation/en/control-hsi88.md \ - Documentation/en/control-opendcc-z1.md \ - Documentation/en/control-z21.md \ - Documentation/en/config-rs232-usb.md \ - Documentation/en/config-locomotives.md \ - Documentation/en/config-multipleunits.md \ - Documentation/en/config-layers.md \ - Documentation/en/config-tracks.md \ - Documentation/en/config-groups.md \ - Documentation/en/config-switches.md \ - Documentation/en/config-signals.md \ - Documentation/en/config-accessories.md \ - Documentation/en/config-routes.md \ - Documentation/en/config-feedbacks.md \ - Documentation/en/config-texts.md \ - Documentation/en/config-counter.md \ - Documentation/en/automatic.md \ - --output=Documentation/en/index.html - pandoc --toc --toc-depth=2 --standalone --css=../style.css \ - --template=Documentation/template.html \ + --output=Documentation/en/index.html \ + $(DOC_EN) + pandoc $(PANDOC_OPTS) \ --metadata-file=Documentation/es/metadata.yaml \ - Documentation/es/index.md \ - Documentation/es/startup-arguments.md \ - Documentation/es/general-settings.md \ - Documentation/es/config-controls.md \ - Documentation/es/config-intellibox.md \ - Documentation/es/config-mastercontrol2.md \ - Documentation/es/config-mastercontrol.md \ - Documentation/es/config-redbox.md \ - Documentation/es/config-twincenter.md \ - Documentation/es/control-6051.md \ - Documentation/es/control-cc-schnitte.md \ - Documentation/es/control-cs2-tcp.md \ - Documentation/es/control-cs2-udp.md \ - Documentation/es/control-hsi88.md \ - Documentation/es/control-opendcc-z1.md \ - Documentation/es/control-z21.md \ - Documentation/es/config-rs232-usb.md \ - Documentation/es/config-locomotives.md \ - Documentation/es/config-multipleunits.md \ - Documentation/es/config-layers.md \ - Documentation/es/config-tracks.md \ - Documentation/es/config-groups.md \ - Documentation/es/config-switches.md \ - Documentation/es/config-signals.md \ - Documentation/es/config-accessories.md \ - Documentation/es/config-routes.md \ - Documentation/es/config-feedbacks.md \ - Documentation/es/config-texts.md \ - Documentation/es/config-counter.md \ - Documentation/es/automatic.md \ - --output=Documentation/es/index.html + --output=Documentation/es/index.html \ + $(DOC_ES) doc-for-web: echo 'Nothing to do: The directory structure in Documentation/$LANGUAGE/documentation-$LANGUAGE already is in place.' +PANDOC_CHUNKEDOPTS=--toc --toc-depth=2 \ + --standalone \ + --css=../style.css \ + --template=Documentation/template.html \ + --write=chunkedhtml \ + --embed-resources \ + --split-level=1 + +chunked-doc: + # pandoc stops with an error if the target directory for chunked HTML + # output already exists. So we unconditionally toss everything and + # create an empty directory. + rm -rf Documentation/chunkedhtml + mkdir -p Documentation/chunkedhtml + pandoc $(PANDOC_CHUNKEDOPTS) \ + --resource-path=".:Documentation:Documentation/de:doc:doc/de" \ + --metadata-file=Documentation/de/metadata.yaml \ + --output=Documentation/chunkedhtml/de $(DOC_DE) + pandoc $(PANDOC_CHUNKEDOPTS) \ + --resource-path=".:Documentation:Documentation/en:doc:doc/en" \ + --metadata-file=Documentation/en/metadata.yaml \ + --output=Documentation/chunkedhtml/en $(DOC_EN) + pandoc $(PANDOC_CHUNKEDOPTS) \ + --resource-path="doc/en:Documentation/en:.:Documentation:Documentation/es:doc:doc/es" \ + --metadata-file=Documentation/es/metadata.yaml \ + --output=Documentation/chunkedhtml/es $(DOC_ES) + cp $(DOCDATA) Documentation/chunkedhtml +