module texthelper.code_helper

Short summary

module pyquickhelper.texthelper.code_helper

Some functions about diacritics

source on GitHub

Functions

function

truncated documentation

add_rst_links

Replaces words by something like :epkg:'word'.

change_style

Switches from AaBb into aa_bb.

Documentation

Some functions about diacritics

source on GitHub

Replaces words by something like :epkg:'word'.

Parameters
  • text – text to process

  • values – values

  • tag – tag to use

  • n – number of consecutive words to look at

Returns

new text

<<<

from pyquickhelper.texthelper import add_rst_links
text = "Maybe... Python is winning the competition for machine learning language."
values = {'Python': 'https://www.python.org/',
          'machine learning': 'https://en.wikipedia.org/wiki/Machine_learning'}
print(add_rst_links(text, values))

>>>

    Maybe... :epkg:`Python` is winning the competition for :epkg:`machine learning` language.

source on GitHub

pyquickhelper.texthelper.code_helper.change_style(name)[source][source]

Switches from AaBb into aa_bb.

Parameters

name – name to convert

Returns

converted name

Example:

<<<

from pyquickhelper.texthelper import change_style

print("changeStyle --> {0}".format(change_style('change_style')))

>>>

    changeStyle --> change_style

source on GitHub