topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 8:35 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Book synopsis template  (Read 18482 times)

fredemeister

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 39
    • View Profile
    • Donate to Member
Book synopsis template
« on: October 12, 2019, 10:59 PM »
I'm writing my own book library for family members, and this is the code for each entry, using dummy data:

<section class="container">

  <p class="txt--center font-bold--200">_Character_Name  Series</p>

  <article>

    <div>

      <h2 id="silent-heroes">01 Silent Heroes</h2>

      <a href="one/two/silent-heroes.epub"><img src="silent-heroes" alt="book-cover" height="200" /></a>

      <p>[SYNOPSIS GOES HERE] <a class="read-book-link--maroon" href="one/two/silent-heroes.epub">Read the book!</a></p>

    </div>

  </article>

</section>

  // Repeat <div> as required //

Each author in this library has one page, headed with their name and photo. This page will have all their books listed under character-name headings, with this code above used for each book in that series.

I see the ID would be the determining factor in making sure the data is entered for the correct book.

There is other code, but that's for page layout.

After going through this over 200 times so far, and with, oh ... only about another 5,000 more, I'm thinking there has to be a better way than manually authoring the web page. Some CSS image galleries have a gui for entering the appropriate information, which then inserts that data in the relevant places in the HTML.

I don't know how to do this, but would javascript be a good option to do this from a list? ( I don't know javascript, btw.) Or could someone tell me what's involved for some other method?

mtia
freD

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #1 on: October 13, 2019, 04:38 AM »
Have you considered using some existing free webapp for this instead?

For example Airtable. It is quite end user friendly and you can include thumbnails, attachements, clickable links and more on each row in the database. A simple setup would be one big spreadsheet shared by all family members and then each person is tasked to add/remove/update their books in it with information for each of the data categories (columns) you have initially created.
Edit: For example this template but add an "owner" column and whatever other columns you need.

fredemeister

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 39
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #2 on: October 13, 2019, 07:58 PM »
Have you considered using some existing free webapp for this instead?

Edit: For example this template but add an "owner" column and whatever other columns you need.

Thanks for this, I'll look into it.

Update: Seems like everything has to be stored in the cloud - I'm hosting this locally available on a VPN.
« Last Edit: October 13, 2019, 08:10 PM by fredemeister »

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #3 on: October 14, 2019, 05:18 PM »
Seems like everything has to be stored in the cloud - I'm hosting this locally available on a VPN.
Yeah, Airtable is web (cloud) based. So not a good fit if you want to self-host locally.

It seems likely there are tools for this kind of thing out there already.

For example I've seen that there is a web interface app called calibre-web for the Ebook library manager Calibre. I haven't tried using nor setting up that web interface, so I can't say if it is any good.

One important thing to specify: Is your goal a system where your family members (who I assume are not all programmers!) themselves edit information about books through a locally hosted web app of some sort? Or is the goal that only you update the information and then your family reads it through locally hosted webpages?

tsaint

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 497
  • Hi from the a*** end of the earth
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Book synopsis template
« Reply #4 on: October 15, 2019, 06:24 AM »
Possible lines of enquiry: a. Mail merge using office variants b. excel macros to generate html

fredemeister

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 39
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #5 on: October 17, 2019, 05:54 PM »
Seems like everything has to be stored in the cloud - I'm hosting this locally available on a VPN.
...

One important thing to specify: Is your goal a system where your family members (who I assume are not all programmers!) themselves edit information about books through a locally hosted web app of some sort? Or is the goal that only you update the information and then your family reads it through locally hosted webpages?

Thanks for your reply, the second is the way I'm going, although slowly. :)

fredemeister

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 39
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #6 on: October 17, 2019, 05:58 PM »
Possible lines of enquiry: a. Mail merge using office variants b. excel macros to generate html

Thanks, hadn't thought of that option. Haven't used mail merge since I taught it almost 18 years ago. (Mind working feverishly...)

tsaint

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 497
  • Hi from the a*** end of the earth
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Book synopsis template
« Reply #7 on: October 17, 2019, 11:03 PM »
Last time I used mail merge(same as you - teaching, a lifetime ago), it produced one long doc. Maybe Office now has the ability to split the doc - ideal for discrete web pages.
Alternative would be to output the mail merge to txt/rtf and use a doc splitting app (eg https://www.gdgsoft.com/gsplit/ text file splitter). Auto naming the individual files plus handling the images might be the biggest problems - probably both surmountable relatively easily

fredemeister

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 39
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #8 on: October 18, 2019, 03:11 AM »
I've only ever used it for form letters, so will need to experiment a bit with that.

Some css image sliders and galleries have a system that's exactly what I want, but they're hard coded, so the field-names and positions don't match.

So I need a wet Sunday afternoon after the Rugby World Cup has finished.

 ;)

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,186
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #9 on: October 18, 2019, 09:42 AM »
Seems like everything has to be stored in the cloud - I'm hosting this locally available on a VPN.
...

One important thing to specify: Is your goal a system where your family members (who I assume are not all programmers!) themselves edit information about books through a locally hosted web app of some sort? Or is the goal that only you update the information and then your family reads it through locally hosted webpages?

Thanks for your reply, the second is the way I'm going, although slowly. :)



Do you want the pages to be able to be hosted anywhere?  Or just serve them from the app?  Or does it matter?

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 732
  • Call me Vic!
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #10 on: October 18, 2019, 06:42 PM »
Fred, two questions:

  • Is what you want simply a GUI with a text field for inserting synopsis, then replacing "[SYNOPSIS GOES HERE]" in your HTML snippet?
  • What's the source of the synopsis text? We may be able to query/fetch all of them them right into the HTML, in a sequential automated batch.

Regards.
My name's Victor but do feel free to call me Vic!

Support with your DonationCredits!
❤️ Support on Patreon @ www.patreon.com/publicdomain
🎁 One-time Paypal @ www.paypal.com/paypalme/victorvls
Email/Paypal: publicdomainvicgmail.com

fredemeister

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 39
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #11 on: October 18, 2019, 08:24 PM »
Do you want the pages to be able to be hosted anywhere?  Or just serve them from the app?  Or does it matter?

Hi Wraith, I'm going to host these pages locally.

Many thanks for your interest.

fredemeister

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 39
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #12 on: October 18, 2019, 08:34 PM »
Fred, two questions:

Hi PD

Answers to your questions:

1.  Is what you want simply a GUI with a text field for inserting synopsis, then replacing "[SYNOPSIS GOES HERE]" in your HTML snippet?

        Yes please. Given there will be between 3 and 20 listings under any given author.

2.  What's the source of the synopsis text? We may be able to query/fetch all of them them right into the HTML, in a sequential automated batch.

        I modify synopses from three sources, Goodreads, FantasticFiction and another, random one. Usually try to limit each one to about 140-150 words.

fredemeister

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 39
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #13 on: October 20, 2019, 12:51 AM »
@tsaint

I can use Excel to create the fields for the mail merge, then use the code above in Word to get the blocks of code in many other word docs. Then save as text, import into Notepad++ and use macros to copy each block to a "master-page", then copy that into the html page. A bit messy, but better than entering each book detail separately.

Thanks for the suggestion.  :)

tsaint

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 497
  • Hi from the a*** end of the earth
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Book synopsis template
« Reply #14 on: October 20, 2019, 05:13 AM »
No worries. But because I'm curious...
Isn't it possible to have the complete html tags/code in the word doc, so when the merge is done, you have complete web pages?
 I saw a macro (maybe not necessary in late versions of word) to produce discrete merged documents.

 I have no idea whether a merged doc can be rtf or txt or must be in doc/docx format. If only docx, each individual doc would have to be converted to txt then html or else straight to html. If the merged output could be txt, wouldn't just an extension rename to html do the trick if the original doc "template" contained all necessary html code and tags?

I have no immediate use for your process, but like so many other things I read, it's just interesting for its own sake
 

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 732
  • Call me Vic!
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #15 on: October 20, 2019, 05:51 AM »
OK, I've started the "Book Synopsis Template" GUI project.

Replacements being:

Code: HTML5 [Select]
  1. <section class="container">
  2.  
  3.   <p class="txt--center font-bold--200">[CHARACTER-NAME]  Series</p>
  4.  
  5.   <article>
  6.  
  7.     <div>
  8.  
  9.       <h2 id="[BOOK-ID]">[BOOK-TITLE]</h2>
  10.  
  11.       <a href="[FILE-PATH]"><img src="[IMAGE-PATH]" alt="book-cover" height="200" /></a>
  12.  
  13.       <p><a class="read-book-link--maroon" href=[FILE-PATH]">Read the book!</a></p>
  14.  
  15.     </div>
  16.  
  17.   </article>
  18.  

Posting first release version next.
My name's Victor but do feel free to call me Vic!

Support with your DonationCredits!
❤️ Support on Patreon @ www.patreon.com/publicdomain
🎁 One-time Paypal @ www.paypal.com/paypalme/victorvls
Email/Paypal: publicdomainvicgmail.com
« Last Edit: October 20, 2019, 09:07 AM by publicdomain »

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #16 on: October 20, 2019, 11:18 AM »
Something like this is easily done using AsciiDoc. Which will result in a human readable set of text files and images that are very easy to maintain by almost anyone, as there is very little technical knowledge necessary. Perhaps initially there might be some time needed to get acquainted with the (basic) syntax of AsciiDoc, but afterwards content generation is much faster and easier for a person, but it is also a lot easier for automated content generation using simple text formatted for use in AsciiDoc.

You will need an AsciiDoc editor. Although every text editor is, in essence, an AsciiDoc editor, but only if you are very familiar with the syntax. For those that are not, use AsciiDocFX. This editor actually comes with a pretty extensive 'cheat-sheet' built-in, which should get you up to speed with (basic) AsciiDoc syntax in a very short time.

Attached You'll find an example of a template setup, which took me about an hour and a half to complete from scratch (including writing this message).

The (real-time) previewer in the AsciiDocFX editor allows you to directly export the content you create to HTML and/or PDF and/or EPub and/or DocBook. It also allows you to watch how the content looks like (real-time) in your default browser too.

When finished you could export the HTML version directly into the folder of your current web server software, so anyone looking at the pages on your personal web server are one refresh away of seeing your newest content. If you are not happy with the current choices of fonts, colors, etc. you can add a link to the css file that does have the CSS settings you prefer.

Creating pages like this makes it also easy to store things in a versioning system like Git. And if you use github or a similar service, that can act as a remote backup.

While you could use the exported HTML directly onto the web server software you have in place already, it could result in one huge page, which could affect the performance of your web server software significantly. Generally speaking, any web server software can server small sets of files easily, but one big file with everything included is taxing, especially when many users access the same content the same time. Hence, this might not be such good scenario for your use case. After all, I have no idea how large your collection of data is.

However, there is a solution for this to in the form of static website generators in general and Hugo in particular. Their forum and documentation. This SSG is known to work with AsciiDoc content and generates content optimized for web servers. And there are a lot of templates available that could make your generated website even prettier.

attachment is supposed to be here:
« Last Edit: October 21, 2019, 04:16 PM by Deozaan, Reason: fixed attachments »

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #17 on: October 20, 2019, 11:37 AM »
[ Attachments fixed ]
« Last Edit: October 21, 2019, 10:05 PM by Shades »

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,186
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #18 on: October 21, 2019, 11:07 AM »
Still no attachment :)

fredemeister

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 39
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #19 on: October 21, 2019, 03:40 PM »
OK, I've started the "Book Synopsis Template" GUI project.

Replacements being:

Code: HTML5 [Select]
  1. <section class="container">
  2.  
  3.   <p class="txt--center font-bold--200">[CHARACTER-NAME]  Series</p>
  4.  
  5.   <article>
  6.  
  7.     <div>
  8.  
  9.       <h2 id="[BOOK-ID]">[BOOK-TITLE]</h2>
  10.  
  11.       <a href="[FILE-PATH]"><img src="[IMAGE-PATH]" alt="book-cover" height="200" /></a>
  12.  
  13.       <p>[BOOK-SYNOPSIS] <a class="read-book-link--maroon" href=[FILE-PATH]">Read the book!</a></p>
  14.  
  15.     </div>
  16.  
  17.   </article>
  18.  

