From ba41e72acfd31041ed539b83a44ed2302ac5619c Mon Sep 17 00:00:00 2001 From: Martin Kolman Date: Oct 26 2016 14:57:59 +0000 Subject: [PATCH 1/2] Generate plain text variants of the help content files The Anaconda text interface (TUI) is also getting a built-in help system, so create plain text variant of the help content files with the xmlto tool. --- diff --git a/prepare_anaconda_help_content.py b/prepare_anaconda_help_content.py index 922e12a..9d97c35 100755 --- a/prepare_anaconda_help_content.py +++ b/prepare_anaconda_help_content.py @@ -196,5 +196,10 @@ for placeholder in PLACEHOLDERS: shutil.copy(os.path.join(INPUT_FOLDER, placeholder), OUTPUT_FOLDER) print(placeholder) +print("creating plain text variants with xmlto") +for path in glob.glob(os.path.join(OUTPUT_FOLDER, "*.xml")): + print("processing: %s" % path) + os.system("xmlto --noautosize -o %s txt %s" % (OUTPUT_FOLDER, path)) + print("done!") exit(0) From 2e8179ae09ba861d0981fa6def3ddfede5af8a64 Mon Sep 17 00:00:00 2001 From: Martin Kolman Date: Oct 26 2016 15:06:08 +0000 Subject: [PATCH 2/2] Add a plain text version of of the placeholder --- diff --git a/en-US/FedoraPlaceholder.txt b/en-US/FedoraPlaceholder.txt new file mode 100644 index 0000000..ff36597 --- /dev/null +++ b/en-US/FedoraPlaceholder.txt @@ -0,0 +1,6 @@ +The Anaconda built-in help + + ...is not yet available for this screen. + You can check the Anaconda wiki page, + the Fedora Installation Guide or other + online help resources instead. diff --git a/prepare_anaconda_help_content.py b/prepare_anaconda_help_content.py index 9d97c35..f0eef10 100755 --- a/prepare_anaconda_help_content.py +++ b/prepare_anaconda_help_content.py @@ -9,7 +9,7 @@ import subprocess # in the lxml tree know their parents - this is handy when removing the figure tags from lxml import etree as ET -PLACEHOLDERS = ["FedoraPlaceholderWithLinks.html", "FedoraPlaceholder.html"] +PLACEHOLDERS = ["FedoraPlaceholderWithLinks.html", "FedoraPlaceholder.html", "FedoraPlaceholder.txt"] INPUT_FOLDER = "en-US" OUTPUT_FOLDER = "anaconda_help_content/en-US"