Build with AsciiDoc as well as Asciidoctor
And bump copyright years.
This commit is contained in:
parent
4073749d3b
commit
b0f1d3d6ea
@ -130,20 +130,31 @@ GETTEXT_CREATE_TRANSLATIONS (
|
||||
|
||||
# Documentation
|
||||
find_program (ASCIIDOCTOR_EXECUTABLE asciidoctor)
|
||||
if (NOT ASCIIDOCTOR_EXECUTABLE)
|
||||
message (FATAL_ERROR "asciidoctor not found")
|
||||
find_program (A2X_EXECUTABLE a2x)
|
||||
if (NOT ASCIIDOCTOR_EXECUTABLE AND NOT A2X_EXECUTABLE)
|
||||
message (FATAL_ERROR "Neither asciidoctor nor a2x were found")
|
||||
endif ()
|
||||
|
||||
foreach (page "${PROJECT_NAME}.1")
|
||||
set (page_output "${PROJECT_BINARY_DIR}/${page}")
|
||||
list (APPEND project_MAN_PAGES "${page_output}")
|
||||
add_custom_command (OUTPUT ${page_output}
|
||||
COMMAND ${ASCIIDOCTOR_EXECUTABLE} -b manpage
|
||||
-a release-version=${PROJECT_VERSION}
|
||||
"${PROJECT_SOURCE_DIR}/docs/${page}.adoc"
|
||||
-o "${page_output}"
|
||||
DEPENDS "docs/${page}.adoc"
|
||||
COMMENT "Generating man page for ${page}" VERBATIM)
|
||||
if (ASCIIDOCTOR_EXECUTABLE)
|
||||
add_custom_command (OUTPUT ${page_output}
|
||||
COMMAND ${ASCIIDOCTOR_EXECUTABLE} -b manpage
|
||||
-a release-version=${PROJECT_VERSION}
|
||||
-o "${page_output}"
|
||||
"${PROJECT_SOURCE_DIR}/docs/${page}.adoc"
|
||||
DEPENDS "docs/${page}.adoc"
|
||||
COMMENT "Generating man page for ${page}" VERBATIM)
|
||||
elseif (A2X_EXECUTABLE)
|
||||
add_custom_command (OUTPUT ${page_output}
|
||||
COMMAND ${A2X_EXECUTABLE} --doctype manpage --format manpage
|
||||
-a release-version=${PROJECT_VERSION}
|
||||
-D "${PROJECT_BINARY_DIR}"
|
||||
"${PROJECT_SOURCE_DIR}/docs/${page}.adoc"
|
||||
DEPENDS "docs/${page}.adoc"
|
||||
COMMENT "Generating man page for ${page}" VERBATIM)
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
add_custom_target (docs ALL DEPENDS ${project_MAN_PAGES})
|
||||
|
2
LICENSE
2
LICENSE
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2013 - 2021, Přemysl Eric Janouch <p@janouch.name>
|
||||
Copyright (c) 2013 - 2022, Přemysl Eric Janouch <p@janouch.name>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
11
README.adoc
11
README.adoc
@ -28,11 +28,14 @@ The rest of this README will concern itself with externalities.
|
||||
|
||||
Building and Running
|
||||
--------------------
|
||||
Build-only dependencies: CMake, pkg-config, gettext utilities, asciidoctor,
|
||||
Build-only dependencies:
|
||||
CMake, pkg-config, gettext utilities, asciidoctor or asciidoc +
|
||||
Optional build-only dependencies:
|
||||
librsvg (for the GUI), icoutils (for the GUI, when targetting Windows) +
|
||||
Runtime dependencies: ncursesw, zlib, ICU, termo (included), glib-2.0 >= 2.38,
|
||||
pango, xcb, xcb-xfixes (the latter two optional for the TUI),
|
||||
gtk+-3.0 (for the GUI)
|
||||
Runtime dependencies:
|
||||
ncursesw, zlib, ICU, termo (included), glib-2.0 >= 2.38, pango +
|
||||
Optional runtime dependencies:
|
||||
xcb, xcb-xfixes (the first two for the TUI), gtk+-3.0 (for the GUI)
|
||||
|
||||
$ git clone --recursive https://git.janouch.name/p/sdtui.git
|
||||
$ mkdir sdtui/build
|
||||
|
@ -48,10 +48,13 @@ Luckily, some compositors, such as Sway, synchronize selections with Xwayland.
|
||||
|
||||
To set up automatically loaded dictionaries, use the following scheme:
|
||||
|
||||
// AsciiDoc would otherwise like to process tildes as a long subscript.
|
||||
:tilde: ~
|
||||
|
||||
[subs="normal"]
|
||||
[Dictionaries]
|
||||
_name 1_ = __~/path/to/dict.ifo__
|
||||
_name 2_ = __~/another/dict.ifo__
|
||||
_name 1_ = __{tilde}/path/to/dict.ifo__
|
||||
_name 2_ = __{tilde}/another/dict.ifo__
|
||||
|
||||
The left-hand side keys define their appearance in the tab bar.
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* StarDict GTK+ UI
|
||||
*
|
||||
* Copyright (c) 2020 - 2021, Přemysl Eric Janouch <p@janouch.name>
|
||||
* Copyright (c) 2020 - 2022, Přemysl Eric Janouch <p@janouch.name>
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted.
|
||||
|
Loading…
Reference in New Issue
Block a user