Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up spelling, wording and punctuation #93

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ CraftBeerPi 3.0 is a complete rewrite. Server as well as user interface. I recom

## Donation

CraftBeerPi is a free & open source project. If you like to support the project I happy about a donation:
CraftBeerPi is a free & open source project. If you would like to support the project I would be happy about a donation:

[![Donate](https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2X9KR98KJ8YZQ)
20 changes: 10 additions & 10 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ show_menu () {
if [ $BUTTON -eq 0 ]; then
case $OPTION in
1)
confirmAnswer "Would you like run apt-get update & apt-get upgrade?"
confirmAnswer "Would you like to run apt-get update & apt-get upgrade?"
if [ $? = 0 ]; then
apt-get -y update; apt-get -y upgrade;
fi

confirmAnswer "Would you like to install wiringPI? This is required to control the GPIO"
confirmAnswer "Would you like to install wiringPI? This is required to control the GPIO."
if [ $? = 0 ]; then
git clone git://git.drogon.net/wiringPi;
cd wiringPi;
Expand All @@ -48,7 +48,7 @@ show_menu () {
apt-get -y install libpcre3-dev
pip install -r requirements.txt

confirmAnswer "Would you like to add active 1-wire support at your Raspberry PI now? IMPORTANT: The 1-wire thermometer must be conneted to GPIO 4!"
confirmAnswer "Would you like to add active 1-wire support to your Raspberry PI now? IMPORTANT: The 1-wire thermometer must be conneted to GPIO 4!"
if [ $? = 0 ]; then
#apt-get -y update; apt-get -y upgrade;
echo '# CraftBeerPi 1-wire support' >> "/boot/config.txt"
Expand All @@ -65,7 +65,7 @@ show_menu () {
show_menu
;;
2)
confirmAnswer "Are you sure you want to clear the CraftBeerPi. All hardware setting will be deleted"
confirmAnswer "Are you sure you want to clear the CraftBeerPi? All hardware settings will be deleted."
if [ $? = 0 ]; then
sudo rm -f craftbeerpi.db
whiptail --title "Database Delted" --msgbox "The CraftBeerPi database was succesfully deleted. You must hit OK to continue." 8 78
Expand All @@ -75,19 +75,19 @@ show_menu () {
fi
;;
3)
confirmAnswer "Are you sure you want to add CraftBeerPi to autostart"
confirmAnswer "Are you sure you want to add CraftBeerPi to autostart?"
if [ $? = 0 ]; then
sed "s@#DIR#@${PWD}@g" config/craftbeerpiboot > /etc/init.d/craftbeerpiboot
chmod 755 /etc/init.d/craftbeerpiboot;
update-rc.d craftbeerpiboot defaults;
whiptail --title "Added succesfull to autostart" --msgbox "The CraftBeerPi was added to autostart succesfully. You must hit OK to continue." 8 78
whiptail --title "Succesfull add to autostart" --msgbox "CraftBeerPi was added to autostart succesfully. You must hit OK to continue." 8 78
show_menu
else
show_menu
fi
;;
4)
confirmAnswer "Are you sure you want to remove CraftBeerPi from autostart"
confirmAnswer "Are you sure you want to remove CraftBeerPi from autostart?"
if [ $? = 0 ]; then
update-rc.d -f craftbeerpiboot remove
show_menu
Expand All @@ -103,7 +103,7 @@ show_menu () {
;;
6)
sudo /etc/init.d/craftbeerpiboot stop
whiptail --title "CraftBeerPi stoped" --msgbox "The software is stoped" 8 78
whiptail --title "CraftBeerPi stopped" --msgbox "The software is stopped." 8 78
show_menu
;;
7)
Expand All @@ -126,10 +126,10 @@ show_menu () {
fi
;;
9)
confirmAnswer "Are you sure you want to delete all CraftBeerPi log files"
confirmAnswer "Are you sure you want to delete all CraftBeerPi log files?"
if [ $? = 0 ]; then
sudo rm -rf logs/*.log
whiptail --title "Log files deleted" --msgbox "All CraftBeerPi Files are deleted. You must hit OK to continue." 8 78
whiptail --title "Log files deleted" --msgbox "All CraftBeerPi files are deleted. You must hit OK to continue." 8 78
show_menu
else
show_menu
Expand Down
30 changes: 15 additions & 15 deletions modules/base_plugins/brew_steps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class MashStep(StepBase):
Just put the decorator @cbpi.step on top of a method
'''
# Properties
temp = Property.Number("Temperature", configurable=True, description="Target Temperature of Mash Step")
kettle = StepProperty.Kettle("Kettle", description="Kettle in which the mashing takes place")
timer = Property.Number("Timer in Minutes", configurable=True, description="Timer is started when the target temperature is reached")
temp = Property.Number("Temperature", configurable=True, description="Target temperature of mash step.")
kettle = StepProperty.Kettle("Kettle", description="Kettle in which the mashing takes place.")
timer = Property.Number("Timer in Minutes", configurable=True, description="Timer is started when the target temperature is reached.")

def init(self):
'''
Expand Down Expand Up @@ -66,8 +66,8 @@ class MashInStep(StepBase):
Just put the decorator @cbpi.step on top of a method
'''
# Properties
temp = Property.Number("Temperature", configurable=True, description="Target Temperature of Mash Step")
kettle = StepProperty.Kettle("Kettle", description="Kettle in which the mashing takes place")
temp = Property.Number("Temperature", configurable=True, description="Target temperature of mash step.")
kettle = StepProperty.Kettle("Kettle", description="Kettle in which the mashing takes place.")
s = False

@cbpi.action("Change Power")
Expand All @@ -94,14 +94,14 @@ def execute(self):
# Check if Target Temp is reached
if self.get_kettle_temp(self.kettle) >= float(self.temp) and self.s is False:
self.s = True
self.notify("Step Temp Reached!", "Please press the next button to continue", timeout=None)
self.notify("Step temperature reached!", "Please press the next button to continue.", timeout=None)



@cbpi.step
class ChilStep(StepBase):

timer = Property.Number("Timer in Minutes", configurable=True, default_value=0, description="Timer is started immediately")
timer = Property.Number("Timer in Minutes", configurable=True, default_value=0, description="Timer is started immediately.")

@cbpi.action("Stat Timer")
def start(self):
Expand All @@ -125,8 +125,8 @@ def execute(self):
@cbpi.step
class PumpStep(StepBase):

pump = StepProperty.Actor("Pump", description="Pump actor gets toogled")
timer = Property.Number("Timer in Minutes", configurable=True, default_value=0, description="Timer is started immediately")
pump = StepProperty.Actor("Pump", description="Pump actor gets toggled.")
timer = Property.Number("Timer in Minutes", configurable=True, default_value=0, description="Timer is started immediately.")

@cbpi.action("Stat Timer")
def start(self):
Expand Down Expand Up @@ -156,15 +156,15 @@ class BoilStep(StepBase):
Just put the decorator @cbpi.step on top of a method
'''
# Properties
temp = Property.Number("Temperature", configurable=True, default_value=100, description="Target temperature for boiling")
kettle = StepProperty.Kettle("Kettle", description="Kettle in which the boiling step takes place")
timer = Property.Number("Timer in Minutes", configurable=True, default_value=90, description="Timer is started when target temperature is reached")
hop_1 = Property.Number("Hop 1 Addition", configurable=True, description="Fist Hop alert")
temp = Property.Number("Temperature", configurable=True, default_value=100, description="Target temperature for boiling.")
kettle = StepProperty.Kettle("Kettle", description="Kettle in which the boiling step takes place.")
timer = Property.Number("Timer in Minutes", configurable=True, default_value=90, description="Timer is started when target temperature is reached.")
hop_1 = Property.Number("Hop 1 Addition", configurable=True, description="Fist hop alert.")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should say First not fist

hop_1_added = Property.Number("",default_value=None)
hop_2 = Property.Number("Hop 2 Addition", configurable=True, description="Second Hop alert")
hop_2 = Property.Number("Hop 2 Addition", configurable=True, description="Second hop alert.")
hop_2_added = Property.Number("", default_value=None)
hop_3 = Property.Number("Hop 3 Addition", configurable=True)
hop_3_added = Property.Number("", default_value=None, description="Second Hop alert")
hop_3_added = Property.Number("", default_value=None, description="Second hop alert.")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be third


def init(self):
'''
Expand Down
4 changes: 2 additions & 2 deletions modules/base_plugins/gpio_actor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@cbpi.actor
class GPIOSimple(ActorBase):

gpio = Property.Select("GPIO", options=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27], description="GPIO to which the actor is connected")
gpio = Property.Select("GPIO", options=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27], description="GPIO to which the actor is connected.")

def init(self):
GPIO.setup(int(self.gpio), GPIO.OUT)
Expand All @@ -35,7 +35,7 @@ def off(self):
@cbpi.actor
class GPIOPWM(ActorBase):

gpio = Property.Select("GPIO", options=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27], description="GPIO to which the actor is connected")
gpio = Property.Select("GPIO", options=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27], description="GPIO to which the actor is connected.")
duty_cylce = Property.Number("Duty Cycle", configurable=True)

p = None
Expand Down
4 changes: 2 additions & 2 deletions modules/base_plugins/hysteresis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class Hysteresis(KettleController):

# Custom Properties

on = Property.Number("Offset On", True, 0, description="Offset below target temp when heater should switched on. Should be bigger then Offset Off")
off = Property.Number("Offset Off", True, 0, description="Offset below target temp when heater should switched off. Should be smaller then Offset Off")
on = Property.Number("Offset On", True, 0, description="Offset below target temp when heater should be switched on. Should be bigger then Offset Off")
off = Property.Number("Offset Off", True, 0, description="Offset below target temp when heater should be switched off. Should be smaller then Offset Off")

def stop(self):
'''
Expand Down
2 changes: 1 addition & 1 deletion modules/notification/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def init(cbpi):
:return: None
"""
if cbpi.get_config_parameter("donation_notification", "YES") == "YES":
msg = {"id": len(cbpi.cache["messages"]), "type": "info", "headline": "Support CraftBeerPi with your donation", "message": "You will find the PayPay Donation button in the system menu" , "read": False}
msg = {"id": len(cbpi.cache["messages"]), "type": "info", "headline": "Support CraftBeerPi with your donation", "message": "You will find the PayPal Donation button in the system menu." , "read": False}
cbpi.cache["messages"].append(msg)

NotificationView.register(cbpi.app, route_base='/api/notification')
6 changes: 3 additions & 3 deletions modules/recipe_import/beerxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class BeerXMLImport(FlaskView):
@route('/', methods=['GET'])
def get(self):
if not os.path.exists(self.BEER_XML_FILE):
self.api.notify(headline="File Not Found", message="Please upload a Beer.xml File",
self.api.notify(headline="File Not Found", message="Please upload a beer.xml file.",
type="danger")
return ('', 404)
result = []
Expand All @@ -36,11 +36,11 @@ def upload_file(self):
file = request.files['file']
if file and self.allowed_file(file.filename):
file.save(os.path.join(self.api.app.config['UPLOAD_FOLDER'], "beer.xml"))
self.api.notify(headline="Upload Successful", message="The Beer XML file was uploaded succesfully")
self.api.notify(headline="Upload Successful", message="The beer.xml file was succesfully uploaded.")
return ('', 204)
return ('', 404)
except Exception as e:
self.api.notify(headline="Upload Failed", message="Failed to upload Beer xml", type="danger")
self.api.notify(headline="Upload Failed", message="Failed to upload beer.xml file.", type="danger")
return ('', 500)

@route('/<int:id>', methods=['POST'])
Expand Down
8 changes: 4 additions & 4 deletions modules/recipe_import/kbh.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def get(self):
conn = None
try:
if not os.path.exists(self.api.app.config['UPLOAD_FOLDER'] + '/kbh.db'):
self.api.notify(headline="File Not Found", message="Please upload a Kleiner Brauhelfer Database", type="danger")
self.api.notify(headline="File Not Found", message="Please upload a Kleiner Brauhelfer database.", type="danger")
return ('', 404)

conn = sqlite3.connect(self.api.app.config['UPLOAD_FOLDER'] + '/kbh.db')
Expand All @@ -30,7 +30,7 @@ def get(self):
return json.dumps(result)
except Exception as e:
print e
self.api.notify(headline="Failed to load KHB database", message="ERROR", type="danger")
self.api.notify(headline="Failed to load KHB database.", message="ERROR", type="danger")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KHB is a new acronym not explained before.

return ('', 500)
finally:
if conn:
Expand All @@ -47,11 +47,11 @@ def upload_file(self):
if file and self.allowed_file(file.filename):
filename = secure_filename(file.filename)
file.save(os.path.join(self.api.app.config['UPLOAD_FOLDER'], "kbh.db"))
self.api.notify(headline="Upload Successful", message="The Kleiner Brauhelfer Database was uploaded succesfully")
self.api.notify(headline="Upload Successful", message="The Kleiner Brauhelfer database was succesfully uploaded.")
return ('', 204)
return ('', 404)
except Exception as e:
self.api.notify(headline="Upload Failed", message="Failed to upload Kleiner Brauhelfer", type="danger")
self.api.notify(headline="Upload Failed", message="Failed to upload Kleiner Brauhelfer database.", type="danger")

return ('', 500)

Expand Down
2 changes: 1 addition & 1 deletion modules/recipe_import/restapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def load(self):
self.api.emit("UPDATE_ALL_STEPS", Step.get_all())
self.api.notify(headline="Recipe %s loaded successfully" % name, message="")
except Exception as e:
self.api.notify(headline="Failed to load Recipe", type="danger", message=str(e))
self.api.notify(headline="Failed to load recipe", type="danger", message=str(e))
m = str(e.message)
return (str(e), 500)

Expand Down
4 changes: 2 additions & 2 deletions modules/system/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def checkout_tag(self,name):
o.fetch()
g = Git('./')
g.checkout(name)
cbpi.notify("Checkout successful", "Please restart the system")
cbpi.notify("Checkout successful.", "Please restart the system.")
return ('', 204)

@route('/git/status', methods=['GET'])
Expand Down Expand Up @@ -95,7 +95,7 @@ def update(self):
repo = Repo('./')
o = repo.remotes.origin
info = o.pull()
cbpi.notify("Pull successful", "The lasted updated was downloaded. Please restart the system")
cbpi.notify("Pull successful", "The lastet update was downloaded. Please restart the system.")
return ('', 204)

@route('/dump', methods=['GET'])
Expand Down