Working with Basil.js
Most of the complexity in working with Basil.js comes when trying to get your environment set up correctly. If you follow the instructions below VERY CAREFULLY, and I do mean very carefully, you should be alright. In addition to the many fun demos that come with the Basil.js download, I've prepared the following readymade example project for you (an illustrated Alphabet Book), which should help you get your own generative book started. It includes a template InDesign file (.indd), Basil.js code (.jsx), all necessary data (.json, .jpg), and a sample PDF output.
- We will be using Adobe InDesign CC2018, and Basil.js v.1.1.0, available at Github.
- Navigate to: https://github.com/basiljs/basil.js
- Click the green "Clone or download" button
- Locate the archive basil.js-master.zip in your Downloads directory
- Unzip this archive.
- Rename the resulting folder to: bundle
- The remaining instructions are copied from here. We follow those instructions from Step #2 on:
- Create a folder called basiljs (Note: no dot!) in the Documents folder of your home directory. Make sure that this folder matches USER_FOLDER/Documents/basiljs exactly.
- Place the bundle folder inside the basiljs folder.
- Create a folder called user next to the bundle folder. Use this user folder for your projects and experiments.
- You can download a complete zip of Golan's sample project here: AlphabetBook2018
- Unzip that demo archive, and put the folder so that it is located at basiljs/user/AlphabetBook2018/.
- Launch InDesign CC2018. Navigate the menu: Window > Utilities > Scripts to open the Scripts window.
- In the Scripts window, locate the demos: User > basiljs > bundle > scripts > examples > etcetera.
- To run a demo, double-click on the <demo>.jsx file, and be a little patient.
ALTERNATIVE: Doing Layout with Processing
If it's not working out with Basil.js for some reason, here's an automatic multi-page PDF generator in Processing: AlphabetBookJava2018