Shape UP! Conversion to gobook format

Don't know what book to read next? Have a killer reading list for improving joseki knowledge? This is this place.
User avatar
oca
Lives in gote
Posts: 699
Joined: Wed Feb 19, 2014 2:53 am
Rank: DDK
GD Posts: 0
KGS: aco
IGS: oca
OGS: oca
Location: Switzerland
Has thanked: 485 times
Been thanked: 166 times

Shape UP! Conversion to gobook format

Post 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
Last edited by oca on Fri Feb 20, 2015 10:33 am, edited 5 times in total.
Converting the book Shape UP! by Charles Matthews/Seong-June Kim
to the gobook format. last updated april 2015 - Index of shapes, p.211 / 216
User avatar
oca
Lives in gote
Posts: 699
Joined: Wed Feb 19, 2014 2:53 am
Rank: DDK
GD Posts: 0
KGS: aco
IGS: oca
OGS: oca
Location: Switzerland
Has thanked: 485 times
Been thanked: 166 times

Re: Shape UP! Conversion to gobook format

Post 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).
Attachments
shape_up_draft_intro.zip
(7.83 KiB) Downloaded 625 times
Converting the book Shape UP! by Charles Matthews/Seong-June Kim
to the gobook format. last updated april 2015 - Index of shapes, p.211 / 216
User avatar
oca
Lives in gote
Posts: 699
Joined: Wed Feb 19, 2014 2:53 am
Rank: DDK
GD Posts: 0
KGS: aco
IGS: oca
OGS: oca
Location: Switzerland
Has thanked: 485 times
Been thanked: 166 times

Re: Shape UP! Conversion to gobook format

Post 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'
Last edited by oca on Sun Feb 15, 2015 3:00 am, edited 1 time in total.
Converting the book Shape UP! by Charles Matthews/Seong-June Kim
to the gobook format. last updated april 2015 - Index of shapes, p.211 / 216
User avatar
oca
Lives in gote
Posts: 699
Joined: Wed Feb 19, 2014 2:53 am
Rank: DDK
GD Posts: 0
KGS: aco
IGS: oca
OGS: oca
Location: Switzerland
Has thanked: 485 times
Been thanked: 166 times

Re: Shape UP! Conversion to gobook format

Post by oca »

I just completed Chapter One !
Converting the book Shape UP! by Charles Matthews/Seong-June Kim
to the gobook format. last updated april 2015 - Index of shapes, p.211 / 216
User avatar
oca
Lives in gote
Posts: 699
Joined: Wed Feb 19, 2014 2:53 am
Rank: DDK
GD Posts: 0
KGS: aco
IGS: oca
OGS: oca
Location: Switzerland
Has thanked: 485 times
Been thanked: 166 times

Re: Shape UP! Conversion to gobook format

Post by oca »

Capture.PNG
Capture.PNG (308.52 KiB) Viewed 18437 times
Converting the book Shape UP! by Charles Matthews/Seong-June Kim
to the gobook format. last updated april 2015 - Index of shapes, p.211 / 216
User avatar
oca
Lives in gote
Posts: 699
Joined: Wed Feb 19, 2014 2:53 am
Rank: DDK
GD Posts: 0
KGS: aco
IGS: oca
OGS: oca
Location: Switzerland
Has thanked: 485 times
Been thanked: 166 times

Re: Shape UP! Conversion to gobook format

Post by oca »

Capture.PNG
Capture.PNG (307.22 KiB) Viewed 18342 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.
Attachments
[PART-ONE]Shape Up!.zip
(26.96 KiB) Downloaded 613 times
Last edited by oca on Sun Feb 15, 2015 3:00 am, edited 1 time in total.
Converting the book Shape UP! by Charles Matthews/Seong-June Kim
to the gobook format. last updated april 2015 - Index of shapes, p.211 / 216
User avatar
Bonobo
Oza
Posts: 2223
Joined: Fri Dec 23, 2011 6:39 pm
Rank: OGS 9k
GD Posts: 0
OGS: trohde
Universal go server handle: trohde
Location: Germany
Has thanked: 8262 times
Been thanked: 924 times
Contact:

