Exemple #1
0
 def export_html(self, filename):
     """ Exports HTML for debugging only. """
     Utils.set_to_print_web()
     s = DuMark.get_h1('List of publications (temporary)')
     i = 0
     for k in self._keys:
         d = self._data[k]
         if not d.is_visible():
             continue
         d.debug_pdf()
         i += 1
         s += '[%d] ' % i
         s += d.get_authors().get_markdown()
         s += '. '
         s += d.get_title_markdown()
         s += ' '
         s += d.get_lowres_markdown()
         s += ' '
         s += d.get_book()
         s += '. '
         s += d.get_year()
         s += '.'
         s += Utils.get_separator()
     s += DEBUG_HTML_SCRIPT
     s = htmlmin.minify(markdown(s))
     with open(filename, 'w', encoding='utf8') as f:
         f.write(s)
Exemple #2
0
 def export_html(self, filename):
     Utils.set_to_print_web()
     s = ''
     for k in self._keys:
         d = self._data[k]
         s += d.get_name_google_markdown()
         if d.get_original_name():
             s += ' (%s)' % d.get_original_name()
         s += ': '
         s += Utils.get_line_break()
         s += d.get_best_face_markdown()
         s += Utils.get_line_break()
         s += ' '.join([
             d.get_website_markdown(),
             d.get_facebook_markdown(),
             d.get_twitter_markdown(),
             d.get_vimeo_markdown(),
             d.get_linkedin_markdown(),
             d.get_instagram_markdown(),
             d.get_youtube_markdown(),
             d.get_github_markdown(),
             d.get_researchgate_markdown(),
             d.get_scholar_markdown()
         ])
         s += Utils.get_separator()
     s += DEBUG_HTML_SCRIPT
     s = htmlmin.minify(markdown(s))
     Utils.write_file(filename, s)
Exemple #3
0
 def export_cites_html(self, filename):
     Utils.set_to_print_web()
     with open(filename, 'r', encoding='utf8') as f:
         lines = f.readlines()
         for k in self._keys:
             paper = self._data[k]
             d = paper._data
             html = ''
             html += paper.fill_template(lines)
             Dir.ensure_dir(os.path.join(Dir.builds, Dir.cites))
             output_filename = os.path.join(Dir.builds, Dir.cites,
                                            '%s.html' % d['bib'])
             with open(output_filename, 'w', encoding='utf8') as f:
                 f.write(html)