concept submodule

Representation and manipulation with concepts. List of concepts can be obtained from logged User using User.get_concepts() getter.

Note:
This module was one of the first modules created here and will require some refactoring.
class abclinuxuapi.concept.Concept(title, link, session)

Bases: object

title

str – Title of the concept.

str – Absolute URL of the concept.

get_content()

Get content of this Concept.

Returns:full HTML UTF-8 encoded text of the concept.
Return type:str
add_pic(opened_file)

Add picture to the Concept.

Parameters:opened_file (file) – opened file object
list_pics()
Returns:List of URLs to pictures used in this concept.
Return type:list
edit(text, title=None, date_of_pub=None)

Edit concept.

Parameters:
  • text (str) – New text of the context.
  • title (str, default None) – New title of the concept. If not set, old title is used.
  • date_of_pub (str/int, default None) – Date string in abclinuxu format or timestamp determining when the concept should be automatically published.

Note

date_of_pub can be string in format "%Y-%m-%d %H:%M".