Indiscipline

Mild achievements and severe disappointments

posted by Kirill on 2023-04-30

Catalay logo

This is yet another release post, this time for Catalay — a free software suite designed to automate the layout of image catalogues made with Adobe InDesign, using simple, declarative, human readable and editable configuration files in TOML or YAML formats as input. The main feature is not just automatically laying out the images in a grid, but adapting the grid layout itself. Catalay preserves the size relationship between different groups of items on each page are, scaling them appropriately, while utilizing the page as efficiently as possible given the constraints.

This time I’ll try to avoid rewriting a rather extensive Readme I’d prepared for Catalay just to fit it in a blog format. I’m going for a shorter version here, focusing on my musings. For more details on the program itself, please, address the repository.

Why was this made?

I’ve been interested in programming for most of my life and what I’ve come to realize, is that I’m clearly neither a “scientist” nor an “architect”. The only projects that I was motivated enough to eventually bring to light are things that I personally find useful. Catalay is one of such little projects.

It so happens that creating product catalogues is one of the tasks that I found myself coming back to. I’m a bit embarrassed to say that it only took me about ten occasions to finally rethink my initial assessment of the problem as being not worth automating due to complexity. The whole process is too nuanced and varying each time, so instead of conjuring up a monstrosity trying to do everything, why not focus on the most boring part?

For me it was reading the source spreadsheets and making a suitable layout for presenting all the items in them. Basically, you’re just converting data between two different representations. Isn’t it what computers are for?

What does it do?

Well, Catalay solves the task described above, or at least gets you 80% there.

Laying things out in a constant grid is trivial. The main feature of Catalay, however, is finding the optimal grid layouts for multiple distinctive groups of items, preserving their relative size ratios while filling as much space on the page as possible. Why is this useful? Most catalogues represent real world objects. Presenting them on a page in a way which relays more details of their appearance, such as their relative dimensions, helps the readers making better informed decisions and helps the sales people justifying their product and pricing policies.

Catalay is a combination of the main stand-alone program and the accompanying Adobe InDesign script - Catalay.jsx. The firs on processes the user-provided input files and calculates the best layouts for each page:

How Catalay works, stage 1: converting input configs into JSON.

When the calculation finishes, the program generates an HTML preview file for quick visual inspection, and outputs a JSON file, with all the specifics of the resulting layout in a script-friendly JSON format:

How Catalay works, stage 2: saving an html preview.

The main output JSON file is then used by the complimentary Catalay.jsx script from inside InDesign to finally assemble the catalogue:

How Catalay works, stage 3: compiling the finished catalogue.

Catalay can significantly reduce the time and effort required for creating complex image catalogues, freeing the users of routine labour and allowing them to focus on less tedious and more meaningful parts of their job. The resulting layouts are space-efficient, precise and ready for fine-tuning with all the layers and objects organized and labeled in InDesign.

Was it worth it?

Although Catalay is tailored for a specific use-case, it means that when it fits the task at hand, it’s most probably the only alternative to the unassisted drudgery of selecting, moving, resizing and aligning.

So, here’s another niche tool I’ve made. It’s not very likely to generate any significant interest to become a product, even though Catalay is designed to be useful in a work situation and was battle-tested by yours truly. It saved me some time, so it’s already a small success. If you happen to find Catalay useful, please do contact me just to say so. Or, if you’d rather, consider making a donation. Just sharing it with others is great too.


Catalay is released as Free Software because I believe it’s the only right thing to do with programs. The source code, more details and binaries are available at the program’s repository: Catalay at GitHub. The project is open for contributions.