index 0000000000000000000000000000000000000000,2ddece610daf11ea688239f49ad1d0fec51c6d31..bc40990b1e2cd90694e57ddd6b71df2412538c65
mode 000000,100644..100644
+ $this->author = preg_replace('#^w{3}.#', '', Tools::getdomain($entry["url"])); # if only one article, set author to domain name (we strip the eventual www part)
+ Tools::logm('Producing ebook from article ' . $this->bookTitle);
+ $book->setIdentifier("http://$_SERVER[HTTP_HOST]", EPub::IDENTIFIER_URI); // Could also be the ISBN number, prefered for published books, or a UUID.
+ //$book->setLanguage("en"); // Not needed, but included for the example, Language is mandatory, but EPub defaults to "en". Use RFC3066 Language codes, such as "en", "da", "fr" etc.
+ $book->setDescription(_("Some articles saved on my wallabag"));
+ $book->setAuthor($this->author,$this->author);
+ $book->setPublisher("wallabag", "wallabag"); // I hope this is a non existant address :)
+ $book->setDate(time()); // Strictly not needed as the book date defaults to time().
+ //$book->setRights("Copyright and licence information specific for the book."); // As this is generated, this _could_ contain the name or licence information of the user who purchased the book, if needed. If this is used that way, the identifier must also be made unique for the book.
+ $cover = $content_start . '<div style="text-align:center;"><p>' . _('Produced by wallabag with PHPePub') . '</p><p>'. _('Please open <a href="https://github.com/wallabag/wallabag/issues" >an issue</a> if you have trouble with the display of this E-Book on your device.') . '</p></div>' . $bookEnd;
+
+ //$book->addChapter("Table of Contents", "TOC.xhtml", NULL, false, EPub::EXTERNAL_REF_IGNORE);
+ $content->appendParagraph('<div style="text-align:center;" ><p>' . _('Produced by wallabag with PHPMobi') . '</p><p>'. _('Please open <a href="https://github.com/wallabag/wallabag/issues" >an issue</a> if you have trouble with the display of this E-Book on your device.') . '</p></div>');
+ <p>' . _('Produced by wallabag with tcpdf') . '</p>
+ <p>'. _('Please open <a href="https://github.com/wallabag/wallabag/issues" >an issue</a> if you have trouble with the display of this E-Book on your device.') . '</p>
- msgid "You can import your Pocket, Readability, Instapaper, Wallabag or any data in appropriate json or html format."
- msgstr "You can import your Pocket, Readability, Instapaper, wallabag or any fil in appropriate JSON or HTML format."
-
+msgid ""
- "Please execute the import script locally as it can take a very long time."
++"You can import your Pocket, Readability, Instapaper, Wallabag or any data in "
++"appropriate json or html format."
+msgstr ""
++"You can import your Pocket, Readability, Instapaper, wallabag or any fil in "
++"appropriate JSON or HTML format."
+
- msgid "Please select export file on your computer and press \"Import\" button below. Wallabag will parse your file, insert all URLs and start fetching of articles if required."
- msgstr "Please select export file on your computer and press “Import” button below. wallabag will parse your file, insert all URLs and start fetching of articles if required."
- "Please execute the import script locally as it can take a very long time."
++msgid ""
++"Please select export file on your computer and press \"Import\" button "
++"below. Wallabag will parse your file, insert all URLs and start fetching of "
++"articles if required."
++msgstr ""
++"Please select export file on your computer and press “Import” "
++"button below. wallabag will parse your file, insert all URLs and start "
++"fetching of articles if required.Please execute the import script locally as "
++"it can take a very long time."
+
+msgid "You can click here to fetch content for articles with no content."
+msgstr "Fetch content for articles with no content"
+
+ msgid ""
+ "Please execute the import script locally as it can take a very long time."
+ msgstr ""
+ "Please execute the import script locally as it can take a very long time."
index 25c3aa262320b9b7f06db4aa291d4a0ad28639ec,0000000000000000000000000000000000000000..579d1acad746094155e6faad03e9270431d84405
mode 100644,000000..100644
- msgid "Please select export file on your computer and press \"Import\" button below. Wallabag will parse your file, insert all URLs and start fetching of articles if required."
- msgstr "Please select export file on your computer and press “Import” button below. wallabag will parse your file, insert all URLs and start fetching of articles if required."
++msgid ""
++"You can import your Pocket, Readability, Instapaper, Wallabag or any data in "
++"appropriate json or html format."
++msgstr ""
++"You can import your Pocket, Readability, Instapaper, wallabag or any file in "
++"appropriate JSON or HTML format."
+
+msgid ""
+"Please execute the import script locally as it can take a very long time."
+msgstr ""
+"Please execute the import script locally as it can take a very long time."
<p><a href="?import">{% trans "You can click here to fetch content for articles with no content." %}</a></p>
-
+ <p class="more-info">{% trans "Fetching process is controlled by two constants in your config file: IMPORT_LIMIT (how many articles are fetched at once) and IMPORT_DELAY (delay between fetch of next batch of articles)." %}</p>
+
<h2>{% trans "Export your wallabag data" %}</h2>
- {% if constant('STORAGE') == 'sqlite' %}
- <p><a href="?download" target="_blank">{% trans "Click here" %}</a> {% trans "to download your database." %}</p>{% endif %}
- <p><a href="?export" target="_blank">{% trans "Click here" %}</a> {% trans "to export your wallabag data." %}</p>
-
+ <p><a href="?export" target="_blank">{% trans "Export JSON" %}</a><br>
+ <span class="more-info">Data will be exported in a single JSON file.</span></p>
- <span class="more-info">{% trans "Articles will be exported as a single E-book file (EPUB 3 format)." %} {% trans "This can <b>take a while</b> and can <b>even fail</b> if you have too many articles, depending on your server configuration." %}</span></p>
+ <p>{% trans "Click to get all your articles in one ebook :" %}
+ <ul>
+ <li><a href="./?epub&method=all" title="{% trans 'Generate ePub file' %}">ePub 3</a></li>
+ <li><a href="./?mobi&method=all" title="{% trans 'Generate Mobi file' %}">Mobi</a></li>
+ <li><a href="./?pdf&method=all" title="{% trans 'Generate PDF file' %}">PDF</a></li>
+ </ul>
+
- <br>{% trans "This can <b>take a while</b> and can <b>even fail</b> if you have too many articles, depending on your server configuration." %}</p>
++ <span class="more-info">{% trans "This can <b>take a while</b> and can <b>even fail</b> if you have too many articles, depending on your server configuration." %}</span></p>
- <h2>{% trans "Cache" %}</h2>
- <p><a href="?empty-cache">{% trans "Click here" %}</a> {% trans "to delete cache." %}</p>
+ <h2><a name="cache"></a>{% trans "Cache" %}</h2>
+ <p><a href="?empty-cache">{% trans "Delete Cache" %}</a><br>
+ <span class="more-info">Deleting the cache may help with display or other problems.</span></p>
- {% if view == 'home' %}{% if nb_results > 1 %}<a title="{% trans "Mark all the entries as read" %}" href="./?action=archive_all">{{ "Mark all the entries as read" }}</a>{% endif %}{% endif %}
-
- {% if search_term is defined %}<a title="{% trans %} Apply the tag {{ search_term }} to this search {% endtrans %}" href="./?action=add_tag&search={{ search_term }}">{% trans %} Apply the tag {{ search_term }} to this search {% endtrans %}</a>{% endif %}
+ {% if view == 'home' %}{% if nb_results > 1 %}<p><a title="{% trans "Mark all the entries as read" %}" href="./?action=archive_all">{% trans "Mark all the entries as read" %}</a></p>{% endif %}{% endif %}
-
- {% if searchterm is defined %}<p><a title="{% trans "Tag these results as" %} {{ searchterm }}" href="./?action=add_tag&search={{ searchterm }}">
- {% trans "Tag these results as" %} {{ searchterm }}</p></a>{% endif %}
-
- {% if tag %}<p><a title="{% trans "Download the articles from this tag in an epub" %}" href="./?epub&method=tag&value={{ tag.value }}">{% trans "Download the articles from this tag in an epub" %}</p></a>
- {% elseif search_term is defined %}<p><a title="{% trans "Download the articles from this search in an epub" %}" href="./?epub&method=search&value={{ search_term }}">{% trans "Download the articles from this search in an epub" %}</p></a>
- {% else %}<p><a title="{% trans "Download the articles from this category in an epub" %}" href="./?epub&method=category&value={{ view }}">{% trans "Download the articles from this category in an epub" %}</a></p>{% endif %}
++ {% if searchterm is defined %}<a title="{% trans "Tag these results as" %} {{ searchterm }}" href="./?action=add_tag&search={{ searchterm }}">{% trans "Tag these results as" %} {{ searchterm }}</a>{% endif %}<br />
- {% elseif search_term is defined %}
- <a title="{% trans "Download the articles from this search in an epub" %}" href="./?epub&method=search&value={{ search_term }}">{% trans "Download as ePub3" %}</a>
- <a title="{% trans "Download the articles from this search in a mobi file" %}" href="./?mobi&method=search&value={{ search_term }}">{% trans "Download as Mobi" %}</a>
- <a title="{% trans "Download the articles from this search in a pdf file" %}" href="./?pdf&method=search&value={{ search_term }}">{% trans "Download as PDF" %}</a>
+ {% if tag %}
+ <a title="{% trans "Download the articles from this tag in an epub file" %}" href="./?epub&method=tag&value={{ tag.value }}">{% trans "Download as ePub3" %}</a>
+ <a title="{% trans "Download the articles from this tag in a mobi file" %}" href="./?mobi&method=tag&value={{ tag.value }}">{% trans "Download as Mobi" %}</a>
+ <a title="{% trans "Download the articles from this tag in a pdf file" %}" href="./?pdf&method=tag&value={{ tag.value }}">{% trans "Download as PDF" %}</a>
++ {% elseif searchterm is defined %}
++ <a title="{% trans "Download the articles from this search in an epub" %}" href="./?epub&method=search&value={{ searchterm }}">{% trans "Download as ePub3" %}</a>
++ <a title="{% trans "Download the articles from this search in a mobi file" %}" href="./?mobi&method=search&value={{ searchterm }}">{% trans "Download as Mobi" %}</a>
++ <a title="{% trans "Download the articles from this search in a pdf file" %}" href="./?pdf&method=search&value={{ searchterm }}">{% trans "Download as PDF" %}</a>
+ {% else %}
+ <a title="{% trans "Download the articles from this category in an epub" %}" href="./?epub&method=category&value={{ view }}">{% trans "Download as ePub3" %}</a>
+ <a title="{% trans "Download the articles from this category in a mobi file" %}" href="./?mobi&method=category&value={{ view }}">{% trans "Download as Mobi" %}</a>
+ <a title="{% trans "Download the articles from this category in a pdf file" %}" href="./?pdf&method=category&value={{ view }}">{% trans "Download as PDF" %}</a>
<p><a href="?import">{% trans "You can click here to fetch content for articles with no content." %}</a></p>
+ <p class="more-info">{% trans "Fetching process is controlled by two constants in your config file: IMPORT_LIMIT (how many articles are fetched at once) and IMPORT_DELAY (delay between fetch of next batch of articles)." %}</p>
<h2>{% trans "Export your wallabag data" %}</h2>
- {% if constant('STORAGE') == 'sqlite' %}
- <p><a href="?download" target="_blank">{% trans "Click here" %}</a> {% trans "to download your database." %}</p>{% endif %}
- <p><a href="?export" target="_blank">{% trans "Click here" %}</a> {% trans "to export your wallabag data." %}</p>
+ <p><a href="?export" target="_blank">{% trans "Export JSON" %}</a><br>
+ <span class="more-info">Data will be exported in a single JSON file.</span></p>
- <span class="more-info">{% trans "Articles will be exported as a single E-book file (EPUB 3 format)." %} {% trans "This can <b>take a while</b> and can <b>even fail</b> if you have too many articles, depending on your server configuration." %}</span></p>
+ <p>{% trans "Click to get all your articles in one ebook :" %}
+ <li><a href="./?pdf&method=all" title="Generate PDF file">PDF</a></li>
+ </ul>
++ </p>
+
- <br>{% trans "This can <b>take a while</b> and can <b>even fail</b> if you have too many articles, depending on your server configuration." %}</p>
++ <span class="more-info">{% trans "This can <b>take a while</b> and can <b>even fail</b> if you have too many articles, depending on your server configuration." %}</span></p>
-
+ <h2><a name="cache"></a>{% trans "Cache" %}</h2>
+ <p><a href="?empty-cache">{% trans "Delete Cache" %}</a><br>
+ <span class="more-info">Deleting the cache may help with display or other problems.</span></p>
++ {% if view == 'home' %}{% if nb_results > 1 %}<p><a title="{% trans "Mark all the entries as read" %}" href="./?action=archive_all">{% trans "Mark all the entries as read" %}</a></p>{% endif %}{% endif %}
++ {% if searchterm is defined %}<a title="{% trans "Tag these results as" %} {{ searchterm }}" href="./?action=add_tag&search={{ searchterm }}">{% trans "Tag these results as" %} {{ searchterm }}</a>{% endif %}<br />
-- {% if view == 'home' %}{% if nb_results > 1 %}<a title="{% trans "mark all the entries as read" %}" href="./?action=archive_all">{% trans "mark all the entries as read" %}</a>{% endif %}{% endif %}
--
- {% if searchterm is defined %}<a title="{% trans "Tag these results as" %} {{ searchterm }}" href="./?action=add_tag&search={{ searchterm }}">
- {% trans "Tag these results as" %} {{ searchterm }}</a>{% endif %}
-
- {% if tag %}<a title="{% trans "Download the articles from this tag in an epub" %}" href="./?epub&method=tag&value={{ tag.value }}">{% trans "Download the articles from this tag in an epub" %}</a>
- {% elseif searchterm is defined %}<a title="{% trans "Download the articles from this search in an epub" %}" href="./?epub&method=search&value={{ searchterm }}">{% trans "Download the articles from this search in an epub" %}</a>
- {% if tag %}<a title="{% trans "Download the articles from this tag in an epub" %}" href="./?epub&method=tag&value={{ tag.value }}">{% trans "Download the articles from this tag in an epub" %}</a>
- {% elseif search_term is defined %}<a title="{% trans "Download the articles from this search in an epub" %}" href="./?epub&method=search&value={{ search_term }}">{% trans "Download the articles from this search in an epub" %}</a>
-- {% else %}<a title="{% trans "Download the articles from this category in an epub" %}" href="./?epub&method=category&value={{ view }}">{% trans "Download the articles from this category in an epub" %}</a>{% endif %}
++ {% if tag %}
++ <a title="{% trans "Download the articles from this tag in an epub file" %}" href="./?epub&method=tag&value={{ tag.value }}">{% trans "Download as ePub3" %}</a>
++ <a title="{% trans "Download the articles from this tag in a mobi file" %}" href="./?mobi&method=tag&value={{ tag.value }}">{% trans "Download as Mobi" %}</a>
++ <a title="{% trans "Download the articles from this tag in a pdf file" %}" href="./?pdf&method=tag&value={{ tag.value }}">{% trans "Download as PDF" %}</a>
++ {% elseif searchterm is defined %}
++ <a title="{% trans "Download the articles from this search in an epub" %}" href="./?epub&method=search&value={{ searchterm }}">{% trans "Download as ePub3" %}</a>
++ <a title="{% trans "Download the articles from this search in a mobi file" %}" href="./?mobi&method=search&value={{ searchterm }}">{% trans "Download as Mobi" %}</a>
++ <a title="{% trans "Download the articles from this search in a pdf file" %}" href="./?pdf&method=search&value={{ searchterm }}">{% trans "Download as PDF" %}</a>
++ {% else %}
++ <a title="{% trans "Download the articles from this category in an epub" %}" href="./?epub&method=category&value={{ view }}">{% trans "Download as ePub3" %}</a>
++ <a title="{% trans "Download the articles from this category in a mobi file" %}" href="./?mobi&method=category&value={{ view }}">{% trans "Download as Mobi" %}</a>
++ <a title="{% trans "Download the articles from this category in a pdf file" %}" href="./?pdf&method=category&value={{ view }}">{% trans "Download as PDF" %}</a>