Saturday, December 23, 2017

RaspberryPints Screen Uploader

Raspberrypints Image
After setting up my RaspberryPints server, I wanted to share the page with everyone.  Not wanting to give away the details of the server or exposing an unhardened device to the Internet, I decided to post an image of the tap list.

The process included the following:
  • Taking a screenshot using a Cron job
  • Create a DropBox Account
  • Uploading screenshot to DropBox using DropBox Uploader
  • Exposing the DropBox image as a public image

Take Screen Shots

Scrot (SCReenshOT) is an open source, powerful and flexible, command line utility for taking screen shots of your Desktop, Terminal or a Specific Window manually or automatically by Cron job. Scrot is similar to Linux ‘import‘ command, but uses ‘imlib2‘ library to capture and save images. It supports multiple image formats (JPG, PNG, GIF, etc), which you can specify while taking screen shots by using the tool.

Login as Pi

login using the the pi user perform the following

Install Scrot

sudo apt-get install scrot
sudo mkdir /screenshots

Modify the scot command

Modify the scort.sh file to provide a consistent filename.  This will allow the use of a single file name in your blog.  Using the nano editor type the following:
sudo nano /screenshots/scrot.sh
Now we will change the following line from being a dynamic filename to a constant filename.  The following line is changed from
DISPLAY=:0 scrot 'tecmint-%Y-%m-%d-%H_%M.jpg' -q 20 && mv /screenshots/*.jpg /media/tecmint
to
DISPLAY=:0 scrot 'raspberryPints.jpg' -q 20

Modify file permission

sudo chmod u+x /screenshots/scrot.sh

Create the Cron Job for every 60 minutes

crontab -e
0 * * * * /path/to/home/scrot.sh
Ctrl+X to exit and save
sudo /etc/init.d/cron start

Create a DropBox Account

Generate Access Token
Created Drop Box Account
<!*** goodloe.jason@gmail.com ***>

Head to https://www.dropbox.com/developers/apps to create a new Dropbox App

Generate Access Token

Uploading screenshot to DropBox using DropBox Uploader

http://raspberrypituts.com/dropbox-uploader-in-python/
git clone https://github.com/andreafabrizi/Dropbox-Uploader.git
cd Dropbox-Uploader
chmod +x dropbox_uploader.sh
./dropbox_uploader.sh
The first time you run dropbox_uploader, you'll be guided through a wizard in order to configure access to your Dropbox. This configuration will be stored in ~/.dropbox_uploader.

DropBox Upload Cron Job

(using pi@raspberryPINTS)
crontab -e
Add the following two lines to the file and save
0 * * * * /screenshots/scrot.sh | logger
0 * * * * /Dropbox-Uploader/dropbox_uploader.sh upload /home/pi/raspberrypintsscreen.jpg raspberrypintsscreen.jpg | logger

Exposing the DropBox image as a public image

Share DropBox image
Select the image in Dropbox.  Click the share button, and the following dialog will appear.  
Select copy link.
The link provided by DropBox is for a page.  This needs to be modified to the image.  The following is the link from DropBox
https://www.dropbox.com/s/bucohgzq1adquu2/raspberrypintsscreen.jpg?dl=0
modify the www.dropbox to dl.dropbox
https://dl.dropbox.com/s/bucohgzq1adquu2/raspberrypintsscreen.jpg
This image can now be shared.  My results for this page can be seen at the "On Tap" menu link.
*****************

Note: Instead of modifying the files in my initial implementation, I renamed the files and used the following:
  • screenshots/scrotsamename.sh
  • 0 * * * * /screenshots/scrotsamename.sh | logger
  • 0 * * * * /Dropbox-Uploader/dropbox_uploader.sh upload /home/pi/raspberrypintsscreen.jpg raspberrypintsscreen.jpg | logger
Note: The additional applications are found in the root folder under
  • /Dropbox-Uploader
  • /screenshots

Tuesday, December 12, 2017

#160 Patersbier ( Father’s Beer)

patersbier
“Patersbier” The beer made exclusively for monks by monks. The “father’s beer” is named for the monks who consumed it.  Patersbier is the monk's pale table brew is blonde session ale that clocks in around 6 percent.  

Stan Hieronymus (author of Brew Like a Monk) and Kristen England (BJCP Continuing Education Director) recipe for on of the rarest beers in the world, brewed in the Belgian town Malle solely for consumption by the reverent Cistercian brothers.

Water

AmtName
7.4 galFairfax County Water
0.25Camdenn Tablet
Fermentables

6.0 lbsPilsen Liquid

0.5 lbsCaraPils
Hop Schedule

0.50 ozSaaz - Boil 60 min5.3
0.50 ozTradition - Boil 60 min8.0
0.50 ozSaaz - Boil 10 min1.9
Yeast
1.0 pkgWyeast 3787 Trappist High Gravity  (Check this)


The next brew I would consider using the a recipe similar Trillium:
  • Pilsner
  • Flaked Wheat
  • Hallertau Magnum
  • Spalter
  • Hallertau Mittelfruh

linkwithin_site_id 2127225

Related Posts Plugin...