VAR
    aTopicList: THndTopicsInfoArray;
    nCurTopic: INTEGER;
    sModuleName: STRING;

BEGIN
    HndGeneratorInfo.CurrentFile := ExtractFileName(HndGeneratorInfo.OutputFile);
    sModuleName := ChangeFileExt(ExtractFileName(HndGeneratorInfo.OutputFile), '');
    aTopicList := HndTopics.GetTopicList(False);

    printfln(''' Project: %s', [HndProjects.GetProjectTitle()]);
    println (''' Generated by HelpNDoc - http://www.helpndoc.com');
    println ('');
    printfln('Enum eHelp_%s', [sModuleName]);
    FOR nCurTopic := 0 TO length(aTopicList) - 1 DO
    BEGIN
        printfln('  HELP_%s = %d', [aTopicList[nCurTopic].HelpId, aTopicList[nCurTopic].HelpContext]);
    END;
    println ('End Enum');

end.
