-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunhelp
More file actions
executable file
·68 lines (53 loc) · 1.69 KB
/
Copy pathrunhelp
File metadata and controls
executable file
·68 lines (53 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$ROOT_DIR"
source "$ROOT_DIR/.runlib.sh"
cat <<'EOF'
Summarizer quick commands
Interactive menu:
./summarizer
First run:
./runpdf and ./runyoutube create .venv and install base dependencies
automatically if needed.
Only manual step:
add your Gemini API key in .env
PDF:
./runpdf "input/pdf/mon-livre.pdf"
./runpdf "input/pdf/mon-livre.pdf" --engine smart --overwrite
./runpdf "input/pdf/mon-livre.pdf" --max-pages 10 --overwrite
./runpdf --setup-engines
macOS OCR tools:
brew install ocrmypdf
Installs OCRmyPDF system dependencies like tesseract, ghostscript and qpdf.
YouTube:
./runyoutube "https://youtube.com/watch?v=..."
./runyoutube "https://youtube.com/playlist?list=..." --resume
./runyoutube "https://youtube.com/playlist?list=..." --limit 2 --dry-run
./runyoutube --file input/youtube/urls.txt
Cleanup:
python3.11 -m src.cli cleanup --cache
python3.11 -m src.cli cleanup --all-temp
Outputs:
output/videos/
output/books/
output/graphipy_ready/
EOF
echo
echo "Setup status:"
print_runtime_status
echo
echo "PDF engines:"
print_pdf_engine_status
echo
echo "Detected local inputs:"
PDF_COUNT="$(find input/pdf -maxdepth 1 -type f -name "*.pdf" | wc -l | tr -d ' ')"
echo " PDFs in input/pdf/: $PDF_COUNT"
if [[ "$PDF_COUNT" != "0" ]]; then
find input/pdf -maxdepth 1 -type f -name "*.pdf" -print | sort | sed 's/^/ - /'
fi
if [[ -f input/youtube/urls.txt ]] && grep -Ev '^[[:space:]]*(#|$)' input/youtube/urls.txt >/dev/null; then
echo " YouTube batch: input/youtube/urls.txt is ready"
else
echo " YouTube batch: input/youtube/urls.txt is empty or missing"
fi