[FM Discuss] BookiPublisher lite

Michael McAndrew michaelmcandrew at thirdsectordesign.org
Thu Dec 15 23:46:00 PST 2011


Hey again,

A couple of very useful pointers from Adam helped me rip off some more code
from bookipublisher so it now rewrites the directory structure, and adds
CSS for current page, previous next links, and so on.  The PHP Simple HTML
DOM Parser that bookipublisher uses was really useful here.

We also improved the formatting (added our standard header) added some home
pages, page not founds, etc.

You can see the code at
https://github.com/michaelmcandrew/bookipublisherlite and the results here:
http://book.civicrm.org.

In case you are really interested, we have finally worked out the
relationship between our unruly wiki and our (ruly?) book and are working
on a book review and a transfer of useful info from the wiki to the book:
http://wiki.civicrm.org/confluence/display/CRM/2011+CiviCRM+user+and+administrator+guide+review.


One question that we have now is whether to go comment free a la
https://help.ubuntu.com/11.10/serverguide/C/index.html or with comments a
la http://php.net/manual/en/function.preg-replace.php, or something else?

Michael

On 15 December 2011 15:35, Anne Gentle <annegentle at gmail.com> wrote:

> Wow, really impressive work here, nicely done! Thanks for sharing your
> solution.
>
> Anne
>
> On Wed, Dec 14, 2011 at 7:07 AM, Michael McAndrew
> <michaelmcandrew at thirdsectordesign.org> wrote:
> > Hey there,
> >
> > At CiviCRM, we have been wanting to take more control over how our
> > Flossmanuals are published for a few reasons:
> >
> > we want to have them nicely templated and on a civicrm.org domain
> > we were having trouble with links getting broken on
> > en.flossmanuals.net/civicrm when that site underwent upgrades, etc.
> This
> > was especially painful for us because we have lots of people deep linking
> > into the book.  It seemed a bit unfair / impractical to put the burden
> on FM
> > to keep these working for us (each project has different URL needs and if
> > you multiply our needs by the number of projects on FM, it gets a little
> > unmanageable)
> > we want to show archived / old versions of manuals.
> >
> > I initially investigated installing bookipublisher to handle this, but
> Adam
> > told me it was overkill and I agreed :).  He said, start with
> >
> https://github.com/eseter/BookiPublisher/blob/master/plugins/getbookgears/worker.php
> ,
> > look at the my_get_bookfunction, which was good advice.
> >
> > I used that as the basis to write
> > https://github.com/michaelmcandrew/bookipublisherlite which is a simple
> > template and script that produces html formatted books.  It is designed
> to
> > handle CiviCRM's requirements for
> >
> > multiple books
> > multiple versions
> >
> > You basically configure a few variables at the top of the file and run:
> >
> > $ php publish.php user (to publish the user guide)
> >
> > or
> >
> > $ php publish.php developer (to publish the developer guide).
> >
> > You can see the preliminary results of the script here:
> >
> > http://book.civicrm.org/user/
> >
> > http://book.civicrm.org/developer/
> >
> > Which downloads the book ready to be displayed.
> >
> > Behind the scenes we have a directory structure that looks like this
> >
> > book
> >
> > current - symbolic link to a source file
> > archive
> >
> > 4th edition - symbolic link to a source file
> > 3rd edition - symbolic link to a source file
> > 2nd edition - symbolic link to a source file
> > 1st edition - symbolic link to a source file
> >
> > source
> >
> > all the actual downloads, e.g. book-en-2011.12.14-10.45.21
> >
> > another book
> >
> > same as above
> >
> > So after you have downloaded, you ln -s to the source directory as
> > appropriate and you are done.  There is some .htaccess magic that
> rewrites
> > the book/chapter to book/current/chapter which means most people just
> need
> > to bookmark book.civicrm.org/user but if you want to look at an old
> version
> > you can go to http://book.civicrm.org/user/archive/4th-edition-4.1/.
> And
> > super keen readers can look behind the scenes at
> > http://book.civicrm.org/user/source.
> >
> > Things we'd like to add now are:
> >
> > ability to add comments to each page
> > Link to LULU / download PDF / eBook
> > add the civicrm header bar (iframe?) at the top of the page
> > nice page not found that tells them that they should look in the archives
> >
> > Would be great to get feedback on this.  There is one problem that we
> need
> > to solve before we can start sending people here and that is that it
> > currently uses the ch005_the-codebase.html notation, but we need it to
> use
> > the introduction/codebase.html notation - adam and co. - do you have any
> > pointers on how I can fix that?
> >
> > Michael
> >
> > --
> > Michael McAndrew
> >
> > tel: 020 7183 5828
> > mob: 07817 802299
> >
> > Third Sector Design Ltd.
> > http://thirdsectordesign.org
> >
> >
> > _______________________________________________
> > Discuss mailing list
> > Discuss at lists.flossmanuals.net
> > http://lists.flossmanuals.net/listinfo.cgi/discuss-flossmanuals.net
> >
> _______________________________________________
> Discuss mailing list
> Discuss at lists.flossmanuals.net
> http://lists.flossmanuals.net/listinfo.cgi/discuss-flossmanuals.net
>



-- 
Michael McAndrew

tel: 020 7183 5828
mob: 07817 802299

Third Sector Design Ltd.
http://thirdsectordesign.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.flossmanuals.net/pipermail/discuss-flossmanuals.net/attachments/20111216/4ac11bc0/attachment.htm>


More information about the Discuss mailing list