ICC CLI Usage Examples
ICC Search Client
Basic Usage
# Search for 2021 I-Codes (default behavior)
cli/codeproof.sh icc-search
# Search by specific category
cli/codeproof.sh icc-search --category "2021 I-Codes"
# Search with custom query
cli/codeproof.sh icc-search --search "Building Code" --page 1 --limit 10
# Get all books in a category
cli/codeproof.sh icc-search --category "2021 I-Codes" --all
# Get only document IDs and titles
cli/codeproof.sh icc-search --category "2021 I-Codes" --all --document-ids-only
Working with Files
# Save search results to a file
cli/codeproof.sh icc-search --category "2021 I-Codes" --all --save-to search-results.json
# Load and display search results from a file
cli/codeproof.sh icc-search --file search-results.json
# Load search results and show only document IDs
cli/codeproof.sh icc-search --file search-results.json --document-ids-only
ICC Book Fetcher
Basic Usage
# Fetch specific books by ID
cli/codeproof.sh icc-book-fetcher 3757 2217
# Fetch with custom pause settings
cli/codeproof.sh icc-book-fetcher 3757 2217 --min-pause 2000 --max-pause 4000
# Fetch with different filesystem handler
cli/codeproof.sh icc-book-fetcher 3757 --filesystem GCS
Using Search Results File
# First, create a search results file with all 2021 I-Codes
cli/codeproof.sh icc-search --category "2021 I-Codes" --all --save-to 2021-icodes-search.json
# Then fetch ALL books from the search results file
cli/codeproof.sh icc-book-fetcher --search-result-file 2021-icodes-search.json
# Fetch books from search results file with custom settings
cli/codeproof.sh icc-book-fetcher \
--search-result-file 2021-icodes-search.json \
--min-pause 1000 \
--max-pause 3000 \
--filesystem LOCAL
# Fetch books from search results file AND additional specific books
cli/codeproof.sh icc-book-fetcher \
--search-result-file 2021-icodes-search.json \
1156 3100
Advanced Workflows
Workflow 1: Discover and Fetch All Books in a Category
# Step 1: Search and save all books in 2021 I-Codes
cli/codeproof.sh icc-search \
--category "2021 I-Codes" \
--all \
--save-to 2021-icodes-complete.json
# Step 2: Review what will be fetched
cli/codeproof.sh icc-search \
--file 2021-icodes-complete.json \
--document-ids-only
# Step 3: Fetch all books with reasonable pauses
cli/codeproof.sh icc-book-fetcher \
--search-result-file 2021-icodes-complete.json \
--min-pause 3000 \
--max-pause 5000
Workflow 2: Selective Fetching
# Step 1: Get all available books
cli/codeproof.sh icc-search \
--category "2021 I-Codes" \
--all \
--document-ids-only
# Step 2: Create a custom search results file with only desired books
# (manually edit the JSON file to remove unwanted books)
# Step 3: Fetch only the selected books
cli/codeproof.sh icc-book-fetcher \
--search-result-file custom-selection.json
Available Book Categories
Common categories you can search for:
"2021 I-Codes"- All 2021 International Codes"2024 I-Codes"- All 2024 International Codes (if available)"2018 I-Codes"- All 2018 International Codes
Common Document IDs
Some frequently used ICC document IDs:
3757- IRC 2021 P3 (International Residential Code 2021)2217- IBC 2021 P2 (International Building Code 2021)3100- ICC A117.1 2017 P4 (Accessibility Standard)3815- FLBC 2023 P2 (Florida Building Code 2023)3123- NJBC 2021 P1 (New Jersey Building Code 2021)1156- ICC 300 2017 (Standard on Bleachers)
Help Commands
# Get help for search command
cli/codeproof.sh icc-search --help
# Get help for book fetcher command
cli/codeproof.sh icc-book-fetcher --help
# Get help for main CLI
cli/codeproof.sh --help