Posting first release version next.

Hi, thanks for this ... in the last <p> "read the book" anchor, I've added the synopsis and a space after.

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,747
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Book synopsis template
« Reply #20 on: October 21, 2019, 04:17 PM »
attachment is supposed to be here:

The trick is to not try to insert attachments into the body of the post unless it's an image. :Thmbsup:

I modified your posts so the attachments would appear. Now it's up to you to remove the ones that shouldn't be showing up. :D

fredemeister

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 39
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #21 on: October 21, 2019, 04:30 PM »
No worries. But because I'm curious...
Isn't it possible to have the complete html tags/code in the word doc, so when the merge is done, you have complete web pages?
 I saw a macro (maybe not necessary in late versions of word) to produce discrete merged documents.

 I have no idea whether a merged doc can be rtf or txt or must be in doc/docx format. If only docx, each individual doc would have to be converted to txt then html or else straight to html. If the merged output could be txt, wouldn't just an extension rename to html do the trick if the original doc "template" contained all necessary html code and tags?

I have no immediate use for your process, but like so many other things I read, it's just interesting for its own sake


Ive tried, but cannot get it to work using the html file as the parent document, and an Excel spreadsheet as the data file. According to Microsoft Help on the subject it SHOULD work, so I must be doing something wrong. I'll try again later when I can devote more time to it.

fredemeister

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 39
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #22 on: October 21, 2019, 04:42 PM »
Something like this is easily done using AsciiDoc.

Thanks for the suggestion, but at this stage I'll put some time into stuff I know something about. Had a quick look at it and opened the txt file you attached, but all I got in the viewer was thousands of black diamonds with question marks inside.   :-[


publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 732
  • Call me Vic!
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #23 on: October 21, 2019, 06:00 PM »
Hi, thanks for this ... in the last <p> "read the book" anchor, I've added the synopsis and a space after.

Roger that! (I'm working with a copy from your first post, so it's ok)

Don't despair Fred; this definitely comes out in current releases' batch.

BookSynopsisTemplate_v0-1-0_PRE.png

We're almost there!
My name's Victor but do feel free to call me Vic!

Support with your DonationCredits!
❤️ Support on Patreon @ www.patreon.com/publicdomain
🎁 One-time Paypal @ www.paypal.com/paypalme/victorvls
Email/Paypal: publicdomainvicgmail.com
« Last Edit: October 21, 2019, 10:32 PM by publicdomain »

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Book synopsis template
« Reply #24 on: October 21, 2019, 10:28 PM »
Something like this is easily done using AsciiDoc.

Thanks for the suggestion, but at this stage I'll put some time into stuff I know something about. Had a quick look at it and opened the txt file you attached, but all I got in the viewer was thousands of black diamonds with question marks inside.   :-[


Weird. As far as I know AsciiDocFX stores everything in the UTF-8 character-set. Anyway, the following images is what I see when opening the attached documents.

bst_main.pngBook synopsis template
The main document (preview within the AsciiDocFX editor, including the automatically generated ToC).

bst_bio.pngBook synopsis template
The bio section (image is automatically scaled).

bst_works.pngBook synopsis template
The written works section (with a standard table, where the grid lines have been removed).

I can guarantee you that I spent more time writing the post than I did the document.

Oh, before I forget, right-click on the HTML button to generate a HTML version of the document you just created. Yes, that is all it takes.

bst_html_export.pngBook synopsis template
HTML export.

Well, it could be considered friendly if I also provided the generate HTML file. But as you can see there is in principle very little HTML formatting going on, the syntax from AsciiDoc isn't too difficult to read, even if you would not have a preview at hand. That is to say, in my eye it doesn't.

Because it is relatively simple, you can use pretty simple text manipulation tricks already built into whatever text-editor you prefer, to make quick changes in one or more files if so desired. And you don't have to worry so much about content becoming unreadable after 10 years or more, just because you have moved to a different version of Office. 
« Last Edit: October 21, 2019, 10:58 PM by Shades, Reason: More explaining to do... »