memoryfm.ScrobbleLog.to_markdown#
- ScrobbleLog.to_markdown(file=None, maxcolwidths=None, tablefmt='github', newest_first=None, max_length=None, datetimefmt='%Y-%m-%d %H:%M', showindex=False, show_extra=True)#
Print ScrobbleLog in a nice looking markdown format.
- Parameters:
- filePathLike or TextIOBase
Path or file to write the markdown.
A pathlib path, or
A string corresponding to a path, such as
/home/username/Documents/filename, orA TextIOBase object having a
read()method.
If
None, the markdown is returned as a string.- maxcolwidthslist[int], default None
A list of the maximum column widths allowed, in the same order as the ScrobbleLog DataFrame columns. To omit a column, put
Noneat its position in the list.- tablefmtstr, default ‘github’
The style of the table containing scrobbles. See tabulate for options and details.
- newest_firstbool, default None
if
True, the ScrobbleLog is sorted by timestamps with newest scrobbles appearing at the top.if
False, the ScrobbleLog is sorted by timestamps with oldest scrobbles appearing at the top.if
None, the ScrobbleLog is not sorted.
- max_lengthint, default None
The maximum number of scrobbles to print.
- datetimefmtstr, default “%Y-%m-%d %H:%M”
The datetime format to use for the ‘Timestamp’ values.
- showindexbool, default
False Whether or not to show the index.
- show_extrabool, default
True Whether or not show extra information like username, dates of the first and the last scrobbles.
- Returns:
- None or str
If file is
None, returns the markdown as a string. ReturnsNoneotherwise.