### Download to a specific directory Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-books.md Example of specifying a custom output directory for downloaded publications. ```bash jwb-books --category daily-text --output /path/to/downloads ``` -------------------------------- ### Download Daily Text in German Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-books.md Example of downloading the Daily Text publication in German. ```bash jwb-books --category daily-text --language X ``` -------------------------------- ### Run GolangCI-Lint Locally Source: https://github.com/darkace1998/jw-scripts/blob/master/CONTRIBUTING.md Execute the golangci-lint tool to check code quality according to the project's configuration. Ensure you have golangci-lint installed. ```bash golangci-lint run ``` -------------------------------- ### Download Bible in PDF format (English) Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-books.md Example of downloading the Bible in English using the PDF format. ```bash jwb-books --category bible --language E --format pdf ``` -------------------------------- ### Download convention materials in French Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-books.md Example of downloading convention materials in French, specifying PDF format. ```bash jwb-books --category convention --language F --format pdf ``` -------------------------------- ### Download yearbooks in Portuguese Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-books.md Example of downloading yearbooks in Brazilian Portuguese. ```bash jwb-books --category yearbooks --language T ``` -------------------------------- ### List categories available in Japanese Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-books.md Example of listing publication categories specifically for the Japanese language. ```bash jwb-books --list-categories --language J ``` -------------------------------- ### Search for publications containing 'daily' Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-books.md Example of searching for publications that include the word 'daily' and filtering by English language. ```bash jwb-books --search "daily" --language E ``` -------------------------------- ### Download Music Categories Every 12 Hours Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/docker.md Sets JW_COMMAND and CRON_SCHEDULE to download music categories every 12 hours. This example demonstrates specifying a different command and schedule. ```bash # Download music categories every 12 hours JW_COMMAND="jwb-music --download --lang E /data/music" CRON_SCHEDULE="0 */12 * * *" ``` -------------------------------- ### Show help Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-books.md Displays the help information for the jwb-books command. ```bash jwb-books --help ``` -------------------------------- ### Build JW Scripts from Source Source: https://github.com/darkace1998/jw-scripts/blob/master/README.md Download Go modules and build the JW Scripts CLI executables. The output binaries are placed in the 'bin/' directory. ```bash go mod download go build -o bin/ ./cmd/... ``` -------------------------------- ### List supported formats Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-books.md Lists all publication formats that can be downloaded. ```bash jwb-books --list-formats ``` -------------------------------- ### List available music categories Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-music.md Displays a list of all available music categories that can be downloaded. Use the '--list-categories' flag for this information. ```bash jwb-music --list-categories ``` -------------------------------- ### List available categories Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-books.md Lists all publication categories that can be downloaded. ```bash jwb-books --list-categories ``` -------------------------------- ### Run All Tests Source: https://github.com/darkace1998/jw-scripts/blob/master/CONTRIBUTING.md Execute all tests in the project with verbose output. This is a standard command for verifying code correctness. ```bash go test -v ./... ``` -------------------------------- ### Download music to a specific directory Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-music.md Specifies a custom directory for downloading music files. Replace '/path/to/music' with your desired destination. ```bash jwb-music /path/to/music ``` -------------------------------- ### Download Bible in Spanish (EPUB) Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-books.md Downloads the Bible publication in Spanish, using the EPUB format. ```bash jwb-books --category bible --language S --format epub ``` -------------------------------- ### Download all music files Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-music.md Executes the jwb-music tool to download all default music categories. This is the default behavior when no arguments are provided. ```bash jwb-music ``` -------------------------------- ### Run JW Scripts with Docker Source: https://github.com/darkace1998/jw-scripts/blob/master/README.md Build a Docker image for JW Scripts and run it with a specified cron schedule and JW command. Mounts a local directory for data persistence. ```bash docker build -t jw-scripts:latest . docker run --rm \ -e CRON_SCHEDULE="0 */6 * * *" \ -e JW_COMMAND="jwb-index --download --update --lang E /data" \ -v "$(pwd)/data:/data" \ jw-scripts:latest ``` -------------------------------- ### Cron Schedule Explanation Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/docker.md Explains the standard 5-field cron format used for scheduling tasks within the Docker container. Supports wildcards, specific values, and ranges. ```text * * * * * | | | | | | | | | +-- day of week (0-6, Sun=0) | | | +---- month (1-12) | | +------ day of month (1-31) | +-------- hour (0-23) +---------- minute (0-59) ``` -------------------------------- ### Download Daily Text in English (PDF) Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-books.md Downloads the Daily Text publication in English, using the PDF format. ```bash jwb-books --category daily-text --language E --format pdf ``` -------------------------------- ### Download with human-readable filenames Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-music.md Downloads music files and saves them with human-readable names. Uses the '-H' flag for this friendly naming convention. ```bash jwb-music -H ``` -------------------------------- ### Download All Music in English Source: https://github.com/darkace1998/jw-scripts/blob/master/README.md Uses the jwb-music command to download all available music categories in English. This is the default behavior when no categories are specified. ```bash ./bin/jwb-music ``` -------------------------------- ### Lint Go Code Source: https://github.com/darkace1998/jw-scripts/blob/master/README.md Runs the golangci-lint tool to perform static analysis and linting on the Go codebase. A timeout is specified to prevent excessive runtimes. ```bash golangci-lint run --timeout=5m ``` -------------------------------- ### List available language codes Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-music.md Displays a list of all valid language codes supported by the tool. Use the '-L' shorthand flag. ```bash jwb-music -L ``` -------------------------------- ### Download Kingdom Melodies in Spanish Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-music.md Downloads only the Kingdom Melodies category and filters the results for the Spanish language. Uses '-c' for category and '-l' for language code. ```bash jwb-music -c KingdomMelodies -l S ``` -------------------------------- ### Update existing collection with latest music Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-music.md Updates the existing music collection by downloading any new or updated music files. Uses the '--update' flag. ```bash jwb-music --update ``` -------------------------------- ### Download JW Broadcasting Media Source: https://github.com/darkace1998/jw-scripts/blob/master/README.md Uses the jwb-index command to download the latest 31-day window of JW Broadcasting media in Swedish. Ensure the binary is executable. ```bash ./bin/jwb-index --download --latest --lang S ``` -------------------------------- ### Download and keep 1GB free disk space Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-music.md Downloads music files while ensuring at least 1024 MiB of free disk space. Uses the '--free' flag followed by the desired space in MiB. ```bash jwb-music --free 1024 ``` -------------------------------- ### Create an M3U playlist without downloading Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-music.md Generates an M3U playlist file without downloading the actual media files. Uses '-d=false' to disable downloads and '-m m3u' to specify the output mode. ```bash jwb-music -d=false -m m3u ``` -------------------------------- ### Create and Push Git Tag for Release Source: https://github.com/darkace1998/jw-scripts/blob/master/CONTRIBUTING.md Create a new Git tag for a specific commit and push it to the remote repository. This action triggers the release workflow. ```bash git tag v1.0.0 git push origin v1.0.0 ``` -------------------------------- ### List supported languages Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-books.md Lists all language codes supported by jwb-books. ```bash jwb-books --list-languages ``` -------------------------------- ### Play Downloaded Local Videos Source: https://github.com/darkace1998/jw-scripts/blob/master/README.md Uses the jwb-offline command to play downloaded local videos from the specified directory, with shuffle and replay capabilities. ```bash ./bin/jwb-offline /path/to/downloaded/videos ``` -------------------------------- ### Build Docker Image Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/docker.md Builds the jw-scripts Docker image locally. This command is used to create the image from the Dockerfile in the current directory. ```bash docker build -t jw-scripts:latest . ``` -------------------------------- ### Generate JW Broadcasting Playlist Source: https://github.com/darkace1998/jw-scripts/blob/master/README.md Uses the jwb-index command to generate a playlist file in text format. ```bash ./bin/jwb-index --mode txt --output playlist.txt ``` -------------------------------- ### Download Kingdom Melodies only Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-music.md Downloads only the Kingdom Melodies category. Uses the '-c' flag to specify the desired category. ```bash jwb-music -c KingdomMelodies ``` -------------------------------- ### Update JW Broadcasting Videos Daily Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/docker.md Configures the JW_COMMAND and CRON_SCHEDULE to update JW Broadcasting videos daily at 03:30. Ensure the JW_COMMAND variable is set correctly for the desired action. ```bash # Update JW Broadcasting videos every day at 03:30 JW_COMMAND="jwb-index --download --update --lang E /data" CRON_SCHEDULE="30 3 * * *" ``` -------------------------------- ### List categories for a specific language Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-books.md Lists all available publication categories for a given language code. ```bash jwb-books --list-categories --language S ``` -------------------------------- ### Download Selected Music Categories Source: https://github.com/darkace1998/jw-scripts/blob/master/README.md Uses the jwb-music command to download specific music categories in Spanish. Specify desired categories using the --category flag. ```bash ./bin/jwb-music --lang S --category AudioOriginalSongs,SJJChorus ``` -------------------------------- ### Download JW Publication in PDF Source: https://github.com/darkace1998/jw-scripts/blob/master/README.md Uses the jwb-books command to download the 'daily-text' category in PDF format, saving it to the specified output directory. ```bash ./bin/jwb-books --category daily-text --language E --format pdf --output ./books ``` -------------------------------- ### Run Tests with Race Condition Detection Source: https://github.com/darkace1998/jw-scripts/blob/master/CONTRIBUTING.md Execute all tests while enabling the race detector to find potential race conditions. Use this for debugging concurrency issues. ```bash go test -v -race ./... ``` -------------------------------- ### Download JW Broadcasting monthly programs as MP3 Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-music.md Downloads only the JW Broadcasting monthly programs, formatted as MP3 audio files. Requires the '-c' flag to specify the category. ```bash jwb-music -c JWBroadcasting ``` -------------------------------- ### Download all music categories including JW Broadcasting Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-music.md Downloads all specified music categories, explicitly including JW Broadcasting programs along with other default categories. ```bash jwb-music -c AudioOriginalSongs,SJJMeetings,SJJChorus,SJJInstrumental,AudioChildrenSongs,KingdomMelodies,JWBroadcasting ``` -------------------------------- ### Download Daily Text PDFs Every Morning Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/docker.md Configures JW_COMMAND and CRON_SCHEDULE to download daily text PDFs every morning at 06:00. This snippet shows how to specify multiple arguments for the jwb-books command. ```bash # Download daily text PDFs every morning JW_COMMAND="jwb-books --category daily-text --language E --format pdf --output /data/books" CRON_SCHEDULE="0 6 * * *" ``` -------------------------------- ### Download children's songs in Spanish Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-music.md Downloads only the Children's Songs category and filters for the Spanish language. Uses '-c' for category and '-l' for language code. ```bash jwb-music -c AudioChildrenSongs -l S ``` -------------------------------- ### Pull JW Scripts Docker Image Source: https://github.com/darkace1998/jw-scripts/blob/master/README.md Pulls the latest prebuilt JW Scripts Docker image from GitHub Container Registry. ```bash docker pull ghcr.io/darkace1998/jw-scripts:latest ``` -------------------------------- ### List JW Publication Categories Source: https://github.com/darkace1998/jw-scripts/blob/master/README.md Uses the jwb-books command with the --list-categories flag to display available publication categories for the English language. ```bash ./bin/jwb-books --list-categories --language E ``` -------------------------------- ### Run Docker Container Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/docker.md Runs the jw-scripts Docker container, configuring cron schedule, JW command, and volume mounts. The --rm flag ensures the container is removed upon exit. ```bash docker run --rm \ -e CRON_SCHEDULE="0 */6 * * *" \ -e JW_COMMAND="jwb-index --download --update --lang E /data" \ -e RUN_ON_STARTUP=true \ -v "$(pwd)/data:/data" \ jw-scripts:latest ``` -------------------------------- ### Search for publications Source: https://github.com/darkace1998/jw-scripts/blob/master/docs/jwb-books.md Searches for publications containing a specific keyword, filtering by language. ```bash jwb-books --search "daily" --language F ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.