Class: PythonLib

Inherits:
HTMLIndex show all
Defined in:
lib/langhelp/lh_python.rb

Constant Summary

Constants inherited from AbstractIndex

AbstractIndex::SPACES

Constants included from LocalVariables

LocalVariables::ANCHOR_BEGIN, LocalVariables::ANCHOR_END

Constants included from KanjiConverter

KanjiConverter::KCONVERTERS

Instance Attribute Summary

Attributes inherited from AbstractIndex

#arg1, #conf, #title

Instance Method Summary collapse

Methods inherited from HTMLIndex

#init, #init_filename, #post_process, #space, #to_e

Methods inherited from AbstractIndex

#init, #initialize, #output_title, #to_e

Methods included from LocalVariables

#insert_local_variables

Methods included from FilenameString

#abbreviate_filename, #abbreviate_filename!, #normalize_filename!

Methods included from KanjiConverter

#encoding, #kconv

Methods included from MkArray

#mkarray

Methods included from EmacsLispString

#lisp_dump_string

Constructor Details

This class inherits a constructor from AbstractIndex

Instance Method Details

#pre_process(src) ⇒ Object



26
27
28
29
30
# File 'lib/langhelp/lh_python.rb', line 26

def pre_process(src)
  untable_html(src).gsub( %r!<dt><a href="(.+?)">(.+)</a>! ) {
    %Q!<dt>#{$2}#{space}(lh-w3m nil "file://#{@dir}/#{$1}")\n!
  }
end

#untable_html(src = File.read(@index_page)) ⇒ Object



21
22
23
24
# File 'lib/langhelp/lh_python.rb', line 21

def untable_html(src=File.read(@index_page))
  ut = UnTable.new
  ut.untable(src)
end