-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.bat
More file actions
107 lines (97 loc) · 2.54 KB
/
install.bat
File metadata and controls
107 lines (97 loc) · 2.54 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
@echo off
REM ArXiv Paper Collector - Installation Script for Windows
echo ==================================
echo ArXiv Paper Collector Installer
echo ==================================
echo.
REM Check Python
echo Checking Python installation...
python --version >nul 2>&1
if errorlevel 1 (
echo Error: Python is not installed
echo Please install Python 3.8 or higher from https://python.org
pause
exit /b 1
)
for /f "tokens=2" %%i in ('python --version') do set PYTHON_VERSION=%%i
echo Found Python %PYTHON_VERSION%
REM Check pip
echo.
echo Checking pip...
pip --version >nul 2>&1
if errorlevel 1 (
echo pip not found, attempting to install...
python -m ensurepip --upgrade
)
REM Check LaTeX
echo.
echo Checking LaTeX installation...
pdflatex --version >nul 2>&1
if errorlevel 1 (
xelatex --version >nul 2>&1
if errorlevel 1 (
echo Warning: LaTeX not found!
echo.
echo LaTeX is required for PDF generation.
echo Please install MiKTeX from https://miktex.org/download
echo.
set /p CONTINUE="Continue anyway? (y/N): "
if /i not "%CONTINUE%"=="y" exit /b 1
) else (
echo Found LaTeX (xelatex)
)
) else (
echo Found LaTeX (pdflatex)
)
REM Create virtual environment
echo.
set /p CREATE_VENV="Create virtual environment? (recommended) [Y/n]: "
if /i not "%CREATE_VENV%"=="n" (
if not exist "venv" (
echo Creating virtual environment...
python -m venv venv
)
echo Activating virtual environment...
call venv\Scripts\activate.bat
)
REM Install dependencies
echo.
echo Installing Python dependencies...
python -m pip install --upgrade pip --quiet
pip install -r requirements.txt
REM Create output directories
echo.
echo Creating output directories...
if not exist "output\papers" mkdir output\papers
if not exist "output\latex" mkdir output\latex
REM Test installation
echo.
echo Testing installation...
python main.py --help >nul 2>&1
if errorlevel 1 (
echo Warning: Installation test failed
) else (
echo Installation successful!
)
echo.
echo ==================================
echo Installation Complete!
echo ==================================
echo.
echo Usage:
if /i not "%CREATE_VENV%"=="n" (
echo 1. Activate virtual environment:
echo venv\Scripts\activate
)
echo 2. Run the collector:
echo python main.py --run
echo.
echo 3. Edit keywords:
echo python main.py --edit-keywords
echo.
echo 4. Start scheduled daemon:
echo python main.py --daemon
echo.
echo For more information, see README.md
echo.
pause