python: add glossary entries

This commit is contained in:
Simon Legner 2022-10-02 12:39:56 +02:00
parent 1213629e9c
commit 1de7a61a97

View file

@ -31,6 +31,7 @@ module Docs
return 'Tutorial' if slug.start_with? 'tutorial'
return 'Software Packaging & Distribution' if slug.start_with? 'distributing'
return 'Software Packaging & Distribution' if slug.start_with? 'distutils'
return 'Glossary' if slug.start_with? 'glossary'
return 'Basics' unless slug.start_with? 'library/'
return 'Basics' if slug.start_with? 'library/index'
@ -76,6 +77,10 @@ module Docs
entries << [node['id'], node['id']]
end
css('.glossary > dt[id]').each do |node|
entries << [node.content, node['id']]
end
css('.function > dt[id]', '.method > dt[id]', '.staticmethod > dt[id]', '.classmethod > dt[id]').each do |node|
entries << [node['id'] + '()', node['id']]
end