Skip to content

Commit

Permalink
minor changes in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
digas99 committed Aug 23, 2022
1 parent 9fd431f commit 72c89e8
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
.heroku-rep
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ docker run -p 8000:8000 --name pacoua-api pacoua-api

---

(To run on a different port, change the value of the port on the left side (***8000***:8000) in the command above)
(To run on a different port, change the value of the port on the left side (***8000***:8000) in the command above. The port on the right ride (8000:***8000***) has to always match the port in the file static.js)

### Setup the server locally manually:

Expand Down Expand Up @@ -115,7 +115,7 @@ If everything is correct, this should be the response:
...
},
"school_year": "2021/2022",
"semester": "1"
"semester": 1
},
"url": "https://paco.ua.pt/secvirtual/horarios/c_horario_aluno.asp",
"title": "Horário",
Expand Down
10 changes: 5 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ RESPONSE: 5s 🟡
...
},
"school_year": "2021/2022",
"semester": "1"
"semester": 1
},
"url": "https://paco.ua.pt/secvirtual/horarios/c_horario_aluno.asp",
"title": "Horário",
Expand Down Expand Up @@ -941,7 +941,7 @@ RESPONSE: 4.5s 🟢
},
"start": "12h",
"duration": "1,5h",
"capacity": "101",
"capacity": 101,
"room": "ANF. IV"
},
{
Expand All @@ -951,7 +951,7 @@ RESPONSE: 4.5s 🟢
},
"start": "14,5h",
"duration": "2h",
"capacity": "18",
"capacity": 18,
"room": "04.2.16"
},
...
Expand All @@ -965,14 +965,14 @@ RESPONSE: 4.5s 🟢
},
"start": "14h",
"duration": "2h",
"capacity": "19",
"capacity": 19,
"room": "04.3.30"
}
],
...
},
"school_year": "2021/2022",
"semester": "2"
"semester": 2
},
"url": "https://paco.ua.pt/secvirtual/horarios/desenho_horario.asp?tipo=1&value=-210320212",
"title": "Horário de REDES DE COMUNICAÇÕES II",
Expand Down
6 changes: 6 additions & 0 deletions docs/paco-ua-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ components:
started_date:
type: string
description: Date of initiation of the subject
recurso:
type: string
description: Date of the "Recurso" Season
especial:
type: string
description: Date of the "Especial" Season
SubjectHistory:
type: object
properties:
Expand Down
2 changes: 1 addition & 1 deletion routes/schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const setup = {
* type: string
* description: School year in the schedule
* semester:
* type: string
* type: integer
* description: Semester in the schedule
*/

Expand Down
4 changes: 2 additions & 2 deletions scrapers.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,13 @@ module.exports = {
if (scheduleInfoElem.childNodes.length == 1) {
const scheduleInfo = scheduleInfoElem.childNodes[0].wholeText;
data["school_year"] = scheduleInfo.split(" - ")[3],
data["semester"] = scheduleInfo.split(" - ")[2].split("º")[0];
data["semester"] = Number(scheduleInfo.split(" - ")[2].split("º")[0]);
}
// student schedule
else {
const scheduleInfo = scheduleInfoElem.childNodes[2].wholeText;
data["school_year"] = scheduleInfo.split(" - ")[1].split("AnoLectivo: ")[1];
data["semester"] = scheduleInfo.split(" - ")[2].split("º")[0];
data["semester"] = Number(scheduleInfo.split(" - ")[2].split("º")[0]);
}

// subjects
Expand Down

0 comments on commit 72c89e8

Please sign in to comment.