Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

JJ
Monday, November 1st, 2010 at 5:04:30pm UTC 

  1. #!/bin/bash
  2. # 4 Day Weather forecast script for Boardman, OH
  3. # Written by John Jones
  4. # 11.01.2010 12:10:07
  5.  
  6. # Clear the screen
  7. tput clear
  8.  
  9. # Tomorrow...(Top-Left Quadrant of output)
  10. tput cup 0 0
  11. echo "Forecast for" `date --date="1 day" | awk '{print $1 ", " $2 " "$3 "  "$6}'`
  12. tput cup 1 0
  13. echo "----------------------------"
  14. tput cup 2 0
  15. echo "Low: " `/usr/bin/conkyForecast.py --location=USOH1096 -d LT --imperial --startday 1`
  16. tput cup 3 0
  17. echo "High:" `/usr/bin/conkyForecast.py --location=USOH1096 -d HT --imperial --startday 1`
  18. tput cup 4 0
  19. echo "Humidity:" `/usr/bin/conkyForecast.py --location=USOH1096 -d HM  --imperial --startday 1`
  20. tput cup 5 0
  21. echo `/usr/bin/conkyForecast.py --location=USOH1096 -d CT --startday 1`
  22. tput cup 6 0
  23. tput bold; tput setaf 1;
  24. echo "Precipitation:" `/usr/bin/conkyForecast.py --location=USOH1096 -d PC --startday 1`
  25. tput sgr0
  26.  
  27. # Tomorrow +1...(Top-Right Quadrant of output)
  28. tput cup 0 40
  29. echo "Forecast for" `date --date="2 day" | awk '{print $1 ", " $2 " "$3 "  "$6}'`
  30. tput cup 1 40
  31. echo "----------------------------"
  32. tput cup 2 40
  33. echo "Low: " `/usr/bin/conkyForecast.py --location=USOH1096 -d LT --imperial --startday 2`
  34. tput cup 3 40
  35. echo "High:" `/usr/bin/conkyForecast.py --location=USOH1096 -d HT --imperial --startday 2`
  36. tput cup 4 40
  37. echo "Humidity:" `/usr/bin/conkyForecast.py --location=USOH1096 -d HM  --imperial --startday 2`
  38. tput cup 5 40
  39. echo `/usr/bin/conkyForecast.py --location=USOH1096 -d CT --startday 2`
  40. tput cup 6 40
  41. tput bold; tput setaf 1;
  42. echo "Precipitation:" `/usr/bin/conkyForecast.py --location=USOH1096 -d PC --startday 2`
  43. tput sgr0
  44.  
  45. # Tomorrow +2...(Bottom-Left Quadrant of output)
  46. tput cup 9 0
  47. echo "Forecast for" `date --date="3 day" | awk '{print $1 ", " $2 " "$3 "  "$6}'`
  48. tput cup 10 0
  49. echo "----------------------------"
  50. tput cup 11 0
  51. echo "Low: " `/usr/bin/conkyForecast.py --location=USOH1096 -d LT --imperial --startday 3`
  52. tput cup 12 0
  53. echo "High:" `/usr/bin/conkyForecast.py --location=USOH1096 -d HT --imperial --startday 3`
  54. tput cup 13 0
  55. echo "Humidity:" `/usr/bin/conkyForecast.py --location=USOH1096 -d HM  --imperial --startday 3`
  56. tput cup 14 0
  57. echo `/usr/bin/conkyForecast.py --location=USOH1096 -d CT --startday 3`
  58. tput cup 15 0
  59. tput bold; tput setaf 1;
  60. echo "Precipitation:" `/usr/bin/conkyForecast.py --location=USOH1096 -d PC --startday 3`
  61. tput sgr0
  62.  
  63. # Tomorrow +3...(Bottom-Right Quadrant of output)
  64. tput cup 9 40
  65. echo "Forecast for" `date --date="4 day" | awk '{print $1 ", " $2 " "$3 "  "$6}'`
  66. tput cup 10 40
  67. echo "----------------------------"
  68. tput cup 11 40
  69. echo "Low: " `/usr/bin/conkyForecast.py --location=USOH1096 -d LT --imperial --startday 4`
  70. tput cup 12 40
  71. echo "High:" `/usr/bin/conkyForecast.py --location=USOH1096 -d HT --imperial --startday 4`
  72. tput cup 13 40
  73. echo "Humidiy:" `/usr/bin/conkyForecast.py --location=USOH1096 -d HM  --imperial --startday 4`
  74. tput cup 14 40
  75. echo `/usr/bin/conkyForecast.py --location=USOH1096 -d CT --startday 4`
  76. tput cup 15 40
  77. tput bold; tput setaf 1;
  78. echo "Precipitation:" `/usr/bin/conkyForecast.py --location=USOH1096 -d PC --startday 4`
  79. tput sgr0
  80.  
  81. tput cup 17 0

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right
worth-right