[office/ghostwriter] /: Port manpage to docbook
Megan Conkle
null at kde.org
Tue Nov 1 18:31:16 GMT 2022
Git commit d773dd68f5815a20215f71e5691891ff564bf718 by Megan Conkle, on behalf of Carl Schwan.
Committed on 01/11/2022 at 18:31.
Pushed by wereturtle into branch 'master'.
Port manpage to docbook
Allow for translations of it
M +11 -2 CMakeLists.txt
A +5 -0 doc/CMakeLists.txt
A +89 -0 doc/man-ghostwriter.1.docbook
D +0 -24 resources/linux/ghostwriter.1
https://invent.kde.org/office/ghostwriter/commit/d773dd68f5815a20215f71e5691891ff564bf718
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 70d9bfc..6759d00 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,12 +52,23 @@ if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/poqm")
ecm_install_po_files_as_qm(poqm)
endif()
+find_package(KF5DocTools ${KF5_MIN_VERSION})
+set_package_properties(KF5DocTools PROPERTIES DESCRIPTION
+ "Tools to generate documentation"
+ TYPE OPTIONAL
+)
+
set(QTAWESOME_USE_FREE ON)
add_subdirectory(3rdparty/QtAwesome)
set(CMARK_TESTS OFF)
add_subdirectory(3rdparty/cmark-gfm EXCLUDE_FROM_ALL)
add_subdirectory(src)
+if(KF5DocTools_FOUND)
+ kdoctools_install(po)
+ add_subdirectory(doc)
+endif()
+
# Add icon files to the application's source files to have CMake bundle them in the executable.
set(ICONS_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/resources/icons)
@@ -111,6 +122,4 @@ install(
DESTINATION ${KDE_INSTALL_METAINFODIR}
)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/linux/ghostwriter.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man1)
-
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
new file mode 100644
index 0000000..575d8e2
--- /dev/null
+++ b/doc/CMakeLists.txt
@@ -0,0 +1,5 @@
+# SPDX-FileCopyrightText: 2022 Carl Schwan <carl at carlschwan.eu>
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+kdoctools_create_manpage(man-ghostwriter.1.docbook 1 INSTALL_DESTINATION ${MAN_INSTALL_DIR})
diff --git a/doc/man-ghostwriter.1.docbook b/doc/man-ghostwriter.1.docbook
new file mode 100644
index 0000000..392cbdc
--- /dev/null
+++ b/doc/man-ghostwriter.1.docbook
@@ -0,0 +1,89 @@
+<?xml version="1.0" ?>
+<!DOCTYPE refentry PUBLIC "-//KDE//DTD DocBook XML V4.5-Based Variant V1.1//EN" "dtd/kdedbx45.dtd" [
+<!ENTITY % English "INCLUDE">
+]>
+<!--
+SPDX-FileCopyrightText: 2022 Carl Schwan <carl at carlschwan.eu>
+SPDX-License-Identifier: CC-BY-SA-4.0
+-->
+
+<refentry lang="&language;">
+<refentryinfo>
+<title>Ghostwriter User's Manual</title>
+<author><firstname>Megan</firstname><surname>Conkle</surname>
+<contrib>Ghostwriter man page.</contrib>
+<email>megan.conkle at kdemail.net</email></author>
+<date>2022-09-17</date>
+<releaseinfo>2.2.0</releaseinfo>
+<productname>Ghostwriter</productname>
+</refentryinfo>
+
+<refmeta>
+<refentrytitle><command>ghostwriter</command></refentrytitle>
+<manvolnum>1</manvolnum>
+</refmeta>
+
+<refnamediv>
+<refname>ghostwriter</refname>
+<refpurpose>distraction-free text editor for Markdown</refpurpose>
+</refnamediv>
+<!-- body begins here -->
+<refsynopsisdiv id='synopsis'>
+<cmdsynopsis>
+ <command>ghostwriter</command>
+ <arg choice="opt"><replaceable>FILE</replaceable></arg>
+</cmdsynopsis>
+</refsynopsisdiv>
+
+
+<refsect1 id="description">
+ <title>Description</title>
+ <para>
+ <command>ghostwriter</command> is a Qt text editing application for
+ Markdown that provides an aesthetic, distraction-free writing environment.
+ </para>
+ <para>
+ Create your own custom themes, write in fullscreen mode, or use focus mode
+ to concentrate on just one or more lines.
+ </para>
+ <para>
+ A live HTML preview allows you to view the final formatting as you type.
+ HTML preview and export options are provided by the built-in Markdown processor,
+ cmark-gfm; but you may add more by installing Pandoc, MultiMarkdown,
+ or cmark processors. The application will automatically detect their
+ installation if their locations are in the system's PATH environment variable.
+ </para>
+</refsect1>
+
+<refsect1 id="options"><title>Options</title>
+<variablelist>
+ <varlistentry>
+ <term><option>--disable-gpu</option></term>
+ <listitem>
+<para>Disable GPU acceleration.</para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+</refsect1>
+
+<refsect1>
+ <title>Reporting bugs</title>
+ <para>You can report bugs and feature requests at <ulink url="https://bugs.kde.org">https://bugs.kde.org</ulink></para>
+</refsect1>
+
+<refsect1>
+<title>See Also</title>
+<simplelist>
+<member>More detailed user documentation about markdown is available from <ulink
+url="https://ghostwriter.kde.org/documentation">https://ghostwriter.kde.org/documentation</ulink>
+</member>
+<member>kf5options(7)</member>
+<member>qt5options(7)</member>
+</simplelist>
+</refsect1>
+
+<refsect1 id="copyright"><title>Copyright</title>
+<para>Copyright © 2022 Megan Conkle</para>
+<para>License: GNU General Public Version 3 or later <<ulink url="https://www.gnu.org/licenses/gpl-3.0.html">https://www.gnu.org/licenses/gpl-3.0.html</ulink>></para>
+</refsect1>
+</refentry>
diff --git a/resources/linux/ghostwriter.1 b/resources/linux/ghostwriter.1
deleted file mode 100644
index 434691f..0000000
--- a/resources/linux/ghostwriter.1
+++ /dev/null
@@ -1,24 +0,0 @@
-.\" Manpage for ghostwriter.
-.TH man 1 "17 Sep 2022" "2.2.0" "ghostwriter man page"
-.SH NAME
-ghostwriter \- distraction\-free text editor for Markdown
-.SH SYNOPSIS
-ghostwriter [file]
-.SH DESCRIPTION
-Qt text editing application for Markdown that provides an aesthetic,
-distraction\-free writing environment.
-Create your own custom themes, write in fullscreen mode, or use focus mode
-to concentrate on just one or more lines.
-A live HTML preview allows you to view the final formatting as you type.
-HTML preview and export options are provided by the built-in Markdown processor,
-cmark-gfm; but you may add more by installing Pandoc, MultiMarkdown,
-or cmark processors. The application will automatically detect their
-installation if their locations are in the system's PATH environment variable.
-.SH AUTHOR
-Megan Conkle <megan.conkle at kdemail.net>
-.SH REPORTING BUGS
-See https://bugs.kde.org
-.SH COPYRIGHT
-Licensed under the GNU GPL3+.
-.SH SEE ALSO
-Why aren't you writing?
More information about the kde-doc-english
mailing list