-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexport_history.bat
More file actions
47 lines (41 loc) · 1.47 KB
/
export_history.bat
File metadata and controls
47 lines (41 loc) · 1.47 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
@echo off
echo ===========================================
echo Git History Logbook Generator
echo ===========================================
echo.
REM Check if config file exists
if not exist "config.json" (
echo Error: config.json not found!
echo Please make sure the configuration file exists.
echo.
pause
exit /b 1
)
echo Exporting commit history from all repositories...
echo Including project information and author filtering...
echo.
REM Generate logbook with timestamp
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%"
set "timestamp=%YYYY%-%MM%-%DD%_%HH%-%Min%"
python git_history_logbook.py --config config.json --output "commit_logbook_%timestamp%" --csv "commits_%timestamp%.csv"
if %ERRORLEVEL% EQU 0 (
echo.
echo ===========================================
echo Export completed successfully!
echo ===========================================
echo.
echo Generated files:
dir /b commit_logbook_%timestamp%.*
dir /b commits_%timestamp%.csv
echo.
echo Open the HTML file in your browser to view the logbook.
) else (
echo.
echo ===========================================
echo Export failed!
echo ===========================================
echo.
)
pause