
- Fixed Sabbath School parser to handle API data with extra line breaks - Cleaned up project structure and removed nested directories - Organized output to single directory structure - Removed YouTube link from contact section for cleaner layout - Improved parser robustness for multi-line content between labels - Added proper .gitignore for Rust project
20 lines
540 B
Bash
20 lines
540 B
Bash
#!/bin/bash
|
|
|
|
BULLETIN_DIR="/opt/rtsda/church-api/uploads/bulletins"
|
|
PRINTER="Brother_MFC_L8900CDW"
|
|
|
|
# Find the most recent PDF file by modification time
|
|
LATEST_BULLETIN=$(ls -t "$BULLETIN_DIR"/*.pdf 2>/dev/null | head -n1)
|
|
|
|
if [ -n "$LATEST_BULLETIN" ]; then
|
|
echo "Printing: $LATEST_BULLETIN"
|
|
lp -d "$PRINTER" \
|
|
-o 20 \
|
|
-o PageSize=Letter \
|
|
-o Duplex=DuplexTumble \
|
|
-o ColorModel=RGB \
|
|
"$LATEST_BULLETIN"
|
|
echo "Print job sent successfully"
|
|
else
|
|
echo "No bulletin found in $BULLETIN_DIR"
|
|
fi |