redhataccess / ascii_binder

AsciiBinder is an AsciiDoc-based system for authoring and publishing closely related documentation sets from a single source.
https://asciibinder.net
MIT License
76 stars 39 forks source link

Support for building a specific topic group or book (top-level topic group) #173

Open gabriel-rh opened 2 years ago

gabriel-rh commented 2 years ago

At the moment, asciibinder builds all topic maps that exist in the _topic_maps folder (depending on the distros chosen)

Alternatively, you can use the --page option to build a single page, which hugely reduces build resources

However, if you edit many modules in a PR, then the --page option is harder to use and requires working backwards up the tree to figure out what pages have changed and requires creating multiple page builds.

It would be good to be able to build a specific book (top-level topic group), so that you don't have to end up building lots of individual pages, while at the same time avoiding the >>2GB full preview build.

Most books are <25MB, so just building a single book could require 1/100th of the resources versus a full preview.

Book sizes:

$ du -sh ./_preview/openshift-enterprise/main/* | sort -h

40K ./_preview/openshift-enterprise/main/_javascripts
288K    ./_preview/openshift-enterprise/main/_stylesheets
964K    ./_preview/openshift-enterprise/main/release_notes
1.3M    ./_preview/openshift-enterprise/main/_images
3.9M    ./_preview/openshift-enterprise/main/hardware_enablement
4.3M    ./_preview/openshift-enterprise/main/welcome
6.7M    ./_preview/openshift-enterprise/main/sandboxed_containers
6.9M    ./_preview/openshift-enterprise/main/distr_tracing
8.0M    ./_preview/openshift-enterprise/main/getting_started
8.5M    ./_preview/openshift-enterprise/main/architecture
9.8M    ./_preview/openshift-enterprise/main/updating
10M ./_preview/openshift-enterprise/main/web_console
11M ./_preview/openshift-enterprise/main/migration_toolkit_for_containers
11M ./_preview/openshift-enterprise/main/monitoring
11M ./_preview/openshift-enterprise/main/registry
12M ./_preview/openshift-enterprise/main/post_installation_configuration
12M ./_preview/openshift-enterprise/main/windows_containers
13M ./_preview/openshift-enterprise/main/migrating_from_ocp_3_to_4
19M ./_preview/openshift-enterprise/main/backup_and_restore
19M ./_preview/openshift-enterprise/main/openshift_images
20M ./_preview/openshift-enterprise/main/scalability_and_performance
22M ./_preview/openshift-enterprise/main/machine_management
23M ./_preview/openshift-enterprise/main/cli_reference
24M ./_preview/openshift-enterprise/main/support
27M ./_preview/openshift-enterprise/main/logging
31M ./_preview/openshift-enterprise/main/authentication
35M ./_preview/openshift-enterprise/main/storage
36M ./_preview/openshift-enterprise/main/applications
39M ./_preview/openshift-enterprise/main/service_mesh
45M ./_preview/openshift-enterprise/main/cicd
55M ./_preview/openshift-enterprise/main/nodes
58M ./_preview/openshift-enterprise/main/operators
60M ./_preview/openshift-enterprise/main/serverless
63M ./_preview/openshift-enterprise/main/security
105M    ./_preview/openshift-enterprise/main/networking
112M    ./_preview/openshift-enterprise/main/virt
139M    ./_preview/openshift-enterprise/main/installing
246M    ./_preview/openshift-enterprise/main/rest_api
rohennes commented 2 years ago

I have replicated the issue with my local asciibinder build. Using @gabriel-rh's container image with his updated version of asciibinder, I verified the fixes worked as expected.