diff --git a/Web_Dashboard/app.py b/Web_Dashboard/app.py index 8594bb8..2a6d829 100644 --- a/Web_Dashboard/app.py +++ b/Web_Dashboard/app.py @@ -443,6 +443,10 @@ def ten(): return render_template('ten.html', smartphone=ten_smartphone, tablet=ten_tablet, laptop=ten_laptop) +@app.route('/rickroll') +def index(): + return render_template('rickroll.html') + if __name__ == '__main__': from waitress import serve - serve(app, host="0.0.0.0", port=1235) \ No newline at end of file + serve(app, host="0.0.0.0", port=1235) diff --git a/Web_Dashboard/js/redirect.js b/Web_Dashboard/js/redirect.js new file mode 100644 index 0000000..276d983 --- /dev/null +++ b/Web_Dashboard/js/redirect.js @@ -0,0 +1 @@ +setTimeout(() => { location.href = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"; }, 1000); diff --git a/Web_Dashboard/templates/index.html b/Web_Dashboard/templates/index.html index c40ec57..5c054f3 100644 --- a/Web_Dashboard/templates/index.html +++ b/Web_Dashboard/templates/index.html @@ -28,7 +28,7 @@
- iFixit Repairability Dashboard + iFixit Repairability Dashboard
diff --git a/Web_Dashboard/templates/rickroll.html b/Web_Dashboard/templates/rickroll.html new file mode 100644 index 0000000..0603759 --- /dev/null +++ b/Web_Dashboard/templates/rickroll.html @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + Rickrolled! +

Rickrolled!

+ + + diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..a61d3b7 --- /dev/null +++ b/readme.md @@ -0,0 +1,15 @@ +# iFixit-Repairability-Dashboard + +Pulls repairability scores for various devices from iFixit, which are then displayed on a website in a few categories. + +## What does each file do? + +The scraper.py file scrapes iFixit's webpages at https://www.ifixit.com/smartphone-repairability, https://www.ifixit.com/laptop-repairability, and https://www.ifixit.com/tablet-repairability. It then takes the html and parses it to find three fields for each device: Manufacturer, Device Model, and Repairability Score. The data for these three fields is then written to one of three csv files (laptop.csv, smartphone.csv, and tablet.csv) based on the device type. + +Once these files are stored, you can run Web_Dashboard/app.py, which starts a waitress server that serves webpages for each repairability score. The webpage templates are located in the Web_Dashboard/templates directory and the stylesheets are located in the Web_Dashboard/static directory. The webserver will be accessible at 0.0.0.0:1235. + +## Live Demo + +A live demo of this project is available at https://repairability.yeetpc.com + +Note: this project is neither sponsored by nor affiliated with iFixit.