-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_venv.bat
60 lines (46 loc) · 1.27 KB
/
run_venv.bat
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
chcp 65001
:: Batch script to setup a virtual development environment
@echo off
:: Variables
set venv_folder=.\.venv
set script_name=main.py
if exist %venv_folder%\ (
echo Virtual environment already exists
echo.
goto activate
) else (
:: Creating virtual environment
echo Creating virtual environment
echo.
python -m venv "%venv_folder%"
call %venv_folder%\Scripts\activate.bat
:: Update pip
echo Updating pip in virtual environment
echo.
python.exe -m pip install --upgrade pip
echo Install requirements.txt in virtual environment
%venv_folder%\Scripts\pip install -r requirements.txt
)
:: Activating virtual environment
:activate
echo Activating virtual environment
echo.
call %venv_folder%\Scripts\activate.bat
:end
.\.venv\Scripts\python.exe "%script_name%"
del d:\Vovik\Docs\Public\finance_plot.html
copy plot.html d:\Vovik\Docs\Public\finance_plot.html
setlocal enabledelayedexpansion
if exist result.txt (
set /P result=<result.txt
echo "!result!" >> telega.log
call c:\Users\Vovik\Dropbox\Appl\Telega\postHour.bat "!result!"
)
d:
cd d:\Vovik\Docs\Public\
@Echo Äîáàâëÿåì èçìåíåíèÿ â ëîêàëüíûé git
git add --all
git commit -m "Automatic add finance_plot.html"
@Echo Îòñûëàåì èçìåíåíèÿ íà github
git push
timeout 5