Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To You can convert your MadCap html HTML articles to Koji’s FAQ format, you can use . This page describes how to get the required tools and how to carry out the converting.

Key points

To make you MadCap HTML articles available in Koji’s FAQ, use the MadCap_To_Koji_Converter.py tool, which is provided to you in an ZIP archive along with username/password pair which you should enter when running the script.

Setup and run

...

Install Python on your PC, if it’s not installed

...

. Konverso sends an archive with this tool and credentials, required for converting: a username and password.

Info

To learn more about the converting functionalities, feel free to contact us.

Prerequisites

Installing Python interpreter

A Python interpreter, a program that understands the Python programming language, must be installed on your PC. If you do not have it, download it from its official website. Run the downloaded installer and follow its instructions.

When installing the interpreter, select the Add Python Version to PATH checkbox. This will automatically deal with environment variables. If you miss this step, you will need to set these variables manually. This process is described below.

...

Setting environment variables

Once Python is installed, set two environment variables: for Python and for its scripts. If it is not done, errors such as 'python' is not recognized as an internal or external command might occur.

To set new environment variables:

1. Find a directory with the installed Python version and copy its path. It should be something like C:\Programs\Python\Python39.

2. Add the Python environment variables: right-click This PC and go to Properties > Advanced system settings > Environment variables.

...

3. If you already have the Path variable, select it and click Edit. If not, click New to create one.

4. In the Edit environment variable dialog, click New.

5. Specify the path to your installed Python (for example, C:\Programs\Python\Python39).

6. Specify the path to Python scripts (for example, C:\Programs\Python\Python39\Scripts).

...

7. Click OK.

Installing Requests and Beautifulsoup4

  • Requests is an HTTP library. This package is used in the script to communicate with Koji.

  • Beautifulsoup4 library is used to parse HTML.

To install Requests and Beautifulsoup4, open the command prompt and run the following:

Code Block
python -m pip install requests
python -m pip install beautifulsoup4

Running the tool

1. Download the archive with the converting tool.

2. Extract the archive content to the directory with your HTML articles: make sure that MadCap_To_Koji_Converter.py and client.py are on the same level as your HTML files.

...

3. Open the command prompt and navigate to the directory that contains MadCap_To_Koji_Converter.py.

...

4. Run the following command

Code Block
python MadCap_To_Koji_Converter.py

...

where C:\Users\your_user\html is a full path to the folder with your MadCap html articles

...

5. Enter the username and password that you were provided

...

with.

6. Enter your tenant name

...

...

and press Enter.

Checking results

1. Open your Koji backoffice and go to Content > FAQ.

2. Your MadCap HTML articles should be available.