Step 5: Run the Script

Now it's finally time to run the script.
Keep a ruler and the book at hand.

On the command line, go into the directory where the script is (for example, type 'cd /home/yourname/MyBookArtDirectory').
Call the script by entering 'php BookArtGenerator.php'.
Or, if you are running the virtual machine, double-click on the heart icon on the desktop.

The script will now ask some questions.
It will ask

  • for the number of the first even page of your book
  • for the number of the last even page of your book
  • for the height of your book pages (doesn't matter if the unit is cm or inch, only enter the numbers, decimal dot allowed)
  • for the name of the picture file (for this example: 'yourpicturefilename.png')

Then it will generate 3 files:

  • tempfile.png: This file is for internal use of the script and will be overwritten with every new pattern you make.
  • yourpicturefilename_preview.png: This is the preview for you to check that the script has worked as intended.
  • yourpicturefilename_pattern.txt: This is the pattern file. It contains the folds for every page - one upper fold and one lower fold.

The files will be saved to the directory where you put the script. On the virtual machine, this is the folder linked from the desktop (MyBookArt).
If you run the script again with a picture of the same name, the last two files will be overwritten, so copy them somewhere else or rename them if you want to keep them.

<p>Hi Moini, Been using your programme to make a few designs which have come out really well. I just wanted to know if theres a better way to do words i.e. a way to cheat the system. There are some fonts I want to use and can't as it says there are white gaps between the letters? Is there a way around this?</p>
<p>Okay, these are awesome! I love the superman one! I'm just discovering this type of art today, so I'm totally new to it, but I wondered did you design the Superman logo? Or can I just get one from online and upload it to the author's website for pattern? Once again, you did amazing!! </p>
James, I would looove if you could share the instructions for the Superman-logo! Want to surprise my boyfriend with it but I'm having a problem finding instructions. Mail me! nielsenlina@gmail.com <br><br>Take care!
Like :-D<br><br>Yes, there are three ways:<br>- in a pixel graphics program: cut out the letters and move them towards each other<br>- in a DTP program: reduce the letter distance (kerning...?)<br>- in a vector graphics program: turn the letters into paths and grab them and move them together.<br><br>You shouldn't modify the script for this, because this will leave you with ugly 'dark' (protruding) bars between the letters.
I've done all three of those and still can get the results i want, as i actually want the gaps between the letters.. <br> <br>Im now trying doing each individual letter through the programme.. but theres a lot more working out and im not 100% sure how to get them all excatly the same so they're lined up and still form a word ... Any further suggestions?
<p>I could imagine another 'trick' which would work without modifying the program:</p><p>You could lay a thin, horizontal black line across your pattern. In the folding instructions, you can distinguish that line from the other 'real' parts because it will always have the same folding measurements which are very close to each other. You could just do a 'search and substitute' on those lines in the instruction sheet, too, to mark them.</p>
<p>Eureka!! Your a genius, it works.. well in theory..!! I've ran my word through the program and I can clearly see the folds that relate to the line! Thank you so much this has just opened up a whole new way of folding for me.. The sky is the limit!! I'll be sure to post a pic up once its folded!! :) </p>
Made this for a friend's wedding. Thanks for the program!
<p>Your project turned out beautiful! Could you let me know what font you used, or how you made your image (also, which option you chose. Just as many tips that you can provide, please! ^-^)? I really want to make the same exact project, but with &quot;J&amp;M&quot; instead. I think the size of the '&amp;' as well as the letters are perfect.</p>
I did the art in photoshop, but have done it on pixlr editor in a pinch. I find you the font later today, when I dig up the file.
<p>This turned out very nice - I bet the guests and the couple loved it!</p>
They did! Lots of oohs and ahhs. It was a showstopper. It was displayed by the wedding cake. I'm now working on some for the mother and sister of the groom.
the scissor was for washi tape on the spine, to cover the title.
Just finished my project..thanks for the write up.
Now this looks like you had a relaxing time doing this ;) OMMMHHH...<br>Congrats!
Can you help me please? Can you teach me how i can do it. Which programs do i have to use. Please help me. Pilotfourever@gmail.com
<p>I followed moini's tutorial on how to use the computer program to generate the page numbers. Have you tried download and installing them as mentioned in the tutorial?</p>
I can't catch. How do i have to do? Do you have whatsapp? Or how we can connect please help me. It will be 5-10minutes
Can you teach me how i can do it. Which programs do i have to use. Please help me. I can learn quickly.<br>Pilotfourever@gmail.com<br>
<p>just some of the patterns I've been making with your awesome program :)</p>
<p>hi heathersharmony, i really love your books that you did with the paw prints. i am not that good with a computer and i don't understand how to make my own patterns. i really love the one with the work love and a dog paw in it. i was wondering if i could get that patteren. thanks</p>
<p>I just finished folding my first book (which surely won't be my last). Thank you for this fantastic piece of software (:</p>
<p>These are my two efforts made with your method! </p>
<p>what font is this please? thanks</p>
<p>Thank you for sharing your results! :-D</p>
<p>'Food' was my first attempt, the text is a little too tall though, I think 'Cook' is a better size!</p>
<p>These are some of the books I've folded using the program. Here are some tips I've found out the hard way:<br>1) Use a book with thicker paper. It really makes the letters/design stand out better.<br>2) When I make the books with words or letters, I have find that having at least 100 pages/50 sheets per letter is a minimum. The more the better.<br>3) When making your design in your graphics program (I use GIMP), be sure to leave space at the top and bottom of the design. Too little space makes for difficult folds close to the top and bottom of the pages. You can take the blank space from the left and right of the design. That will use more of your pages effectively.</p>
<p>Hi, how do you ensure the image is central? I have just created my first pattern and it is half way up the book! Any help would be appreciated </p>
<p>Here's a semi truck and a dachshund (that means badger hound in German in case you didn't know). </p>
<p>That's amazing. Love them! I'm trying to install the program to my laptop but it is not compatible... If it's not much to ask, I wonder if you can help me create a pattern for the word &quot;Mom&quot;. I want to give her a late gift for mother's day since I was studying abroad away from home. Thank you!</p>
<p>I agree with Moini. The purpose of the Instructable is to get the program successfully installed on your computer. I was one of the early Windows 7 guinea pigs and got it installed and working. I've got it on two Win7 systems using the first method. I found that looks easier than the virtual machine on Windows. Trust in Moini. </p>
What do you mean by 'not compatible'? The program should run on Windows, Mac OS and Linux in a virtual machine. Please describe your problem in more detail.<br><br>I'm sorry I can only give you help installing and running the software. I won't create the pattern for you - if I do, I would cause the 'dam' to breach - and I would have no excuses not to make patterns for everyone who asks. I just can't do that. I think you will understand.
<p>Wow - those turned out great! Which font did you use? (and who's Lollie... ? ;-) - no, don't answer that) Thanks for adding those tips! I think they will be very valuable to other folders.</p>
<p>The Lollie and Smith fonts are both Blenda. The Ivie is JandaManatee. I got them at www.dafont.com. The names are last names of family names. They make great gifts! <br><br>Another pun: my folding table is a folding table. :-)</p>
<p>Pun intended. Didn't know I could make puns in english....</p>
<p>finally, after one night folding I've done it!</p><p>Overall, it has been a great and fun learning experience, and as a bonus the outcome is outstandingly beautiful (.. is my second ever book folding, so my technique still has to be improved therefor the folds are not quite exact :-) )</p>
<p>How many &quot;sheets&quot; are in the book you used? That looks great!</p>
<p>Thank you !! </p><p>319 sheets (638 pages - 2 hours marking, about 3 hours folding)</p><p>I used only 297 sheets :-)</p><p>Hope to see yours soon ;-)</p>
<p>This is my second one using the script. This turned out much better because it was a book with more pages. I made this to remember our puppy who just passed away. </p>
<p>What caused the discoloration towards the middle of the book? Was it intentional?</p>
<p>It's only the shadow between the pages you look right on. If you look from another angle the location of the dark line will change.</p>
<p>Sweet!! keep up the good work!</p>
<p>This looks very, very good! Congrats and thank you for sharing!</p>
1940 Ford
<p>It even has a steering wheel ;-) </p>
Your program is awesome!! It makes pattern creating so much faster. My eyes thank you since I no longer have to erase lines of pixels :)
<p>These are footprints *happily recognizing things*... ;-)</p><p>If you have, and if you want to invest the time, they might even look better with more pages - and they might be bigger and with a higher resolution, if you remove the whitespace at the sides of the picture.</p>
<p>i was only able to do one word. after that, the program continuously tells me that my image is either all white or i have transparencies somewhere. i check, double check and recheck and the image is neither of those two...it also complies with all of the checks for what the image should include or not include...very frustrated...the first is the image i made and the second is the image i am trying to make and it wont let me...ive tried the same font i used for the first one and it still wouldnt work...maybe someone here can see something im not seeing?</p>
<p>Could you list all the things the image complies with, with their actual values? (instructables converts all uploaded pictures, so I cannot test with this pic. Here I can only see that there are a) not too many holes and b) no vertical gaps, which is good.</p><p>or else:</p><p>could you upload the pic you are trying to turn into bookpages art somewhere, where the file will not be changed? Then I could take a look myself.</p><p>And would you please supply me with the info which version of the script you use on which platform and how you installed it?</p><p>And, btw., are the fonts you used in the public domain? I saw your uploads on inkscape and was just about to write something about it being questionable if you may publish those words into the public domain. The law in the US is clear about this, there is no copyright for fonts, but in most other countries of the world, there is.</p><p>I always think &quot;better safe than sorry&quot; and wouldn't upload anything containing written text to openclipart anymore, unless the font is also public domain or at least a free font.</p>
<p>Thank you for your help on this. the image can be seen at <a href="https://www.facebook.com/photo.php?fbid=10202141250873032&set=a.1120830261227.2018583.1241188673&type=1&theater" rel="nofollow">https://www.facebook.com/photo.php?fbid=1020214125...</a></p><p>hopefully that link will work for you. as for the fonts...yes, its public domain. i keep thinking that there is something im not seeing in the pic. i even went as far as bringing the dot in the i down to touch the rest of the letter for fear there would error out due to the space between the dot and the i. i hope you can help. oh...i just installed this a couple of days ago. its the newest version with the extension pack and im running windows 8. not sure if that answers all of your questions or not. just let me know. thanks much!</p>

About This Instructable




More by Moini:Spring-in-a-Box How to make folded book art easier using your computer 
Add instructable to: