module homeblog.buildkeywords#

Short summary#

module ensae_teaching_cs.homeblog.buildkeywords

Contains the main function to published my blog (http://www.xavierdupre.fr/blog). executed:

source on GitHub

Functions#

function

truncated documentation

build_bloc_keywords

builds the keywords bloc

build_bloc_months

builds the months bloc (we assume the page name is YYYY-MM-DD-something-.html

build_process_all_pages

file_all_keywords

FixIssuesWithAccent

voir http://migo.sixbit.org/more/html-entities.html http://www.thesauruslex.com/typo/eng/enghtml.htm

generate_html_article

get_node_div

modify_all_blogs_list_in_place

removeAccent

removeAccent_debug

removeHtmlAccent

replace_xml_in_template_using_dom_dirty

Documentation#

Contains the main function to published my blog (http://www.xavierdupre.fr/blog). executed:

source on GitHub

ensae_teaching_cs.homeblog.buildkeywords.FixIssuesWithAccent(text)#

voir http://migo.sixbit.org/more/html-entities.html http://www.thesauruslex.com/typo/eng/enghtml.htm

é = é = é
è = è = è
à = Ã  = à
ï = ï = ï
ô = ô = ô
ç = ç = ç
ê = ê = ê
ù = ù = ù
æ = æ = æ
œ = œ = œ
ë = ë = ë
ü = ü = ü
â = â = â
€ = € = €
© = © = ©
¤ = ¤ = ¤

source on GitHub

ensae_teaching_cs.homeblog.buildkeywords.build_bloc_keywords(res, frequence_threshold, rootfile)#

builds the keywords bloc

Paramètres:
  • res

  • frequence_threshold – number of times a keyword needs to appear before getting the right bar

source on GitHub

ensae_teaching_cs.homeblog.buildkeywords.build_bloc_months(res, rootfile)#

builds the months bloc (we assume the page name is YYYY-MM-DD-something-.html

Paramètres:
  • res – list of blog per months

  • rootfile – files location

source on GitHub

ensae_teaching_cs.homeblog.buildkeywords.build_process_all_pages(res, keywordsHTML='frame_keywords.html', siteFolder='../site/blog', xd_blog_template_nojs='blog/xd_blog_template_nojs.html', xd_blog_nojs='xd_blog_nojs.html', frequence_keywords=3, monthsHTML='frame_months.html')#
Paramètres:
  • res – output from function file_all_keywords

  • keywordsHTML – html template for the keywords

  • siteFolder – folder the blog (the one to be published)

  • xd_blog_template_nojs – template for blog (static text, less javascript)

  • xd_blog_nojs – main page (static text, less javascript)

  • frequence_keywords – there won’t be any page for a keyword whose frequency is below that threshold

  • monthsHTML – html template for the months

Renvoie:

all created pages

source on GitHub