Few web scrapers which print menu for the current week of Marche Soupson.
Simple one-liner using curl
, grep
and tr
:
$ soupson.sh
Monday: Root Vegetable Medley
Tuesday: Tomato, Kale and Lentil
Wednesday: Butternut Squash and Sweet Potato
Thursday: Green Vegetable Sou
Friday: Mushroom, Wild Rice and Leek
You need to have requests
and Beautiful soup
installed:
$ apt-get install python-requests
$ apt-get install python-bs4
The menu could be printed to the output:
$ python soupson.py
Monday: Beet and Fennel
Tuesday: Sweet Potato and Lentil
Wednesday: Classic Split Pea Soup
Thursday: Green Vegetable Medley
Friday: HARIRA!
or to the file by providing file name as an option:
$ python soupson.py menu
$ cat menu
Monday: Beet and Fennel
Tuesday: Sweet Potato and Lentil
Wednesday: Classic Split Pea Soup
Thursday: Green Vegetable Medley
Friday: HARIRA!
Install dependencies and then just run it:
$ npm install
$ node soupson.js
.-----------------------------------------.
| Weekly menu from October 3 to October 7 |
|-----------------------------------------|
| Monday | Beet and Fennel |
| Tuesday | Sweet Potato and Lentil |
| Wednesday | Classic Split Pea Soup |
| Thursday | Green Vegetable Medley |
| Friday | HARIRA! |
'-----------------------------------------'
$ gem install nokogiri
$ ruby soupson.rb
Monday: Beet and Squash
Tuesday: Sweet Potato and Red Lentil
Wednesday: Potato and Turnip
Thursday: Tomato, Lentil and Spinach
Friday: Green Vegetable Medley
One of these scripts could be easily used in conky widget:
...
${execpi 3600 TDY=`date '+%A'`; cat /home/usrnm/.conky/menu | sed s/$TDY/'${color 46B5D3}'"$TDY"'$color'/}
...