Sign in

Exporting full blog to an epub book

  • This topic has 4 replies, 3 voices, and was last updated 3 weeks ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #3044
    Avatar photoNitaaiKumar

    Greetings. There many WordPress plugins which convert the blog into an epub ebook for offline reading. So there certainly is demand for download a website once and read forever even without internet. There is excellent search, font resizing, soothing page background colors, brightness settings, go to navigation, thumbnail navigation, table of contents, bookmarking, notes, etc. features in almost all ebook readers nowadays like iBooks, Google Play Books, etc. etc.

    The epub format is also based on xml/html etc. So if any time in the near or far future if you can kindly add this awesome feature in Publii of exporting all the posts in a blog into its own epub ebook with the post titles showing in the epub TOC. It would blow all the ebook publishing softwares out of the water because in Publii we are getting a very pretty (many themes) static html seo-optimized website also as a very huge bonus.

    So just write once in Publii and publish it as a fast website and a epub in one shot.

    You could even charge for this Publii epub export as a premium feature which all of us who need it can pay for. I am also willing to donate to support the development of this epub export feature. Thanks.

    #3073
    Avatar photoMathias

    Hi NitaaiKumar,

    How good are you at programming? Such functionality can be easily created yourself: you query the “posts” table (in db.sqlite = sqlite3 database format, open and free) and dump it into some format of your liking. I programmed a VBA script which exports all my posts to individual PDF files. I guess something similar could be done for epub format.

    Mathias

    #3076
    Avatar photoNitaaiKumar

    Wow Mathias. I can’t program at all. I would not know how to do it myself. Thanks for sharing. You are kind. Great to know. Plus I may be wrong but such scripts could be written for Publii on Windows but not on Macs?

    From my side, why I preferred an epub over a pdf is because most pdfs are not optimized to be read on mobiles due to their A4 or similar sizes, whereas we know 80% of the world’s audience is on mobiles anyway. They need a lot of pinch and zoom in such a case. Plus having separate pdfs for each post would need them to save so many pdfs separately. Whereas epubs can easily go to 1000s of pages in very lightweight xml pages I think along with all the features I mentioned above, which are not possible in pdfs.

    Wish Bob and Tomasz create a paid plugin for epub export too after the plugin functionality is live in Publii. People pay so much for buying epub and website creator softwares at the same time. So they will certainly buy this epub export plugin.

    #9058
    Avatar photoBlinker

    Hi NitaaiKumar,

    How good are you at programming? Such functionality can be easily created yourself: you query the “posts” table (in db.sqlite = sqlite3 database format, open and free) and dump it into some format of your liking. I programmed a VBA script which exports all my posts to individual PDF files. I guess something similar could be done for epub format.

    Mathias

    Hello!

    I am looking for a possibility to print out my blog. All plugins and tools I have tried so far failed (they all had problems with the pictures). Mathias, are you still here? If so, may I ask you to send me your script, so I can give it a try?

    Regards!
    Thomas

    #9075
    Avatar photoMathias

    Here you go (VBA for MS Access, posts table mapped – I built a query qry_posts1 to add in some additional columns):

    Option Compare Database

    Sub maakArchieven()

    Dim dbs As DAO.Database
    Dim rst As DAO.Recordset

    Dim map As String
    Dim titel As String
    Dim htm As String
    Dim bestand As String
    Dim info As String

    Dim WordApp As Object
    Dim oField As Field

    map = “C:\Users\mak\Sync\MVA\Volkskunde\Loenhout\Gezinsreconstructies\VoorRijksarchief\PDF\”

    Set dbs = CurrentDb

    Set rst = dbs.OpenRecordset(“qry_posts1”, dbOpenDynaset)
    rst.MoveFirst

    While Not rst.EOF
    titel = rst!Title
    bestand = rst!slug
    If Right(titel, 13) = “(OA Loenhout)” Then
    htm = rst!Text
    info = “<p>Archiefbewerking door ” & rst!Name & “.<br>”
    info = info & “Document aangemaakt op ” & Date & “.<br>”
    info = info & “De meest recente versie is te vinden op http://www.geschiedenisvanloenhout.net.<br&gt;”
    info = info & “Digitale verwerking door Mathias Van Aken.<br>

    info = info & “—————–</p>”
    htm = “<html>” & info & htm & “</html>”
    Open map & bestand & “.htm” For Output As #1
    Print #1, htm
    Close #1
    Set WordApp = CreateObject(“word.Application”)
    WordApp.Documents.Open map & bestand & “.htm”
    WordApp.Visible = True

    WordApp.ActiveDocument.Fields.Unlink
    WordApp.ActiveDocument.Range.Find.Execute Replace:=wdReplaceAll
    With WordApp.Selection.Find
    .Text = “| * |”
    .Replacement.Text = “”
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchAllWordForms = False
    .MatchSoundsLike = False
    .MatchWildcards = True
    End With
    WordApp.Selection.Find.Execute Replace:=wdReplaceAll
    WordApp.ActiveDocument.saveas FileName:=map & bestand & “.pdf”, FileFormat:=wdFormatPDF
    WordApp.Quit SaveChanges:=0
    Set WordApp = Nothing

    End If
    rst.MoveNext
    Wend

    rst.Close
    Set rst = Nothing

    End Sub

    Public Function ReplacePattern(ByRef iString As String, iSearchPattern As String, iReplaceWith As Variant)
    ‘—————————————————————————————
    ‘ Procedure : ReplacePattern
    ‘ Purpose : Searches a string by pattern and replaces the text with given value
    ‘ Returns : Replaced string.
    ‘—————————————————————————————

    Dim RE As Object
    Set RE = CreateObject(“VBScript.RegExp”)

    RE.ignorecase = True
    RE.Global = True

    RE.Pattern = iSearchPattern
    iString = RE.Replace(iString, iReplaceWith)
    ReplacePattern = iString

    On Error Resume Next
    Set RE = Nothing

    End Function

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.