Page 1 of 3

Shape UP! Conversion to gobook format

Posted: Tue Jan 27, 2015 3:10 am
by oca
[EDIT]

Introduction :

The book Shape UP is now licensed under "CC - SA" (http://creativecommons.org/licenses/by-sa/4.0/)
See viewtopic.php?f=9&t=11117 for details.


I decided to start the convertion of this book to the gobook format, which is a format that
can be viewed on iOS using the application "SmartGO Kifu"

I will update my signature to show the progression of this project.

Mini - Tutorial about the gobook format

Part 1 - Starting a new book - viewtopic.php?p=181374#p181374
Part 2 - The Table Of Content. - viewtopic.php?p=181397#p181397
Part 3 - How to add a diagram - viewtopic.php?p=182509#p182509


[/EDIT]

Hi,

I just started converting the book Shape UP! to the gobook format.
That gonna be a long adventure as I don't have that much free time... but anyway, that should be a pleasant trip :D

I also would like to post here a few information for whose who may be interested in the gobook format. so here we go...

Part 1 - Starting a new book

a gobook is a text file, that can be edited with any text editor.
the book must start with the text "::gobook" (well this is not 100% true, but let's start simple...). you can add attribute to set a title and the author, (and a few other stuff).

but let's look at an example :

Code: Select all

::book title="Shape Up!" author="Charles Matthews, Seong-June Kim"

::h1 #title#

::s1 by #author#



so that's not that far from html... tags starts with '::', h1 means 'big header' and according to the spec, is intended for the book title.

s1 is a section title. if I used h1 here for the author, like this :

Code: Select all

::book title="Shape Up!" author="Charles Matthews, Seong-June Kim"

::h1 #title#

::h1 by #author#



The authors would be on a second page, as h1 always start a new page...

to see your book, you need the smart go kifu application.
if you send your text by email (or dropbox), you can then open it with smart go kifu.

you may also give it a try here : http://www.gocdf.ch/gobook

I will now complete a first chapter and post a few more things soon

Re: Shape UP! Conversion to gobook format

Posted: Tue Jan 27, 2015 9:55 am
by oca
Hi just completed the introduction, I still need to double check, but you can allready have a quick look at the attached file (you have to unzip the file, attaching gobook file to a post is not allowed).

Re: Shape UP! Conversion to gobook format

Posted: Tue Jan 27, 2015 10:09 am
by oca
Part 2 - The Table Of Content.

This is how you do a table of content in the gobook format.

You first need to create a chapter, this is pretty easy to do as there is a chapter tag... :

Code: Select all


::chapter(#contents)



the # part is an id, which allows to make link between different parts of the book.
The table of content must have an id set to 'contents' so that the aplication knows that this is a 'special chapter'

Then you have to add the content of the toc, like this :

Code: Select all

::chapter(#contents)

::h2 Table of Contents

::p style="normal" **Introduction**

::p style="indent" href=Introduction Introduction: The scope of shape

::p style="normal" **Part One: Principles of Development**

::p style="indent" href=xxx Chapter 1: Table Shapes

::p style="indent" href=xxx Chapter 2: Shape Basics

::p style="indent" href=xxx Chapter 3: Close Range Play 1

...
...

::chapter(#xxx)

::h2 TODO ;)





According to the spec, the title to a chapter should be 'h2'
'::p' just means paragraph, you can make link to other sections of the book using the 'href' attribute.

for now, pretty much all the links goes to a dummy chapter with an id 'xxx'

Re: Shape UP! Conversion to gobook format

Posted: Thu Jan 29, 2015 1:03 pm
by oca
I just completed Chapter One !

Re: Shape UP! Conversion to gobook format

Posted: Sat Jan 31, 2015 5:36 am
by oca
Capture.PNG
Capture.PNG (308.52 KiB) Viewed 18439 times

Re: Shape UP! Conversion to gobook format

Posted: Wed Feb 04, 2015 2:43 pm
by oca
Capture.PNG
Capture.PNG (307.22 KiB) Viewed 18344 times

I still have a bit of cleaning to do, but most of the job is done for Part One.
You can download the zip file attached to this post if you want to give it a try.

Re: Shape UP! Conversion to gobook format

Posted: Wed Feb 04, 2015 4:57 pm
by Bonobo
I’ll wait for the final version, oca, and I’m looking forward to it :-)

BTW, have you thought of getting in contact with Anders Kierulf about this your project? I think you may be one of the first ones to start such a project on your own … he might welcome that since it uses his (Smart)Go Books platform and his gobook format (Anders also is the inventor of the SGF format, BTW) and may make it even more popular, and he even may have a few hints for you.

Cheers, Tom

Re: Shape UP! Conversion to gobook format

Posted: Thu Feb 05, 2015 4:48 am
by oca
Bonobo wrote:... BTW, have you thought of getting in contact with Anders Kierulf about this your project? ...


Hi Bonobo,

That's a good Idea, I just sent Anders an email to tell him about this project !
Cheers

Olivier

Re: Shape UP! Conversion to gobook format

Posted: Tue Feb 10, 2015 12:26 pm
by oca
Chapter 5.5, converting this one is annoying as I can't draw lines that don't starts or ends between points...
Capture.PNG
Capture.PNG (9.1 KiB) Viewed 18172 times


I suppose I will do something like that :

Capture2.PNG
Capture2.PNG (71.94 KiB) Viewed 18172 times

Any better idea welcome ;)

Re: Shape UP! Conversion to gobook format

Posted: Tue Feb 10, 2015 5:44 pm
by Drew
oca wrote:Any better idea welcome ;)


Expand the gobook format to support images. The proposed solution is vastly inferior to the original diagram.

Re: Shape UP! Conversion to gobook format

Posted: Tue Feb 10, 2015 9:01 pm
by foe
The format already supports images.

Image attributes
• url: The image to insert. This can be an http link to an external image, or just the file name of an image that’s included with the .gobk package. Default: The cover image of the book.
• scale: (floating-point number) Normally, the image will be drawn either at its natural size, or filling the width of the column, whichever is smaller. This would be the default (1.0). A smaller value of scale can be used to reduce the image size.
• ca: Caption (as mentioned above for diagrams).
• border: (0 | 1) Whether to draw a dark thin border around the image. Defaults to 1 for
jpg images, otherwise 0.
• shadow: (0 | 1) Whether to draw a shadow behind the image. Defaults to 1 for jpg images, otherwise 0.
• fill: (0 | 1) Whether to draw a dark fill color behind the image. Defaults to 0.

Re: Shape UP! Conversion to gobook format

Posted: Wed Feb 11, 2015 12:54 am
by oca
Thanks, I also think that using an image would be better (closer to the original), than my 'x/y' idea, so I will go that way.

Re: Shape UP! Conversion to gobook format

Posted: Thu Feb 12, 2015 12:41 pm
by oca
For whose who may be interested, here is a video of me converting page 72 so that you can see how I proceed for the convertion.

Flash : http://www.gocdf.ch/gobook/video/p72.html
Youtube : https://www.youtube.com/watch?v=OTO1xWJRBl0

[edit]oh.. just before someone tells me, I know that I still have to move the text ;) I should have included that part in the video...[/edit]

Re: Shape UP! Conversion to gobook format

Posted: Thu Feb 12, 2015 5:41 pm
by Bonobo
oca wrote:[..] a video of me converting page 72 [..]

What a disappointment — it is NOT a video of YOU converting that page, it’s only a video of that page being converted ;-)

Re: Shape UP! Conversion to gobook format

Posted: Fri Feb 13, 2015 9:35 am
by oca
Bonobo wrote:
oca wrote:[..] a video of me converting page 72 [..]

What a disappointment — it is NOT a video of YOU converting that page, it’s only a video of that page being converted ;-)


oh, true... so... this is me ...
OCA.PNG
OCA.PNG (379.57 KiB) Viewed 17971 times


Hello !