mdutils.fileutils package

Submodules

mdutils.fileutils.fileutils module

class mdutils.fileutils.fileutils.MarkDownFile(name='')[source]

Bases: object

MarkDownFile class creates a new file of MarkDown extension.

Features available are: - Create a file. - Rewrite a file with new data. - Write at the end of the file.

append_after_second_line(data)[source]

Write after the file’s first line.

Parameters:data – is a string containing all the data that is written in the markdown file.
append_end(data)[source]

Write at the last position of a Markdown file.

Parameters:data – is a string containing all the data that is written in the markdown file.
static read_file(file_name)[source]

Read a Markdown file using a file name. It is not necessary to add *.md extension.

Parameters:file_name (str) – Markdown file’s name.
Returns:return all file’s data.
Return type:str
rewrite_all_file(data)[source]

Rewrite all the data of a Markdown file by data.

Parameters:data – is a string containing all the data that is written in the markdown file.

Module contents