def get_header(self, heading_level): acoustic = "Acoustic " if self.is_acoustic else "" artist_link = HtmlFormatter.a(href=self.artist_url, content=self.artist_name) return HtmlFormatter.HtmlGroup( HtmlFormatter.a(name=self.html_anchor), "\n", HtmlFormatter.heading( heading_level, "%s - %s (%s%s)" % (self.song_name, artist_link, acoustic, self.type_name)), self.get_link_to_original( content=self.get_text_for_link_to_original()), HtmlFormatter.new_line)
def get_html_content(self, heading_level): return HtmlFormatter.HtmlGroup( HtmlFormatter.a(name=self.html_anchor), "\n", HtmlFormatter.heading(heading_level, self.raw.get_title(display_type=True)), self.raw.long_content, self.get_tab_list(), HtmlFormatter.pagebreak, )
def get_link(self, display_artist=True, display_type=True, display_src=True, prefix=""): part = " " + self.part if self.part else "" artist_name = " - %s" % self.artist_name if display_artist else "" from_ = "" if display_type or display_src: acoustic = "Acoustic " if self.is_acoustic else "" type_name = "%s%s" % (acoustic, self.type_name) if display_type else "" src = "from %s" % self.src if display_src else "" space = " " if (display_type and display_src) else "" from_ = " (" + type_name + space + src + ")" return HtmlFormatter.a( href="#" + self.html_anchor, content="%s%s%s%s%s" % (prefix, self.song_name, part, artist_name, from_))
def get_link(self, display_type): return HtmlFormatter.a( href="#" + self.html_anchor, title=self.raw.short_content, content=self.raw.get_title(display_type), )
def get_link_to_original(self, content): return HtmlFormatter.a(href=self.url, content=content)