Export as Netscape bookmark file.
More...
#include <remwharead/export/bookmarks.hpp>
Export as Netscape bookmark file.
- Since
- 0.6.0
◆ ExportBase()
remwharead::Export::ExportBase::ExportBase |
|
explicit |
Export list of Database::entry.
- Parameters
-
list< Database::entry > sort_entries(list< Database::entry > entries) const
Sort entries from newest to oldest and remove duplicates.
Definition: export.cpp:30
◆ print()
void remwharead::Export::Bookmarks::print |
( |
| ) |
const |
|
overridevirtual |
Print output to std::ostream.
Implements remwharead::Export::ExportBase.
31 _out <<
"<!DOCTYPE NETSCAPE-Bookmark-file-1>\n" 32 "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; " 34 "<TITLE>Bookmarks from remwharead</TITLE>\n" 35 "<H1>Bookmarks from remwharead<H1>\n\n" 37 "<DT><H3>remwharead</H3>\n" 40 for (
const Database::entry & entry : _entries)
42 string title = entry.title;
47 system_clock::time_point tp = entry.datetime;
48 system_clock::duration duration = tp.time_since_epoch();
50 std::to_string(duration_cast<seconds>(duration).count());
52 _out <<
"<DT><A HREF=\"" << entry.uri <<
"\" " 53 <<
"ADD_DATE=\"" << time_seconds <<
"\">"
The documentation for this class was generated from the following files: