Skip to content

cclauss/pythonista-scripts-1

 
 

Repository files navigation

pythonista-scripts

Useful scripts to be run in Pythonista for iOS. Kudos to @cclauss for line by line code cleanup and helpful comments on improving these scripts.

  • Search IMDB.py - A script that I find useful to quickly look up info on a movie title or a TV series. The results of the query are displayed on the console screen and a Markdown version is copied to the clipboard for pasting to a text editor, etc.

  • PhotosToDropbox.py - A script that lets you select multiple photos from the iPhone camera roll, resize & geo-tag them, and upload them to Dropbox where they are renamed and organized based on the date and time they were taken. The cool part is that the script will preserve the metadata of the original photo if desired, using the Pexif module to read the metadata from the original and write it back to the resized copy. The Pexif module can be imported into Pythonista by simply copying pexif.py into the Pythonista script directory.

  • WeatherAnywhere.py - This script was inspired by @cclauss' script 'weather_where_you_are.py' and uses the weather api from www.wunderground.com. The script displays all it's information on the console screen, ideally suited for an iPhone in portrait orientation. In order to use the script you will need to aquire an api key from the wunderground website. The key is free if your usage is 500 or less server hits per day and provides a wealth of weather information. Lots of weather info is provided in text, including forecast, humidity, pressure, temperature, precipitation amounts, wind speed, wind chill, & percent of percip. The info is in imperial units, but can easily be changed to metric via a flag in the script. The script makes use of a txt file, 'cities.txt', to be located in the same folder as the script, and 38 gif files that display weather types, located in the '/icons' subfolder of the script's folder. The script will download the icons if it doesn't find them. The txt file can contain popular local, regional, national and international cities of your choosing, including their state, if national, or country, if international, and their zip links. The file is easily editable with the Pythonista editor. The zip link is automatically added to the cities list when you choose to add a new city. I've included a sample cities.txt file in this repository.

  • cities.txt - A sample txt file for 'WeatherAnywhere.py'. Put it in the same folder as the script.

  • WeatherAnywhereScene.py - Inspiration behind this was @cclauss's script, WeatherAnywhereView.py in this repository. I wanted to be able to add weather icons and have them scroll with the text, so a scene seemed to be the best answer. This script gives a much better representation of the weather info than the console version does. It displays the current weather, weather for the next 24 hrs, weather for the next 7 days, and a button on the title bar for viewing the weather on the web. The script uses the functions in 'WeatherAnywhere.py' to retrieve the necessary weather info displayed. The script allows scrolling the scene by inertia. A basic scrolling example was created by Dalorbi on the pythonista forums. Ability for scrolling the scene with inertia was added by hroe. This script needs to be placed in the same folder as WeatherAnywhere.py, to make use of some of it's functions. The script also uses the weather icons stored in a subfolder '/icons' off the script folder.

About

Useful scripts to be run in Pythonista for iOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%