DirectiveIndex
[edit] Directive Index
This page was generated automatically by crawling module pages on 2009-Jul-29; any changes to the module pages made after that date will not be reflected below. Directives in modules whose markup does not follow the convention may not be listed. On 2012-Jan-20, the Nginx prefix was removed from module links, to reflect the current naming convention (the pages redirected anyway).
The Ruby code that generated this page:
BASE_URL = 'http://wiki.nginx.org/' MODULE_INDEX = 'NginxModules' USE_CACHE = true CACHE_DIR = '/tmp/' def read_page( page_name ) page_url = "#{BASE_URL}#{page_name}" if USE_CACHE file = "#{CACHE_DIR}#{page_name}.html" `curl -s #{page_url} > #{file}` unless File.exist?( file ) File.read( file ) else `curl -s #{page_url}` end end all_directives = Hash.new{ |h,k| h[k] =[] } modules = read_page( MODULE_INDEX ).scan( /\bNginx(?:\w+)Module\b/ ).uniq modules.reject!{ |name| name =~ /^NginxChs/ } modules.reject!{ |name| name =~ /^NginxRu/ } modules.each{ |page_name| html = read_page( page_name ) # All module directive headers seem to follow this markup directive_section = html[ %r{Directives\s*</span></h1>.+?(?:<h1|\Z)}m ] puts html, page_name unless directive_section directives = directive_section.scan( %r{<a name="([^.][^"]+)" id="[^"]+"></a><h2>} ).flatten #directives.reject!{ |directive| directive =~ /^var_/ } # No variables, pls directives.each{ |directive| all_directives[ directive ] << page_name } } require 'erb' puts ERB.new(DATA.read).result(binding) __END__ = Directive Index = ''This page was generated automatically by crawling module pages on <%=Time.now.strftime '%Y-%b-%d'%>;'' ''any changes to the module pages made after that date will not be reflected below.'' ''Directives in modules whose markup does not follow the convention may not be listed.'' {| border="1" |- ! '''Directive''' ! '''Module''' <% all_directives.keys.sort.each{ |key| # Some directives are present in more than one module all_directives[key] .uniq.each{ |module_name| link = "#{module_name}##{key}" _erbout << "|-\n" %>|| [[<%=link%>|<%=key%>]] || [[<%=module_name%>]]<% _erbout << "\n" } } %> |} The Ruby code that generated this page: <pre> <%=File.read($0)%>