doxyth/gendoc.py
def adapt_configs_to_lang(self, lang):
        """
        ### &doc_id gendoc:adapt_to_lang

        Adapts the configuration files to the current language being processed.

        Changes the HTML output of doxygen, and the language parameter in the batch file_name to tell the doxyth
        executable the right language to look at

        Args:
            lang: The current language being processed.
        """

        # Doxyfile
        with open(doxygen_file_name, encoding='utf-8') as f:
            lines = f.readlines()

        for n, line in enumerate(lines):
            try:
                stripped_line = line.strip()
            except UnicodeEncodeError:
                stripped_line = ascii_encode(line).strip()

            # Change HTML output
            if re.match(r"^HTML_OUTPUT\s*=", stripped_line):
                lines[n] = f"HTML_OUTPUT = {self.docs_output_path}/{lang}/\n"

            if re.match(r"^OUTPUT_LANGUAGE\s*=", stripped_line):
                if lang in doxygen_languages.keys():
                    lines[n] = f"OUTPUT_LANGUAGE = {doxygen_languages[lang]}\n"

        with open(doxygen_file_name, 'w', encoding='utf-8') as f:
            f.writelines(lines)

        # batch file_name
        with open('.dthb.bat', 'w', encoding='utf-8') as b:
            b.write(f"python -m doxyth.doxyth {lang} %1")

        ### &doc_id gendoc:adapt_to_lang

        Adapts the configuration files to the current language being processed.

        Changes the HTML output of doxygen, and the language parameter in the batch file_name to tell the doxyth
        executable the right language to look at

        Args:
            lang: The current language being processed.
        
&doc_id gendoc:adapt_to_lang
Adapts the configuration files to the current language being processed.

Changes the HTML output of doxygen, and the language parameter in the batch file_name to tell the doxyth
executable the right language to look at
&doc_id gendoc : adapt_to_lang Adapts the configuration files to the current language being processed . Changes the HTML output of doxygen and the language parameter in the batch file_name to tell the doxyth executable the right language to look at
def adapt_configs_to_lang(self, lang):
        with open(doxygen_file_name, encoding='utf-8') as f:
            lines = f.readlines()
        for n, line in enumerate(lines):
            try:
                stripped_line = line.strip()
            except UnicodeEncodeError:
                stripped_line = ascii_encode(line).strip()
            if re.match(r"^HTML_OUTPUT\s*=", stripped_line):
                lines[n] = f"HTML_OUTPUT = {self.docs_output_path}/{lang}/\n"
            if re.match(r"^OUTPUT_LANGUAGE\s*=", stripped_line):
                if lang in doxygen_languages.keys():
                    lines[n] = f"OUTPUT_LANGUAGE = {doxygen_languages[lang]}\n"
        with open(doxygen_file_name, 'w', encoding='utf-8') as f:
            f.writelines(lines)
        with open('.dthb.bat', 'w', encoding='utf-8') as b:
            b.write(f"python -m doxyth.doxyth {lang} %1")
def adapt_configs_to_lang ( self , lang ) : with open ( doxygen_file_name , encoding = 'utf-8' ) as f : lines = f . readlines ( ) for n , line in enumerate ( lines ) : try : stripped_line = line . strip ( ) except UnicodeEncodeError : stripped_line = ascii_encode ( line ) . strip ( ) if re . match ( r"^HTML_OUTPUT\s*=" , stripped_line ) : lines [ n ] = f"HTML_OUTPUT = {self.docs_output_path}/{lang}/\n" if re . match ( r"^OUTPUT_LANGUAGE\s*=" , stripped_line ) : if lang in doxygen_languages . keys ( ) : lines [ n ] = f"OUTPUT_LANGUAGE = {doxygen_languages[lang]}\n" with open ( doxygen_file_name , 'w' , encoding = 'utf-8' ) as f : f . writelines ( lines ) with open ( '.dthb.bat' , 'w' , encoding = 'utf-8' ) as b : b . write ( f"python -m doxyth.doxyth {lang} %1" )
&doc_id gendoc:adapt_to_lang
Adapts the configuration files to the current language being processed.
&doc_id gendoc : adapt_to_lang Adapts the configuration files to the current language being processed .
"""
        ### &doc_id gendoc:adapt_to_lang

        Adapts the configuration files to the current language being processed.

        Changes the HTML output of doxygen, and the language parameter in the batch file_name to tell the doxyth
        executable the right language to look at

        Args:
            lang: The current language being processed.
        """ # Doxyfile # Change HTML output # batch file_name
self
lang
The current language being processed.
The current language being processed .