Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A watch script #92

Open
Da1sypetals opened this issue Dec 10, 2024 · 1 comment
Open

A watch script #92

Da1sypetals opened this issue Dec 10, 2024 · 1 comment

Comments

@Da1sypetals
Copy link

Da1sypetals commented Dec 10, 2024

Wrote a watch bash script.
Hope it will be helpful to somebody ❤️
Note that this is kind of CPU eager.

watch.sh

#!/bin/bash

# ANSI color codes
RED='\033[0;31m'
NC='\033[0m' # No Color

while true
do
    # Get the current time
    TIME=$(date +"%Y-%m-%d %H:%M:%S")
    
    # Execute shiroa build
    if shiroa build >/dev/null 2>&1; then
        echo "[shiroa watch @ ($TIME)] - Build Successful"
    else
        echo -e "${RED}[shiroa watch @ ($TIME)] - Build Failed${NC}"
    fi

    # Wait 1 seconds before the next iteration
    sleep 1
done
@Myriad-Dreamin
Copy link
Owner

I guess you should write and preview your book document by existing editor integrations instead of relying on some shiroa watch. Please check https://github.com/Myriad-Dreamin/shiroa?tab=readme-ov-file#setup-for-writing-your-book.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants