#! /usr/bin/env python # -*- coding: UTF-8 -*- """ Vignette: programma per visualizzare le vignette fatto da Frafra (francesco.it@gmail.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. """ # Descrizione del file __module_name__ = "PySmile" __module_version__ = __revision__ = versione = "1.1" __module_description__ = "Scarica e visualizza una vignetta" # Importazione delle librerire from time import strftime from os import system # Path di wget wget = "/usr/bin/wget" # Path del visualizzatore viewer = "/usr/bin/gthumb" # Luogo dove salvarla loc = "/home/frafra/Server/[dir] Vignette di Staino/" # Metodo per calcolare il nome della vignetta di oggi e scaricarla data = strftime("%Y%m%d") estensione = ".gif" arg = "http://www.unita.it/vignette/staino/%s%s" % (data, estensione) # Download della vignetta system(wget+" "+arg+" -O \""+loc+data+estensione+"\"") # Visualizzazione system(viewer+" \""+loc+data+estensione+"\"")