Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Current »

You can convert MadCap HTML articles to Koji’s FAQ format. 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. Konverso sends an archive with this tool and credentials, required for converting: a username and password.

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:

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

python MadCap_To_Koji_Converter.py

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.

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.