feat: Added all code for project
This commit is contained in:
commit
1fb3c45f97
31
PKGBUILD
Normal file
31
PKGBUILD
Normal file
@ -0,0 +1,31 @@
|
||||
# Maintainer: Nicholas Novak <nicholasmnovak@gmail.com>
|
||||
|
||||
pkgname=mpcli
|
||||
pkgver=r82.66ac237
|
||||
pkgrel=1
|
||||
pkgdesc="Marketplace CLI"
|
||||
arch=('any')
|
||||
makedepends=('git')
|
||||
provides=('mpcli')
|
||||
depends=('go')
|
||||
makedepends=('python-build' 'python-installer' 'python-wheel')
|
||||
url=""
|
||||
source=(
|
||||
"mpcli::git+ssh://git@git.nicholasnovak.io:/nnovak/mpcli.git"
|
||||
)
|
||||
md5sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/mpcli"
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/mpcli"
|
||||
python -m build --wheel --no-isolation
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/mpcli"
|
||||
python -m installer --destdir="$pkgdir" dist/*.whl
|
||||
}
|
35
scrape.py
Normal file
35
scrape.py
Normal file
@ -0,0 +1,35 @@
|
||||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
from datetime import date
|
||||
|
||||
from typing import List
|
||||
|
||||
base_url = "https://www.oxy.edu/student-life/campus-dining/where-eat/marketplace"
|
||||
|
||||
days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
|
||||
|
||||
|
||||
def print_day(day_name: str) -> None:
|
||||
resp = requests.get(base_url)
|
||||
|
||||
soup = BeautifulSoup(resp.content, "html.parser")
|
||||
|
||||
day = soup.find(id=day_name)
|
||||
|
||||
print(day.parent.text)
|
||||
|
||||
start = day.parent.parent.parent.find_next("p").find_next("p")
|
||||
|
||||
print("\nBreakfast\n")
|
||||
print(start.text)
|
||||
start = start.find_next("p")
|
||||
print("\nLunch\n")
|
||||
print(start.text)
|
||||
start = start.find_next("p")
|
||||
print("\nDinner\n")
|
||||
print(start.text)
|
||||
|
||||
|
||||
today = date.today()
|
||||
|
||||
print_day(days[today.weekday()])
|
Loading…
Reference in New Issue
Block a user