Scripts to extract data from the Cornwall Council website.
To find your UPRN, visit the Cornwall Council website and identify your property. In the URL you should see your property reference number (likely 12 digit integer).
- php
Output is returned as JSON.
./tools/refuse-collection <property-reference-number>
{"recycling":{"next_collection":{"date_raw":"10 Feb"}}}
I am using this with Waybar to show the recyling date in my system tray. For example:
"custom/recycling": {
"exec": "~/cornwall-council/tools/refuse-collection 000000000000 | jq -r '.recycling.next_collection.date_raw' | awk '{print \"♻ \" $1 \" \" $2}'",
"interval": 86400
},