<commit_before>#!/bin/bash

#This script renders the web data files
#Invoke this via cron on a regular (hourly?) basis to refresh the data
#Author: <NAME>
#Date: 7/5/2017

echo "Move latest webcam image"

#Modify this path if you move the webcam image directory
in_dir="/home/pi/Documents/OpenAg-MVP/webcam/"
out_dir="/home/pi/Documents/OpenAg-MVP/web/"

#Pipe ls of the webcam directory from most recent to latest
# Then clip off only the last line
# Finally trim the string to just the name and store in the variable (File Name)
FN=$(ls -latr "$in_dir" | tail -1 | awk '{print $NF}')

#Check that got what expected
echo "$in_dir$FN"

#Finally copy this file to the output web directory
#Since will be overwriting, need to confirm with "yes"
yes | cp "$in_dir$FN" "$out_dir"image.jpg


#create the temperature graph
echo "Build temperature graph"
python /home/pi/python/temp_chart.py

echo "Build humidity graph"
#create the humidity graph
python /home/pi/python/humidity_chart.py<commit_msg>Add files via upload<commit_after>#!/bin/bash

#This script renders the web data files
#Invoke this via cron on a regular (hourly?) basis to refresh the data
#Author: <NAME>
#Date: 7/5/2017

echo "Move latest webcam image"

#Modify this path if you move the webcam image directory
in_dir="/home/pi/Documents/OpenAg-MVP/webcam/"
out_dir="/home/pi/Documents/OpenAg-MVP/web/"

#Pipe ls of the webcam directory from most recent to latest
# Then clip off only the last line
# Finally trim the string to just the name and store in the variable (File Name)
FN=$(ls -latr "$in_dir" | tail -1 | awk '{print $NF}')

#Check that got what expected
echo "$in_dir$FN"

#Finally copy this file to the output web directory
#Since will be overwriting, need to confirm with "yes"
yes | cp "$in_dir$FN" "$out_dir"image.jpg


#create the temperature graph
echo "Build temperature graph"
python /home/pi/MVP_UI/python/temp_chart.py

echo "Build humidity graph"
#create the humidity graph
python /home/pi/MVP_UI/python/humidity_chart.py
{'fraction_non_alphanumeric': 0.09965122072745392, 'fraction_numerical': 0.006975585450921774, 'mean_word_length': 4.608938547486034, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4518951', 'n_tokens_mistral': 662, 'n_tokens_neox': 631, 'n_words': 266}