freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/docwriter][master] Update and enhance docwriter


From: Nikhil Ramakrishnan (@NikRamakrishnan)
Subject: [Git][freetype/docwriter][master] Update and enhance docwriter
Date: Tue, 05 Sep 2023 23:33:30 +0000

Nikhil Ramakrishnan pushed to branch master at FreeType / docwriter

Commits:

  • 0d3eeb97
    by Hugh McMaster at 2023-09-05T23:33:25+00:00
    Update and enhance docwriter
    

6 changed files:

Changes:

  • README.md
    ... ... @@ -41,7 +41,7 @@ Python >= 3.5 to run.
    41 41
         ```bash
    
    42 42
         python -m docwriter                      \
    
    43 43
                 --prefix=ft2                     \
    
    44
    -            --title=FreeType-2.9.1           \
    
    44
    +            --title=FreeType-2.13.1          \
    
    45 45
                 --site=reference                 \
    
    46 46
                 --output=./docs                  \
    
    47 47
                 ./include/freetype/*.h           \
    

  • docwriter/siteconfig.py
    ... ... @@ -43,7 +43,7 @@ site_name = "FreeType API Reference"
    43 43
     site_description = "API Reference documentation for FreeType"
    
    44 44
     site_author      = "FreeType Contributors"
    
    45 45
     use_dir_url      = False
    
    46
    -site_url         = None
    
    46
    +site_url         = "http://freetype.org/freetype2/docs/reference"
    
    47 47
     
    
    48 48
     # Theme configuration default values
    
    49 49
     theme_conf             = {}
    

  • docwriter/tomarkdown.py
    ... ... @@ -148,7 +148,10 @@ class MdFormatter( Formatter ):
    148 148
             self.file_prefix    = file_prefix
    
    149 149
             self.toc_filename   = "index.md"
    
    150 150
             self.index_filename = self.file_prefix + "index.md"
    
    151
    -        self.markdown       = mistune.Markdown()
    
    151
    +        if mistune.__version__.startswith('0'):
    
    152
    +            self.markdown   = mistune.Markdown()
    
    153
    +        else:
    
    154
    +            self.markdown   = mistune.create_markdown(renderer='html', escape=False)
    
    152 155
             self.config         = siteconfig.SiteConfig()
    
    153 156
     
    
    154 157
             self.md_index_header = (
    

  • docwriter/utils.py
    ... ... @@ -27,7 +27,7 @@ log = logging.getLogger( __name__ )
    27 27
     
    
    28 28
     # current output directory
    
    29 29
     #
    
    30
    -output_dir = None
    
    30
    +output_dir = "docs"
    
    31 31
     markdown_dir = "markdown"
    
    32 32
     site_dir = "site"
    
    33 33
     
    
    ... ... @@ -93,16 +93,8 @@ def close_output( output ):
    93 93
     
    
    94 94
     def  check_output():
    
    95 95
         """Check if output directory is valid."""
    
    96
    -    global output_dir
    
    97
    -    if output_dir:
    
    98
    -        if output_dir != "":
    
    99
    -            if not os.path.isdir( output_dir ):
    
    100
    -                log.error( "Argument"
    
    101
    -                           " '%s' is not a valid directory.",
    
    102
    -                           output_dir )
    
    103
    -                sys.exit( 2 )
    
    104
    -        else:
    
    105
    -            output_dir = None
    
    96
    +    if not os.path.exists( output_dir ):
    
    97
    +        os.makedirs( output_dir )
    
    106 98
     
    
    107 99
     
    
    108 100
     def  create_markdown_dir():
    

  • requirements.txt
    ... ... @@ -13,7 +13,7 @@
    13 13
     #  understand and accept it fully.
    
    14 14
     
    
    15 15
     # Direct project dependencies
    
    16
    -mistune==0.8.4
    
    17
    -mkdocs==1.2.1
    
    18
    -mkdocs-material==7.1.9
    
    19
    -PyYAML==5.4.1
    16
    +mistune >= 0.8.4, < 3.0
    
    17
    +mkdocs >= 1.4.3
    
    18
    +mkdocs-material >= 8.2.6
    
    19
    +PyYAML >= 5.4.1

  • tox.ini
    1 1
     [tox]
    
    2 2
     envlist =
    
    3
    -    py36, py37, py38, py39
    
    3
    +    py36, py37, py38, py39, py310, py311
    
    4 4
     
    
    5 5
     [testenv]
    
    6 6
     deps =
    
    ... ... @@ -12,10 +12,10 @@ commands =
    12 12
         python -m pytest -v
    
    13 13
     
    
    14 14
     [testenv:regression]
    
    15
    -whitelist_externals=
    
    16
    -    /bin/bash
    
    17
    -    make
    
    15
    +allowlist_externals=
    
    16
    +    bash
    
    18 17
         git
    
    18
    +    make
    
    19 19
     changedir =
    
    20 20
         tests/
    
    21 21
     deps=
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]