Re: Shape UP! Conversion to gobook format

Post 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
“The only difference between me and a madman is that I’m not mad.” — Salvador Dali ★ Play a slooooow correspondence game with me on OGS? :)
User avatar
oca
Lives in gote
Posts: 699
Joined: Wed Feb 19, 2014 2:53 am
Rank: DDK
GD Posts: 0
KGS: aco
IGS: oca
OGS: oca
Location: Switzerland
Has thanked: 485 times
Been thanked: 166 times

Re: Shape UP! Conversion to gobook format

Post 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
Converting the book Shape UP! by Charles Matthews/Seong-June Kim
to the gobook format. last updated april 2015 - Index of shapes, p.211 / 216
User avatar
oca
Lives in gote
Posts: 699
Joined: Wed Feb 19, 2014 2:53 am
Rank: DDK
GD Posts: 0
KGS: aco
IGS: oca
OGS: oca
Location: Switzerland
Has thanked: 485 times
Been thanked: 166 times

Re: Shape UP! Conversion to gobook format

Post 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 18170 times


I suppose I will do something like that :

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

Any better idea welcome ;)
Last edited by oca on Sun Feb 15, 2015 3:01 am, edited 1 time in total.
Converting the book Shape UP! by Charles Matthews/Seong-June Kim
to the gobook format. last updated april 2015 - Index of shapes, p.211 / 216
User avatar
Drew
Lives in gote
Posts: 301
Joined: Thu Oct 17, 2013 12:59 am
Rank: infant
GD Posts: 0
Location: Illinois
Has thanked: 228 times
Been thanked: 84 times
Contact:

Re: Shape UP! Conversion to gobook format

Post 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.
foe
Dies in gote
Posts: 22
Joined: Tue Feb 25, 2014 11:08 pm
Rank: 8k
GD Posts: 0
KGS: foe
Has thanked: 7 times
Been thanked: 9 times

Re: Shape UP! Conversion to gobook format

Post 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.
User avatar
oca
Lives in gote
Posts: 699
Joined: Wed Feb 19, 2014 2:53 am
Rank: DDK
GD Posts: 0
KGS: aco
IGS: oca
OGS: oca
Location: Switzerland
Has thanked: 485 times
Been thanked: 166 times

Re: Shape UP! Conversion to gobook format

Post 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.
Converting the book Shape UP! by Charles Matthews/Seong-June Kim
to the gobook format. last updated april 2015 - Index of shapes, p.211 / 216
User avatar
oca
Lives in gote
Posts: 699
Joined: Wed Feb 19, 2014 2:53 am
Rank: DDK
GD Posts: 0
KGS: aco
IGS: oca
OGS: oca
Location: Switzerland
Has thanked: 485 times
Been thanked: 166 times

Re: Shape UP! Conversion to gobook format

Post 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]
Converting the book Shape UP! by Charles Matthews/Seong-June Kim
to the gobook format. last updated april 2015 - Index of shapes, p.211 / 216
User avatar
Bonobo
Oza
Posts: 2223
Joined: Fri Dec 23, 2011 6:39 pm
Rank: OGS 9k
GD Posts: 0
OGS: trohde
Universal go server handle: trohde
Location: Germany
Has thanked: 8262 times
Been thanked: 924 times
Contact:

Re: Shape UP! Conversion to gobook format

Post 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 ;-)
“The only difference between me and a madman is that I’m not mad.” — Salvador Dali ★ Play a slooooow correspondence game with me on OGS? :)
User avatar
oca
Lives in gote
Posts: 699
Joined: Wed Feb 19, 2014 2:53 am
Rank: DDK
GD Posts: 0
KGS: aco
IGS: oca
OGS: oca
Location: Switzerland
Has thanked: 485 times
Been thanked: 166 times

Re: Shape UP! Conversion to gobook format

Post 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 17969 times


Hello !
Converting the book Shape UP! by Charles Matthews/Seong-June Kim
to the gobook format. last updated april 2015 - Index of shapes, p.211 / 216
Post Reply