Skip to content

Commit

Permalink
Merge pull request #77 from NewWays-TechForImpactKAIST/feat-cron-scripts
Browse files Browse the repository at this point in the history
CRON잡 생성을 위한 bash 스크립트 작성
  • Loading branch information
keonly authored Dec 1, 2023
2 parents 15575aa + 5c99558 commit 6c377e9
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
```
3. 레포지토리 클론
- 아래 명령을 실행하여 레포지토리를 클론합니다.
```bash
git clone https://github.com/NewWays-TechForImpactKAIST/main
```
```bash
git clone https://github.com/NewWays-TechForImpactKAIST/API-scrap-and-analysis.git
```
4. 필요한 패키지 설치
- requirements.txt에 명시된 패키지를 설치합니다.
```bash
Expand Down
25 changes: 25 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

echo "Installing python virtual environment..."

cd ~ && virtualenv newways --python=3.10
source ~/newways/bin/activate
pip install -r ~/API-scrap-and-analysis/requirements.txt

echo "Python virtual environment has been installed successfully in ~/newways."
echo "Installing chromedriver..."

CHROMEDRIVER_URL="https://chromedriver.storage.googleapis.com/114.0.5735.90/chromedriver_linux64.zip"
TEMP_DIR="/tmp/chromedriver_download"

mkdir -p "$TEMP_DIR"
cd "$TEMP_DIR"

curl -O "$CHROMEDRIVER_URL"
unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/local/bin/

cd -
rm -rf "$TEMP_DIR"

echo "Chromedriver has been installed successfully."
10 changes: 10 additions & 0 deletions run_scrap_scripts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# 아래 설정에 맞게 세팅되어 있는지 확인하고 실행!!
cd ~/API-scrap-and-analysis
source ~/newways/bin/activate

python -m scrap.utils.runner -w local -m
python -m scrap.utils.runner -w metro -m

deactivate

0 comments on commit 6c377e9

Please sign in to comment.