Life In 19x19 http://prod.lifein19x19.com/ |
|
Shape UP! Conversion to gobook format http://prod.lifein19x19.com/viewtopic.php?f=17&t=11402 |
Page 1 of 2 |
Author: | oca [ Tue Jan 27, 2015 3:10 am ] |
Post subject: | Shape UP! Conversion to gobook format |
[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 ![]() 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: ::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: ::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 |
Author: | oca [ Tue Jan 27, 2015 9:55 am ] | ||
Post subject: | Re: Shape UP! Conversion to gobook format | ||
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).
|
Author: | oca [ Tue Jan 27, 2015 10:09 am ] |
Post subject: | Re: Shape UP! Conversion to gobook format |
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: ::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: ::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' |
Author: | oca [ Thu Jan 29, 2015 1:03 pm ] |
Post subject: | Re: Shape UP! Conversion to gobook format |
I just completed Chapter One ! |
Author: | oca [ Sat Jan 31, 2015 5:36 am ] |
Post subject: | Re: Shape UP! Conversion to gobook format |
Author: | oca [ Wed Feb 04, 2015 2:43 pm ] | ||
Post subject: | Re: Shape UP! Conversion to gobook format | ||
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.
|
Author: | Bonobo [ Wed Feb 04, 2015 4:57 pm ] |
Post subject: | Re: Shape UP! Conversion to gobook format |
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 |
Author: | oca [ Thu Feb 05, 2015 4:48 am ] |
Post subject: | Re: Shape UP! Conversion to gobook format |
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 |
Author: | oca [ Tue Feb 10, 2015 12:26 pm ] |
Post subject: | Re: Shape UP! Conversion to gobook format |
Chapter 5.5, converting this one is annoying as I can't draw lines that don't starts or ends between points... Any better idea welcome ![]() |
Author: | Drew [ Tue Feb 10, 2015 5:44 pm ] |
Post subject: | Re: Shape UP! Conversion to gobook format |
oca wrote: Any better idea welcome ![]() Expand the gobook format to support images. The proposed solution is vastly inferior to the original diagram. |
Author: | foe [ Tue Feb 10, 2015 9:01 pm ] |
Post subject: | Re: Shape UP! Conversion to gobook format |
The format already supports images. Quote: 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. |
Author: | oca [ Wed Feb 11, 2015 12:54 am ] |
Post subject: | Re: Shape UP! Conversion to gobook format |
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. |
Author: | oca [ Thu Feb 12, 2015 12:41 pm ] |
Post subject: | Re: Shape UP! Conversion to gobook format |
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 ![]() |
Author: | Bonobo [ Thu Feb 12, 2015 5:41 pm ] |
Post subject: | Re: Shape UP! Conversion to gobook format |
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 ![]() |
Author: | oca [ Fri Feb 13, 2015 9:35 am ] |
Post subject: | Re: Shape UP! Conversion to gobook format |
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 ... |
Author: | foe [ Sat Feb 14, 2015 10:06 am ] |
Post subject: | Re: Shape UP! Conversion to gobook format |
That editor looks great! I've been doing it all from vim and found it a bit tedious to set up the stones by coordinates. I should see if this works better for me. Thanks for the video! |
Author: | oca [ Sat Feb 14, 2015 11:40 pm ] |
Post subject: | Re: Shape UP! Conversion to gobook format |
foe wrote: That editor looks great! I've been doing it all from vim and found it a bit tedious to set up the stones by coordinates. I should see if this works better for me. Thanks for the video! Thanks, feel free to create your own account if you wish (PS : I just saw there where a bug in the account page... I fixed it so that you should be able to create your own account now if you wish) |
Author: | oca [ Sun Feb 15, 2015 2:57 am ] |
Post subject: | Re: Shape UP! Conversion to gobook format |
Part 3 - How to add a diagram Well, this is really the fun part is it ![]() Basicly the '::go' tags let you enter some preplaced stones, and a sequence of moves. let's see an example : Code: ::go ab=D4 aw=F3 mv="H3 C3" The "ab" properties, like in the sgf format, is for black pre-placed stones, "aw" is for white pre-placed stones, and "mv" is a sequence of moves. in this case H3 is a black move, and C3 is a white moves. so if your whole book looks like that : Code: ::book ::go ab=D4 aw=F3 mv="H3 C3" You should see... nothing... that's because the '::go' doesn't render anything... it just setup a kind of game state... to see something, we need to add another tag.. either '::fig' or '::dia', but let's use '::fig' here Code: ::book ::go ab=D4 aw=F3 mv="H3 C3" ::fig at=1 to=end That should now render like that : More to come soon... |
Author: | oca [ Mon Feb 16, 2015 4:26 am ] |
Post subject: | Re: Shape UP! Conversion to gobook format |
You can can choose the part that is displayed using the "vw" (VieW) attribute, so adding "vw=A1K10" will clip the goban like this : In the previous example, we used 'at' and 'to' to choose the moves that are displayed, which is a good way to split a game by 10 moves for example. You van also specify 'at', and then place a sequence with 'mv', that will start at the specified position, like this : Code: ::fig ca="Using 'at' and 'mv'" vw=A1K10 at=end mv=D3C4D5D2E2C2E3C6 I just put an online a quick 'sandbox' editor that doesn't requier a login, so you can give it a try here : Attachment: capture.jpg [ 14.22 KiB | Viewed 17725 times ] http://www.gocdf.ch/gobook/learn/diagram-1.html You can try for example to change the 'view' and replace the current view 'A1L8' by 'A1K10'. there are a few shortcut for that : for bottom/left corner, try : vw=1[TAB] 1 is the bottom/left key on the numeric keypad... you can try 9[TAB] to have the top/right corner, or 7 or 3 for the 2 other corners. |
Author: | Claint [ Wed Feb 18, 2015 4:43 am ] |
Post subject: | Re: Shape UP! Conversion to gobook format |
I don't want to rain on your parade here but even though "Shape Up" is known to be a free book, it is not actually free for distribution and is copyrighted. I had to register a gobase account to read the book some years ago, so I remember. Searching the forums here, Charles Matthews confirms this on here: http://www.lifein19x19.com/forum/viewtopic.php?f=11&t=5825&start=22 Therefore, you need to contact Charles Matthews and get his approval as well. I hope the project continues regardless, since I do want a "free" (as in freedom) smartgobook reader. I don't know how you are going the licence the software though. |
Page 1 of 2 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |