diff --git a/docs/adoc_8hpp_source.html b/docs/adoc_8hpp_source.html index 09fd490..5f6b3eb 100644 --- a/docs/adoc_8hpp_source.html +++ b/docs/adoc_8hpp_source.html @@ -70,10 +70,10 @@ $(function() {
▼Nremwharead | |
▼NExport | |
CAsciiDoc | |
CAsciiDoc | Export as AsciiDoc document |
CBookmarks | Export as Netscape bookmark file |
CCSV | |
CExportBase | |
CCSV | Export as Comma Separated Values |
CExportBase | Base class for exports |
CSimple | Export as simple list |
▼CDatabase | |
Centry | |
Chtml_extract | |
CURI | |
▼CDatabase | Store and retrieve files from/to SQLite |
Centry | Describes a database entry |
Chtml_extract | A processed HTML page |
CURI | Download, archive and process an URI |
This is the complete list of members for remwharead::Database, including all inherited members.
Database() (defined in remwharead::Database) | remwharead::Database | |
entry typedef (defined in remwharead::Database) | remwharead::Database | |
operator bool() const (defined in remwharead::Database) | remwharead::Database | |
Database() | remwharead::Database | |
entry typedef | remwharead::Database | |
operator bool() const | remwharead::Database | |
retrieve(const time_point &start=time_point(), const time_point &end=system_clock::now()) const | remwharead::Database | |
store(const entry &data) const | remwharead::Database |
Store and retrieve files from/to SQLite. + More...
+ +#include <sqlite.hpp>
Classes | |
struct | entry |
Describes a database entry. More... | |
Public Types | |
-typedef struct remwharead::Database::entry | entry |
typedef struct remwharead::Database::entry | entry |
Describes a database entry. More... | |
Public Member Functions | |
- | operator bool () const |
Database () | |
Connects to the database and creates it if necessary. More... | |
operator bool () const | |
Returns true if connected to the database. More... | |
-void | store (const entry &data) const |
Store in database. | |
void | store (const entry &data) const |
Store a Database::entry in the database. More... | |
-const vector< entry > | retrieve (const time_point &start=time_point(), const time_point &end=system_clock::now()) const |
retrieve from database. | |
const vector< entry > | retrieve (const time_point &start=time_point(), const time_point &end=system_clock::now()) const |
Retrieve a vector of Database::entry from the database. More... | |
Store and retrieve files from/to SQLite.
+typedef struct remwharead::Database::entry remwharead::Database::entry | +
Describes a database entry.
+ +remwharead::Database::Database | +( | +) | ++ |
Connects to the database and creates it if necessary.
+remwharead::Database::operator bool | +( | +) | +const | +
const vector< Database::entry > remwharead::Database::retrieve | +( | +const time_point & | +start = time_point() , |
+
+ | + | const time_point & | +end = system_clock::now() |
+
+ | ) | +const | +
Retrieve a vector of Database::entry from the database.
+void remwharead::Database::store | +( | +const entry & | +data | ) | +const | +
Store a Database::entry in the database.
+Export as AsciiDoc document. + More...
+ +#include <adoc.hpp>
Public Member Functions | |
-void | print () const override |
Print output to std::ostream. | |
void | print () const override |
Print output to std::ostream. More... | |
ExportBase (const vector< Database::entry > &entries, ostream &out=cout) | |
Export vector of Database::entry. More... | |
Export vector of Database::entry. More... | |
@@ -100,7 +104,7 @@ Additional Inherited Members | |
Sort entries from newest to oldest. More... | |
ExportBase (const vector< Database::entry > &entries, ostream &out=cout) | |
Export vector of Database::entry. More... | |
Export vector of Database::entry. More... | |
Protected Attributes inherited from remwharead::Export::ExportBase | |
@@ -110,7 +114,9 @@ const vector< | _out |
Export as AsciiDoc document.
+Export vector of Database::entry.
+Export vector of Database::entry.
entries | Vector of Database::entry to export. |
entries | Vector of Database::entry to export. |
out | Output stream. |
+
|
+ +overridevirtual | +
Print output to std::ostream.
+ +Implements remwharead::Export::ExportBase.
+Public Member Functions | |
-virtual void | print () const override |
Print output to std::ostream. | |
virtual void | print () const override |
Print output to std::ostream. More... | |
ExportBase (const vector< Database::entry > &entries, ostream &out=cout) | |
Export vector of Database::entry. More... | |
Export vector of Database::entry. More... | |
@@ -105,7 +104,7 @@ Additional Inherited Members | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sort entries from newest to oldest. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ExportBase (const vector< Database::entry > &entries, ostream &out=cout) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Export vector of Database::entry. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Export vector of Database::entry. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Protected Attributes inherited from remwharead::Export::ExportBase | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
@@ -138,10 +137,10 @@ ostream & | _out |
entries | Vector of Database::entry to export. |
entries | Vector of Database::entry to export. |
out | Output stream. |
+
|
+ +overridevirtual | +
Export as Comma Separated Values. + More...
+ +#include <csv.hpp>
Public Member Functions | |
-virtual void | print () const override |
Print output to std::ostream. | |
virtual void | print () const override |
Print output to std::ostream. More... | |
ExportBase (const vector< Database::entry > &entries, ostream &out=cout) | |
Export vector of Database::entry. More... | |
Export vector of Database::entry. More... | |
@@ -100,7 +104,7 @@ Additional Inherited Members | |
Sort entries from newest to oldest. More... | |
ExportBase (const vector< Database::entry > &entries, ostream &out=cout) | |
Export vector of Database::entry. More... | |
Export vector of Database::entry. More... | |
Protected Attributes inherited from remwharead::Export::ExportBase | |
@@ -110,7 +114,9 @@ const vector< | _out |
Export as Comma Separated Values.
+Export vector of Database::entry.
+Export vector of Database::entry.
entries | Vector of Database::entry to export. |
entries | Vector of Database::entry to export. |
out | Output stream. |
+
|
+ +overridevirtual | +
Base class for exports. + More...
+ +#include <export.hpp>
@@ -113,7 +117,9 @@ const vector< | ||
Base class for exports.
+Export vector of Database::entry.
+Export vector of Database::entry.
entries | Vector of Database::entry to export. |
entries | Vector of Database::entry to export. |
out | Output stream. |
+
|
+ +pure virtual | +
Print output to std::ostream.
+ +Implemented in remwharead::Export::AsciiDoc, remwharead::Export::CSV, remwharead::Export::Bookmarks, and remwharead::Export::Simple.
+ +entries | Vector of Database::entry to sort. |
entries | Vector of Database::entry to sort. |
Public Member Functions | |
-virtual void | print () const override |
Print output to std::ostream. | |
virtual void | print () const override |
Print output to std::ostream. More... | |
ExportBase (const vector< Database::entry > &entries, ostream &out=cout) | |
Export vector of Database::entry. More... | |
Export vector of Database::entry. More... | |
@@ -105,7 +104,7 @@ Additional Inherited Members | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sort entries from newest to oldest. More... | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ExportBase (const vector< Database::entry > &entries, ostream &out=cout) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Export vector of Database::entry. More... | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Export vector of Database::entry. More... | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Protected Attributes inherited from remwharead::Export::ExportBase | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
@@ -138,10 +137,10 @@ ostream & | _out |
entries | Vector of Database::entry to export. |
entries | Vector of Database::entry to export. |
out | Output stream. |
+
|
+ +overridevirtual | +
_uri (defined in remwharead::URI) | remwharead::URI | protected |
archive() | remwharead::URI | |
extract_description(const string &html) (defined in remwharead::URI) | remwharead::URI | protected |
extract_title(const string &html) (defined in remwharead::URI) | remwharead::URI | protected |
extract_description(const string &html) | remwharead::URI | protected |
extract_title(const string &html) | remwharead::URI | protected |
get() | remwharead::URI | |
remove_html_tags(const string &html, const string &tag="") | remwharead::URI | protected |
remove_newlines(string text) | remwharead::URI | protected |
set_curlpp_options(curlpp::Easy &request) (defined in remwharead::URI) | remwharead::URI | protected |
strip_html(const string &html) (defined in remwharead::URI) | remwharead::URI | protected |
unescape_html(const string &html) (defined in remwharead::URI) | remwharead::URI | protected |
URI(const string &uri) (defined in remwharead::URI) | remwharead::URI | explicit |
set_curlpp_options(curlpp::Easy &request) | remwharead::URI | protected |
strip_html(const string &html) | remwharead::URI | protected |
unescape_html(const string &html) | remwharead::URI | protected |
URI(const string &uri) | remwharead::URI | explicit |
Download, archive and process an URI. + More...
+ +#include <uri.hpp>
Public Member Functions | |
- | URI (const string &uri) |
URI (const string &uri) | |
Construct object and set URL. More... | |
-const html_extract | get () |
Download URI and extract title, description and full text. | |
const html_extract | get () |
Download URI and extract title, description and full text. More... | |
-const string | archive () |
Save URI in archive and return URI. | |
const string | archive () |
Save URI in archive and return archive-URI. More... | |
Protected Member Functions | |
-void | set_curlpp_options (curlpp::Easy &request) |
void | set_curlpp_options (curlpp::Easy &request) |
Sets common curlpp options. More... | |
-const string | extract_title (const string &html) |
const string | extract_title (const string &html) |
Extract the title from an HTML page. More... | |
-const string | extract_description (const string &html) |
const string | extract_description (const string &html) |
Extract the description from an HTML page. More... | |
-const string | strip_html (const string &html) |
const string | strip_html (const string &html) |
Removes HTML tags and superflous spaces from an HTML page. More... | |
-const string | remove_html_tags (const string &html, const string &tag="") |
Remove all HTML tags. If tag is not empty, remove only this tag. | |
const string | remove_html_tags (const string &html, const string &tag="") |
Remove HTML tags. More... | |
-const string | unescape_html (const string &html) |
const string | unescape_html (const string &html) |
Convert HTML entities to UTF-8. More... | |
-const string | remove_newlines (string text) |
Replace newlines with spaces. | |
const string | remove_newlines (string text) |
Replace newlines with spaces. More... | |
@@ -122,6 +123,300 @@ Protected Attributes | _uri |
Download, archive and process an URI.
+
+
|
+ +explicit | +
const string remwharead::URI::archive | +( | +) | ++ |
Save URI in archive and return archive-URI.
+
+
|
+ +protected | +
Extract the description from an HTML page.
+
+
|
+ +protected | +
Extract the title from an HTML page.
+const html_extract remwharead::URI::get | +( | +) | ++ |
Download URI and extract title, description and full text.
+
+
|
+ +protected | +
Remove HTML tags.
+html | HTML page. |
tag | If set, only remove this tag. |
+
|
+ +protected | +
Replace newlines with spaces.
+ +
+
|
+ +protected | +
+
|
+ +protected | +
Removes HTML tags and superflous spaces from an HTML page.
+
+
|
+ +protected | +
Convert HTML entities to UTF-8.
+Directories |
+Files | |
file | search.hpp [code] |
file | time.hpp [code] |
file | types.hpp [code] |
+ remwharead
+ 0.6.3
+
+ |
+
+ remwharead
+ 0.6.3
+
+ |
+
Cremwharead::Database | |
Cremwharead::Database::entry | |
▼Cremwharead::Export::ExportBase | |
Cremwharead::Export::AsciiDoc | |
Cremwharead::Database | Store and retrieve files from/to SQLite |
Cremwharead::Database::entry | Describes a database entry |
▼Cremwharead::Export::ExportBase | Base class for exports |
Cremwharead::Export::AsciiDoc | Export as AsciiDoc document |
Cremwharead::Export::Bookmarks | Export as Netscape bookmark file |
Cremwharead::Export::CSV | |
Cremwharead::Export::CSV | Export as Comma Separated Values |
Cremwharead::Export::Simple | Export as simple list |
Cremwharead::html_extract | |
Cremwharead::URI | |
Cremwharead::html_extract | A processed HTML page |
Cremwharead::URI | Download, archive and process an URI |
The easiest way is to include remwharead.hpp, which then includes all other headers.
+Compile your code with g++ -lremwharead
.
+ remwharead
+ 0.6.3
+
+ |
+
+ remwharead
+ 0.6.3
+
+ |
+
#include <vector>
#include <string>
#include "sqlite.hpp"
Go to the source code of this file.
++Functions | |
const vector< vector< string > > | remwharead::parse_expression (string expression) |
Split expression in subexpressions. More... | |
const string | remwharead::to_lowercase (const string &str) |
Convert str to lowercase. Works with unicode. More... | |
const vector< DB::entry > | remwharead::search_tags (const vector< Database::entry > &entries, string expression, const bool is_re) |
Search in tags of database entries. More... | |
const vector< DB::entry > | remwharead::search_all (const vector< Database::entry > &entries, string expression, const bool is_re) |
Search in full text of database entries. More... | |
const vector< vector< string > > remwharead::parse_expression | +( | +string | +expression | ) | ++ |
Split expression in subexpressions.
+First it splits at OR
or ||
, then it splits the subexpressions at AND
or &&
. The first vector contains all tags before the first OR
.
OR
-vectors of AND
-tags. const vector< Database::entry > remwharead::search_all | +( | +const vector< Database::entry > & | +entries, | +
+ | + | string | +expression, | +
+ | + | const bool | +is_re | +
+ | ) | ++ |
Search in full text of database entries.
+Searches in tags, title, description and full text.
+entries | Vector of Database::entry to search. |
expression | Search expression. |
is_re | Is it a regular expression? |
const vector< Database::entry > remwharead::search_tags | +( | +const vector< Database::entry > & | +entries, | +
+ | + | string | +expression, | +
+ | + | const bool | +is_re | +
+ | ) | ++ |
Search in tags of database entries.
+Only matches whole tags, Pill does not match Pillow.
+entries | Vector of Database::entry to search. |
expression | Search expression. |
is_re | Is it a regular expression? |
+ remwharead
+ 0.6.3
+
+ |
+
#include <experimental/filesystem>
#include <memory>
#include <string>
#include <vector>
#include <chrono>
#include <sqlite/connection.hpp>
#include "types.hpp"
Go to the source code of this file.
++Classes | |
class | remwharead::Database |
struct | remwharead::Database::entry |
+Typedefs | |
+using | remwharead::time_point = system_clock::time_point |
+using | remwharead::DB = Database |
Alias for Database.
+Describes a database entry. + More...
+ +#include <sqlite.hpp>
Public Member Functions | |
-const string | fulltext_oneline () const |
The full text in one line. | |
const string | fulltext_oneline () const |
The full text in one line. More... | |
@@ -109,11 +113,71 @@ string | fulltext |
Friends | |
-bool | operator== (const Database::entry &a, const Database::entry &b) |
Returns true if date & time are equal. | |
bool | operator== (const Database::entry &a, const Database::entry &b) |
Returns true if date and time are equal. More... | |
Describes a database entry.
+const string remwharead::Database::entry::fulltext_oneline | +( | +) | +const | +
+
|
+ +friend | +
A processed HTML page. + More...
+ +#include <uri.hpp>
Public Attributes | description | fulltext |
A processed HTML page.
+
+ remwharead
+ 0.6.3
+
+ |
+
#include <string>
#include <chrono>
Go to the source code of this file.
++Functions | |
const time_point | remwharead::string_to_timepoint (const string &strtime, bool sqlite=false) |
Convert ISO 8601 or SQLite time-string to time_point. More... | |
const string | remwharead::timepoint_to_string (const time_point &tp, bool sqlite=false) |
Convert time_point to ISO 8601 or SQLite time-string. More... | |
const time_point remwharead::string_to_timepoint | +( | +const string & | +strtime, | +
+ | + | bool | +sqlite = false |
+
+ | ) | ++ |
Convert ISO 8601 or SQLite time-string to time_point.
+The SQLite format is YY-MM-DD hh:mm:ss instead of YY-MM-DDThh:mm:ss.
+strtime | Time string in ISO 8601 or SQLite format. |
sqlite | Is the string in SQLite format? |
const string remwharead::timepoint_to_string | +( | +const time_point & | +tp, | +
+ | + | bool | +sqlite = false |
+
+ | ) | ++ |
Convert time_point to ISO 8601 or SQLite time-string.
+The SQLite format is YY-MM-DD hh:mm:ss instead of YY-MM-DDThh:mm:ss.
+time_point | The std::chrono::system_clock::time_point. |
sqlite | Is the string in SQLite format? |
+ remwharead
+ 0.6.3
+
+ |
+
Go to the source code of this file.
++Enumerations | |
enum | remwharead::export_format { + undefined, +csv, +asciidoc, +bookmarks, + + simple + + } |
Format of the export. More... | |
+
|
+ +strong | +