Skip to content

Commit

Permalink
Merge pull request #47 from titipata/fix-fetch-mins
Browse files Browse the repository at this point in the history
Function to fetch event from MINS, update data
  • Loading branch information
bluenex authored Sep 20, 2019
2 parents 1699f2c + 5163b96 commit d1c9a79
Show file tree
Hide file tree
Showing 10 changed files with 1,164 additions and 2,496 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Created by https://www.gitignore.io/api/macos,reactnative

# loaded data and notebooks
.vscode/
grobid-*/

### macOS ###
*.DS_Store
.AppleDouble
Expand Down
11 changes: 10 additions & 1 deletion backend/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# Flask back-end for Penn event

## Fetch events

`fetch_events.py` contains functions to fetch Penn events. We can run GROBID and fetch to update data in `data/events.json` file
as follows

```sh
bash serve_grobid.sh
python fetch_events.py
```

## Running CRON to fetch event daily

We use CRON to constantly fetch Penn events. Change `username` in `cron_fetch_events.py`
We use CRON to make `fetch_events.py` constantly fetch Penn events. Change `username` in `cron_fetch_events.py`
then run cron job by using the following script

```sh
Expand Down
1,075 changes: 0 additions & 1,075 deletions backend/data/events.csv

This file was deleted.

466 changes: 466 additions & 0 deletions backend/data/events.json

Large diffs are not rendered by default.

1,075 changes: 0 additions & 1,075 deletions backend/data/events_dt.csv

This file was deleted.

466 changes: 466 additions & 0 deletions backend/data/events_vector.json

Large diffs are not rendered by default.

270 changes: 0 additions & 270 deletions backend/events.json

This file was deleted.

282 changes: 207 additions & 75 deletions backend/fetch_events.py

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ lxml
spacy
requests
uwsgi
nltk
10 changes: 10 additions & 0 deletions backend/serve_grobid.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# download GROBID if directory does not exist
if [ ! -d grobid-0.5.5 ]; then
wget https://github.com/kermitt2/grobid/archive/0.5.5.zip
unzip 0.5.5.zip
rm 0.5.5.zip
fi

# run GROBID
cd grobid-0.5.5
./gradlew run

0 comments on commit d1c9a79

Please sign in to comment.