Conky, mijn setup

Fecfactor vroeg me gisteren om de configuratie van de conky te publiceren die ik in de onderstaande schermafbeelding laat zien

Zoals je kunt zien, zijn het ongeveer 3 conkys, die worden uitgevoerd door middel van een script, de configuratie hiervan is gebaseerd op dit bericht gepost door gebruiker Bruce M. in de forums van Ubuntu-Ar met enkele aanpassingen in de mailconky, wat in mijn geval voor Gmail is.

In de referentiepost wordt het heel goed uitgelegd door Bruce, maar ook als geheugensteuntje voor mij, zal ik de te volgen stappen en de code van mijn conkys kopiëren voor degene die het heeft.

Natuurlijk moeten conky, curl en python zijn geïnstalleerd, dus typen we een console in:

sudo apt-get installeer conky curl python

De bron van weather.ttf en arrows.ttf is hier​ De bron van moon.ttf is hier eenmaal gedownload moet u ze kopiëren naar / usr / share / fonts

Laten we nu ons script maken met de naam ~. / Startconky

gksudo gedit ~ / .startconky

in het lege bestand plakken we het volgende

#! / Bin / bash
slaap 0 & # 0 goed voor Xfce - gebruik 20 tot 30 voor Gnome
conky -c ~ / Conky / conkymain &
#sleep 0 & # 0 goed voor Xfce - gebruik 1 voor Gnome
conky -c ~ / Conky / conkyforecast &
#sleep 0 & # 0 goed voor Xfce - gebruik 1 voor Gnome
conky -c ~ / Conky / conkymail &

Nu maken we het conkymain-bestand in de ~ / Conky-map, als we de Conky-map niet hebben, zullen we het moeten maken.

gedit ~ / Conky / conkymain

Ik gebruik het Calibri-lettertype, als je het niet hebt, vervang het dan door wat je maar wilt.

We blijven binnen wat volgt

achtergrond nr
own_window ja
own_window_transparent ja
own_window_hints onversierd, hieronder, plakkerig, skip_taskbar, skip_pager
own_window_colour zwart
double_buffer ja
use_spacer links
use_xft ja
lettertype calibri: grootte = 9
xftfont calibri: maat = 9
xftalpha 0.5
update_interval 5.0
hoofdletter nee # zet op ja als u wilt dat alle tekst in hoofdletters is
stippled_border 3
grensmarge 9
grensbreedte 10
default_color wit
default_outline_color zwart
default_shade_color zwart
color0 cyaan
kleur1 lichtblauw
color2 oranje
color3 geel
color4 tarwe
color5 wit
color6 wit
color7 wit
color8 wit
color9 wit
uitlijning top_right # of top_left, bottom_left, bottom_right
kloof_x 10
35
text_buffer_size 128 # gebruik 1024 voor de prognose
no_buffers yes # Bestandssysteembuffers aftrekken van gebruikt geheugen?
draw_borders nr
draw_outline yes # versterkt tekst zo ja
draw_shades ja # schaduwkleur zwart

TEKST
$ {font calibri: size = 12} $ {alignc} $ {color1} $ sysname $ kernel on $ machine} $ color $ font
$ {font calibri: size = 12} $ {alignc} $ {color2} $ {exec whoami} @ $ nodename $ color $ font
$ {color0} $ {hr 1} $ kleur
$ {font calibri: size = 20} $ {alignc} $ {time% H:% M} $ font
$ {font calibri: size = 12} $ {color1} $ {alignc} $ {time% A,% d% b. % Y} $ color $ font
$ {color3} UpTime: $ {alignr 2} $ uptime $ color
$ {color0} $ {hr 1} $ kleur
$ {voffset 5} $ {color2} CPU: $ {alignc} $ color $ running_processes $ {color1} / $ color $ processen $ {alignr 2} $ {color2} $ {cpubar cpu0 14,80} $ color
$ {color1} $ {voffset -16} $ {alignr 5} $ cpu% $ color
$ {voffset 2} $ {color1} Gem. laden ($ {color3} Min. $ {color1}): $ {alignr 2} $ {color3} 1: $ color $ {loadavg 1} $ {color3} 5: $ color $ {loadavg 2} $ {color3} 15: $ color $ {loadavg 3}
$ {voffset 5} $ {color2} RAM: $ color $ mem $ {color2} / $ color $ memmax $ {alignr 2} $ {color2} $ {membar 14,80} $ color
$ {color1} $ {voffset -16} $ {alignr 5} $ memperc% $ color
$ {voffset 2} $ {color1} Gebufferd: $ color $ {buffers} $ {alignr 2} $ {color1} In cache: $ color $ {cached}
$ {voffset 5} $ {color2} SWAP: $ color $ swap $ {color2} / $ color $ {swapmax} $ {alignr 2} $ {color2} $ {swapbar 14,80} $ color
$ {color1} $ {voffset -16} $ {alignr 5} $ swapperc%
$ {color0} $ {hr 1} $ kleur
$ {voffset 5} $ {color2} HD-info $ {color1} - $ color Gratis $ {color1} - Gebruikt - $ {color2} Totaal
$ {voffset 5} $ {color1} Root: $ color $ {fs_free_perc /}% $ {alignr 2} $ {fs_free /} $ {color2} / $ {color1} $ {fs_used /} $ color / $ {color2} $ {fs_size /} $ kleur
$ {color1} Home: $ color $ {fs_free_perc / home / user}% $ {alignr 2} $ {fs_free / home / user} $ {color2} / $ {color1} $ {fs_used / home / user} $ color / $ {color2} $ {fs_size / home / user} $ color
$ {color0} $ {hr 1} $ kleur
$ {color1} Uit: $ color Buenos Aires, Argentinië
$ {color1} Breedte: $ {color2} 34 ° 35'S $ {color1} Lang: $ {color2} 58 ° 21'W $ {color1} Alt: $ {color2} 25 m $ kleur
$ {voffset 5} $ {color2} $ {font calibri: size = 12} vandaag: $ font $ {color3} $ {execi 3600 python ~ / Conky / scripts / conkyForecast.py –location = ARBA0009 –datatype = CC} $ color $ {alignr 2} $ {color1} ST: $ {color2} $ {execi 3600 python ~ / Conky / scripts / conkyForecast.py –location = ARBA0009 –datatype = LT}
$ {color3} $ {font Weather: size = 50} $ {execi 3600 python ~ / Conky / scripts / conkyForecast.py –location = ARBA0009 –datatype = WF} $ font $ color
$ {alignr 50} $ {voffset -55} $ {font calibri: size = 25} $ {execi 3600 python ~ / Conky / scripts / conkyForecast.py –location = ARBA0009 –datatype = HT} $ font
$ {alignc 20} $ {voffset -30} $ {font Arrows: size = 20} $ {color4} $ {execi 3600 python ~ / Conky / scripts / conkyForecast.py –location = ARBA0009 –datatype = BF} $ color $ lettertype
$ {alignc 10} $ {voffset 5} $ {color4} Wind: $ {execi 3600 python ~ / Conky / scripts / conkyForecast.py –location = ARBA0009 –datatype = WS} $ color
$ {color1} Vochtigheid: $ {color3} $ {execi 3600 python ~ / Conky / scripts / conkyForecast.py –location = ARBA0009 –datatype = HM} $ {alignr 2} $ {color1} Neerslag: $ {color3} $ { execi 3600 python ~ / Conky / scripts / conkyForecast.py –location = ARBA0009 –datatype = PC} $ color
$ {alignc} $ {color1} Druk: $ {color3} $ {execi 3600 python ~ / Conky / scripts / conkyForecast.py –location = ARBA0009 –datatype = BR} - $ {color3} $ {execi 3600 python ~ / Conky /scripts/conkyForecast.py –location = ARBA0009 –datatype = BD} $ color
$ {color4} $ {hr} $ color
$ {color1} Zonsopgang: $ {color3} $ {execi 3600 python ~ / Conky / scripts / conkyForecast.py –location = ARBA0009 –datatype = SR} $ {alignr 2} $ {color1} Zonsondergang: $ {color3} $ { execi 3600 python ~ / Conky / scripts / conkyForecast.py –location = ARBA0009 –datatype = SS} $ color
$ {voffset 15} $ {color1} Maan: $ {color4} $ {alignr 2} $ {color3} $ {execi 3600 python ~ / Conky / scripts / conkyForecast.py –location = ARBA0009 –datatype = MP} $ color
$ {voffset -20} $ {offset 80} $ {color4} $ {font moonphases: size = 20} $ {execi 3600 python ~ / Conky / scripts / conkyForecast.py –location = ARBA0009 –datatype = MF} $ font $ kleur
$ {color0} $ {hr} $ color
$ {voffset 5} $ {color2} IP: $ {alignc} $ color $ {addr eth0}
$ {color1} Omlaag: $ color $ {downspeed eth0} k / s $ {alignr 2} $ {color1} Omhoog: $ color $ {upspeed eth0} k / s
$ {color1} Totaal: $ color $ {totaldown eth0} $ {alignr 2} $ {color1} Totaal: $ color $ {totalup eth0}
$ {color1} Inkomend: $ color $ {tcp_portmon 1 32767 count} $ {color1} Uitgaand: $ color $ {tcp_portmon 32768 61000 count} $ {alignr 2} $ {color1} Totaal: $ color $ {tcp_portmon 1 65535 count}
$ {voffset 5} $ {color2} Verbindingen: $ color $ {tcp_portmon 32768 61000 count} $ {alignr 2} $ {color2} Service / poort $ color
$ {voffset 5} $ {tcp_portmon 32768 61000 rhost 0} $ {alignr 2} $ {tcp_portmon 32768 61000 rservice 0}
$ {tcp_portmon 32768 61000 rhost 1} $ {alignr 2} $ {tcp_portmon 32768 61000 rservice 1}
$ {tcp_portmon 32768 61000 rhost 2} $ {alignr 2} $ {tcp_portmon 32768 61000 rservice 2}
$ {tcp_portmon 32768 61000 rhost 3} $ {alignr 2} $ {tcp_portmon 32768 61000 rservice 3}
$ {tcp_portmon 32768 61000 rhost 4} $ {alignr 2} $ {tcp_portmon 32768 61000 rservice 4}
$ {tcp_portmon 32768 61000 rhost 5} $ {alignr 2} $ {tcp_portmon 32768 61000 rservice 5} $ color

we maken het bestand ~ / Conky / conkyforecast

gedit ~ / Conky / conkyforecast

en we plakken het volgende erin

achtergrond nr
own_window ja
own_window_transparent ja
own_window_hints onversierd, hieronder, plakkerig, skip_taskbar, skip_pager
own_window_colour zwart
double_buffer ja
use_spacer links
use_xft ja
lettertype calibri: grootte = 8
xftfont calibri: maat = 8
xftalpha 0.5
update_interval 5.0
hoofdletter nee # zet op ja als u wilt dat alle tekst in hoofdletters is
stippled_border 3
grensmarge 9
grensbreedte 10
default_color wit
default_outline_color zwart
default_shade_color zwart
color0 cyaan
kleur1 lichtblauw
color2 oranje
color3 geel
color4 tarwe
color5 wit
color6 wit
color7 wit
color8 wit
color9 wit
uitlijning bottom_left # of top_left, bottom_left, bottom_right
kloof_x 10
35
text_buffer_size 1024 # gebruik 1024 voor de prognose
no_buffers yes # Bestandssysteembuffers aftrekken van gebruikt geheugen?
draw_borders nr
draw_outline yes # versterkt tekst zo ja
draw_shades ja # schaduwkleur zwart

TEKST
$ {color4} $ {font calibri: size = 11} Uitgebreide prognose $ font $ color
$ {color0} $ {hr} $ color
$ {color4} $ {font calibri: size = 9} $ {execi 3600 python ~ / Conky / scripts / conkyForecast.py –location = ARBA0009 –template = / home / user / Conky / scripts / myweather.template} $ font $ kleur

we maken het bestand ~ / Conky / conkymail

gedit ~ / Conky / conkymail

we plakken het volgende in het bestand

achtergrond nr
own_window ja
own_window_transparent ja
own_window_hints onversierd, hieronder, plakkerig, skip_taskbar, skip_pager
own_window_colour zwart
double_buffer ja
use_spacer links
use_xft ja
lettertype calibri: grootte = 8
xftfont calibri: maat = 8
xftalpha 0.5
update_interval 5.0
hoofdletter nee # zet op ja als u wilt dat alle tekst in hoofdletters is
stippled_border 3
grensmarge 9
grensbreedte 10
default_color wit
default_outline_color zwart
default_shade_color zwart
color0 cyaan
kleur1 lichtblauw
color2 oranje
color3 geel
color4 tarwe
color5 wit
color6 wit
color7 wit
color8 wit
color9 wit
uitlijning bottom_left # of top_left, bottom_left, bottom_right
kloof_x 565
35
text_buffer_size 128 # gebruik 1024 voor de prognose
no_buffers yes # Bestandssysteembuffers aftrekken van gebruikt geheugen?
draw_borders nr
draw_outline yes # versterkt tekst zo ja
draw_shades ja # schaduwkleur zwart

TEKST
$ {font calibri: size = 11} $ {alignc} $ {color4} Gmail
$ {color0} $ {hr} $ color
$ {font calibri: size = 11} $ {color4} We hebben $ {color3} $ {execi 300 python ~ / Conky / scripts / mail / conkyEmail.py} $ {color4} e-mail (s) $ font

We maken een bestand in ~ / Conky / scripts / conkyForecast.py (we moeten de map met scripts maken)

gedit ~ / Conky / scripts / conkyForecast.py

#! / usr / bin / python
# - * - codering: utf-8 - * -

# conkyForecast.py is een (niet zo) eenvoudig (meer) python-script om te verzamelen
# details van het huidige weer voor gebruik in conky.
#
# Auteur: Kaivalagi
# Gemaakt: 13-04-2008
# Wijzigingen:
# 14/04/2008 Dagbereiken toestaan ​​voor prognosegegevens
# 14/04/2008 Controleer of er verbinding is met de xoap-service
# 18/04/2008 Laat de instelling van spaties toe voor uitvoer op afstand
# 18-04-2008 Uitvoer van nacht- en dagvoorspellingen toestaan
# 18/04/2008 Ondersteuning landinstelling voor voorwaarde code tekst «CC» optie, in afwachting van Spaanse vertaling
# 18-04-2008 Gebruik beitsen voor klassegegevens in plaats van xml te openen, dit omzeilt de noodzaak om gegevens in de cache te ondervragen
# 19/04/2008 Spaanse voorwaarde tekst toegevoegd - Bedankt Bruce M
# 19/04/2008 Isnumerieke controle toegevoegd op alle numerieke uitvoer met eenheidsachtervoegsel
# 19/04/2008 Naamgeving van pickle-bestanden gewijzigd om locatiecode op te nemen
# 19/04/2008 Conversie van Spaanse weekdagen via locale toegevoegd
# 20/04/2008 Een fatsoenlijke parser voor het commando-argument toegevoegd
# 20/04/2008 Optie –shortweekday toegevoegd, als gegeven het gegevenstype dag van de week wordt ingekort tot 3 karakters
# 21-04-2008 Vaste locale-opties voor prognose-uitvoer
# 21/04/2008 Toegevoegd -sjabloonoptie om aangepaste uitvoer mogelijk te maken met een enkele exec-oproep 🙂
# 21-04-2008 Optie –hideunits toegevoegd om bijvoorbeeld mph en C uit de uitvoer te verwijderen
# 23/04/2008 –imperiële optie uit sjabloon verwijderd, deze MOET als standaardoptie bij de scriptoproep worden ingesteld en niet in het sjabloonbestand worden gebruikt.
# 23/04/2008 Readded –imperiële optie voor sjabloon, waardoor metrische of imperiale waarden per datatype mogelijk zijn. Merk op dat bij het gebruik van sjablonen de opdrachtregeloptie niet zal werken.
# 23/04/2008 Output toegevoegd die de gebruiker op de hoogte stelt als de opgegeven locatie onjuist is
# 24/04/2008 Behandeling toegevoegd voor geen connectiviteit, zal nu terugkeren naar gegevens in de cache (foutmelding als er geen cache bestaat). Tests door te proberen xoap.weather.com te openen
# 24/04/2008 Conversie van Celsius naar Fahrenheit opgelost
# 06/05/2008 Bijgewerkte url gebruikt nadat webservice is bijgewerkt
# 09/05/2008 Geconsolideerde huidige conditie en prognose data ophalen in één gesprek
# 09/05/2008 Zonsopgang en zonsondergang toegevoegd aan datatypes, deze zijn specifiek voor zowel de huidige omstandigheden als de voorspellingsgegevens
# 09/05/2008 Maanfase, barometerstand en barometerbeschrijving toegevoegd aan datatypes, deze zijn alleen specifiek voor de huidige omstandigheden en dus n.v.t. in de voorspelde output
# 09/05/2008 Eenheidsconversies voor barometer toegevoegd van mb naar inches (imperiaal)
# 09/05/2008 Spaanse voorwaarde tekst bijgewerkt - Bedankt Bruce M
# 10/05/2008 Franse locale gegevens toegevoegd - Bedankt benpaka
# 12/05/2008 Nieuw BF-datatype (lager lettertype) toegevoegd om een ​​pijlteken te geven (gebruik met het lettertype Arrow.ttf) in plaats van NSEW-uitvoer van WD (windrichting)
# 12/05/2008 Bijgewerkte WD-uitvoer om locale-specifiek te zijn, ondersteunt momenteel standaard Engels en Spaans - Bedankt Bruce M
# 18/05/2008 Nieuw MF (moon font) datatype toegevoegd om een ​​moon font karakter te geven (karakters incorrect en nog geen speciaal font).
# 21/05/2008 Voor de huidige omstandigheden geeft de –datatype = LT-optie nu de «voelt als» temperatuur weer in plaats van de huidige temperatuur
#
# ALLES:
# Consolideer pkl-bestanden in één bestand / klasse
# Voeg een weerlettertype toe op basis van de uitvoer van de maanfase op basis van de maanpictogramgegevens
​ Zijn er nog meer vereisten?

importeer sys, os, socket, urllib2, datetime, tijd
van xml.dom importeer minidom
uit stat import *
van optparse import OptionParser
importeer locale
importeer gettext
import augurk
uit wiskunde-import *

APP = »conkyForecast.py»
DIR = os.path.dirname (__file__) + '/ locale'
gettext.bindtextdomain (APP, DIR)
gettext.textdomain (APP)
_ = gettext.gettext

klasse CommandLineParser:

parser = Geen

def __init __ (zelf):

self.parser = OptionParser ()
self.parser.add_option («- l», »- locatie», dest = »locatie», standaard = »UKXX0103 ″, type =» string », metavar =» CODE », help = u» locatiecode voor weergegevens [ default:% default], gebruik de volgende url om uw locatiecode op plaatsnaam te bepalen: http://xoap.weather.com/search/search?where=Norwich »)
self.parser.add_option ("- d", "- datatype", dest = "datatype", default = "HT", type = "string", metavar = "DATATYPE", help = u "[default:% default] De gegevenstype-opties zijn: DW (dag van de week), WF (weer lettertype-uitvoer), LT (voorspelling: lage temperatuur, stroom: voelt als temperatuur), HT (voorspelling: hoge temperatuur, stroom: huidige temperatuur), CC (huidige temperatuur) Condities), CT (condities tekst), PC (neerslagkans), HM (vochtigheid), WD (windrichting), WS (windsnelheid), WG (windstoten), CN (plaatsnaam), SR (zonsopgang), SS (zonsondergang), MP (maanfase), MF (maanlettertype), BR (barometerstand), BD (barometerbeschrijving). Niet van toepassing op opdrachtregel bij gebruik van sjablonen. »)
self.parser.add_option («- s», »- startdag», dest = »startdag», type = »int», metavar = »NUMMER», help = u »definieer het startdagnummer, indien weggelaten worden de huidige voorwaarden weergegeven . Niet van toepassing op de opdrachtregel bij het gebruik van sjablonen. »)
self.parser.add_option ("- e", "- endday", dest = "endday", type = "int", metavar = "NUMBER", help = u "definieer het nummer van de laatste dag, indien weggelaten, alleen gegevens voor de startdag wordt uitgevoerd. Niet van toepassing op de opdrachtregel bij het gebruik van sjablonen. »)
self.parser.add_option («- S», »- spaties», dest = »spaties», type = »int», standaard = 1, metavar = »AANTAL», help = u »[standaard:% standaard] Definieert de aantal spaties tussen uitvoer op afstand. Niet van toepassing op de opdrachtregel bij het gebruik van sjablonen. »)
self.parser.add_option («- t», »- sjabloon», dest = »sjabloon», type = »string», metavar = »BESTAND», help = u »definieer een sjabloonbestand om uitvoer in één aanroep te genereren. A item in het bestand heeft de vorm {–datatype = HT –startday = 1}. Binnen elk item zijn de volgende opties mogelijk: –datatype, –startday, –endday, –night, –shortweekday, –imperial, –hideunits, –Spaces. Houd er rekening mee dat de korte vormen van de opties momenteel niet worden ondersteund! Geen van deze opties is van toepassing op de opdrachtregel bij het gebruik van sjablonen. »)
self.parser.add_option («- L», »- locale», dest = »locale», type = »string», help = u »overschrijft de systeemlandinstelling voor taaluitvoer (en = engels, es = spaans, fr = frans, meer volgt) »)
self.parser.add_option ("- i", "- imperial", dest = "imperial", default = False, action = "store_true", help = u "Britse eenheden aanvragen, als de weggelaten uitvoer in metrisch is. Niet van toepassing op opdrachtregel bij het gebruik van sjablonen. »)
self.parser.add_option («- n», »- nacht», dest = »nacht», standaard = False, action = »store_true», help = u »schakel output naar nachtdata, indien weggelaten wordt dagoutput uitgevoerd. Niet van toepassing op de opdrachtregel bij het gebruik van sjablonen. »)
self.parser.add_option («- w», »- shortweekday», dest = »shortweekday», default = False, action = »store_true», help = u »Verkort het datatype van de dag van de week tot 3 tekens. Niet van toepassing op opdrachtregel bij het gebruik van sjablonen. »)
self.parser.add_option («- u», »- hideunits», dest = »hideunits», default = False, action = »store_true», help = u »Verberg eenheden zoals mph of C, graden-symbolen (°) zijn nog steeds weergegeven. Niet van toepassing op de opdrachtregel bij het gebruik van sjablonen. »)
self.parser.add_option («- v», »- verbose», dest = »verbose», default = False, action = »store_true», help = u »verzoek uitgebreide uitvoer, geen goed idee bij het doorlopen van Conky!)
self.parser.add_option ("- r", "- refetch", dest = "refetch", default = False, action = "store_true", help = u "gegevens ophalen ongeacht het verlopen van gegevens")

def parse_args (zelf):
(opties, args) = self.parser.parse_args ()
return (opties, argumenten)

def print_help (zelf):
retourneer self.parser.print_help ()

klasse WeatherData:
def __init __ (self, day_of_week, low, high, condition_code, condition_text, neerslag, vochtigheid, wind_dir, windsnelheid, windstoten, stad, zonsopgang, zonsondergang, moon_phase, moon_icon, bar_read, bar_desc):
self.day_of_week = u »» + day_of_week
self.low = u »» + laag
self.high = u »» + hoog
self.condition_code = u »» + condition_code
self.condition_text = u »» + condition_text
self.precip = u »» + neerslag
zelfvochtigheid = u »» + vochtigheid
self.wind_dir = u »» + wind_dir
self.wind_speed = u »» + wind_speed
self.wind_gusts = u »» + wind_gusts
self.city = u »» + stad
self.sunrise = u »» + zonsopgang
self.sunset = u »» + zonsondergang
self.moon_phase = u »» + maan_fase
self.moon_icon = u »» + moon_icon
self.bar_read = u »» + bar_read
self.bar_desc = u »» + bar_desc

klasse WeatherText:

condition_text = {
«0»: _ (u »Tornado»),
«1»: _ (u »Tropische storm»),
«2»: _ (u »Orkaan»),
«3»: _ (u »Zware onweersbuien»),
«4»: _ (u »Onweersbuien»),
«5»: _ (u »Gemengde regen en sneeuw»),
«6»: _ (u »Gemengde regen en ijzel»),
«7»: _ (u »Gemengde neerslag»),
«8»: _ (u »Bevriezende motregen»),
«9»: _ (u »Drizzle»),
«10»: _ (u »Ijzige regen»),
«11»: _ (u »Douches»),
«12»: _ (u »Douches»),
«13»: _ (u »Sneeuwvlagen»),
«14»: _ (u »Lichte sneeuwbuien»),
«15»: _ (u »Blowing Snow»),
«16»: _ (u »Sneeuw»),
«17»: _ (u »Gegroet»),
«18»: _ (u »IJzel»),
«19»: _ (u »Stof»),
«20»: _ (u »Mist»),
«21»: _ (u »Haze»),
«22»: _ (u »Rook»),
«23»: _ (u »Stormachtig»),
«24»: _ (u »Windy»),
«25»: _ (u »Koud»),
«26»: _ (u »Bewolkt»),
«27»: _ (u »Meestal bewolkt»),
«28»: _ (u »Meestal bewolkt»),
«29»: _ (u »Gedeeltelijk bewolkt»),
«30»: _ (u »Gedeeltelijk bewolkt»),
«31»: _ (u »Wissen»),
«32»: _ (u »Wissen»),
«33»: _ (u »Redelijk»),
«34»: _ (u »Redelijk»),
«35»: _ (u »Gemengde regen en hagel»),
«36»: _ (u »Hot»),
«37»: _ (u »Geïsoleerde onweersbuien»),
«38»: _ (u »Verspreide onweersbuien»),
«39»: _ (u »Verspreide onweersbuien»),
«40»: _ (u »Verspreide buien»),
«41»: _ (u »Zware sneeuw»),
«42»: _ (u »Verspreide sneeuwbuien»),
«43»: _ (u »Zware sneeuw»),
«44»: _ (u »Gedeeltelijk bewolkt»),
«45»: _ (u »Donderbuien»),
«46»: _ (u »Sneeuwbuien»),
«47»: _ (u »Geïsoleerde onweersbuien»),
«Nvt»: _ (u »nvt»),
"-": _(een")
}

condition_text_es = {
«0»: _ (u »Tornado»),
«1»: _ (u »Tropische storm»),
«2»: _ (u »Huracá¡n»),
«3»: _ (u »Sterke stormen»),
«4»: _ (u »Stormen»),
«5»: _ (u »Gemengde regen en sneeuw»),
«6»: _ (u »Gemengde regen en ijzel»),
«7»: _ (u »IJzel»),
«8»: _ (u »Bevriezende motregen»),
«9»: _ (u »Drizzle»),
«10»: _ (u »Ijzige regen»), # of ijzel
«11»: _ (u »Douches»),
«12»: _ (u »Douches»),
«13»: _ (u »Lichte sneeuw»),
«14»: _ (u »Lichte sneeuw»),
«15»: _ (u »Sneeuwstorm»),
«16»: _ (u »Sneeuw»),
«17»: _ (u »Gegroet»),
«18»: _ (u »IJzel»),
«19»: _ (u »Poeder»),
«20»: _ (u »Mist»),
«21»: _ (u »Haze»),
«22»: _ (u »Rook»),
«23»: _ (u »Tempest»),
«24»: _ (u »Windy»),
«25»: _ (u »Fráo»),
«26»: _ (u »Erg bewolkt»),
«27»: _ (u »Meestal bewolkt»),
«28»: _ (u »Meestal bewolkt»),
«29»: _ (u »Gedeeltelijk bewolkt»),
«30»: _ (u »Gedeeltelijk bewolkt»),
«31»: _ (u »Wissen»),
«32»: _ (u »Wissen»),
«33»: _ (u »Something Cloudy»),
«34»: _ (u »Something Cloudy»),
«35»: _ (u »Regen met hagel»),
«36»: _ (u »Heat»),
«37»: _ (u »Geïsoleerde stormen»),
«38»: _ (u »Verspreide stormen»),
«39»: _ (u »Verspreide stormen»),
«40»: _ (u »Verspreide buien»),
«41»: _ (u »Zware sneeuw»),
«42»: _ (u »Zwakke en verspreide sneeuwval»),
«43»: _ (u »Intense Nevada»),
«44»: _ (u »Verspreide wolken»),
«45»: _ (u »Stormen»),
«46»: _ (u »Verspreide sneeuwval»),
«47»: _ (u »Geïsoleerde stormen»),
«Nvt»: _ (u »nvt»),
"-": _(een")
}

condition_text_fr = {
«0»: _ (u »Tornade»),
«1»: _ (u »Tempête Tropicale»),
«2»: _ (of »Ouragan»),
«3»: _ (of »Orages Violents»),
«4»: _ (of »Orageux»),
«5»: _ (u »Pluie et Neige»),
«6»: _ (u »Pluie et Neige Mouillée»),
«7»: _ (u »Variabele avec averses»),
«8»: _ (u »Bruine Givrante»),
«9»: _ (u »Bruine»),
«10»: _ (u »Pluie Glacante»),
«11»: _ (u »Averses»),
«12»: _ (u »Averses»),
«13»: _ (u »Légère Neige»),
«14»: _ (u »Forte Neige»),
«15»: _ (u »Tempête de Neige»),
«16»: _ (u »Neige»),
«17»: _ (u »Grêle»),
«18»: _ (u »Pluie / Neige»),
«19»: _ (u »Nuage de poussière»),
«20»: _ (u »Brouillard»),
«21»: _ (u »Brume»),
«22»: _ (u »Fumée»),
«23»: _ (u »Tres Venteux»),
«24»: _ (u »Venteux»),
«25»: _ (u »Froid»),
«26»: _ (u »Nuageux»),
«27»: _ (u »Tres Nuageux»),
«28»: _ (u »Tres Nuageux»),
«29»: _ (u »Nuages ​​Disséminés»),
«30»: _ (u »Nuages ​​Disséminés»),
«31»: _ (u »Beau»),
«32»: _ (u »Beau»),
«33»: _ (u »Belles Éclaircies»),
«34»: _ (u »Belles Éclaircies»),
«35»: _ (u »Pluie avec Grêle»),
«36»: _ (u »Chaleur»),
«37»: _ (of »Orages Isolés»),
«38»: _ (of »Orages Localisés»),
«39»: _ (of »Orages Localisés»),
«40»: _ (u »Averses Localisées»),
«41»: _ (u »Neige Lourde»),
«42»: _ (u »Tempête de Neige Localisées»),
«43»: _ (u »Neige Lourde»),
«44»: _ (u »Nuages ​​Disséminés»),
«45»: _ (of »Orages»),
«46»: _ (u »Tempête de Neige»),
«47»: _ (of »Orages Isolés»),
«Nvt»: _ (u »nvt»),
"-": _(een")
}

condition_weather_font = {
«0»: _ (u »W»),
«1»: _ (u »V»),
«2»: _ (u »W»),
«3»: _ (u »s»),
«4»: _ (u »p»),
«5»: _ (u »k»),
«6»: _ (u »k»),
«7»: _ (u »g»),
«8»: _ (u »g»),
«9»: _ (u »g»),
«10»: _ (u »h»),
«11»: _ (u »g»),
«12»: _ (u »g»),
«13»: _ (u »k»),
«14»: _ (u »k»),
«15»: _ (u »k»),
«16»: _ (u »k»),
«17»: _ (u »k»),
«18»: _ (u »k»),
«19»: _ (u »e»),
«20»: _ (u »e»),
«21»: _ (u »a»),
«22»: _ (u »d»),
«23»: _ (u »d»),
«24»: _ (u »d»),
«25»: _ (u »d»),
«26»: _ (u »e»),
«27»: _ (u »e»),
«28»: _ (u »e»),
«29»: _ (u »c»),
«30»: _ (u »c»),
«31»: _ (u »a»),
«32»: _ (u »a»),
«33»: _ (u »b»),
«34»: _ (u »b»),
«35»: _ (u »k»),
«36»: _ (u »a»),
«37»: _ (u »f»),
«38»: _ (u »f»),
«39»: _ (u »f»),
«40»: _ (u »g»),
«41»: _ (u »k»),
«42»: _ (u »k»),
«43»: _ (u »k»),
«44»: _ (u »b»),
«45»: _ (u »g»),
«46»: _ (u »k»),
«47»: _ (u »f»),
«Na»: _ (u »»),
"-": _ (of "")
}

voorwaarden_moon_font = {
«0»: _ (u »1 ″),
«1»: _ (u »N»),
«2»: _ (u »O»),
«3»: _ (u »P»),
«4»: _ (u »Q»),
«5»: _ (u »R»),
«6»: _ (u »S»),
«7»: _ (u »T»),
«8»: _ (u »U»),
«9»: _ (u »V»),
«10»: _ (u »W»),
«11»: _ (u »X»),
«12»: _ (u »Y»),
«13»: _ (u »Z»),
«14»: _ (u »0 ″),
«15»: _ (u »0 ″),
«16»: _ (u »A»),
«17»: _ (u »B»),
«18»: _ (u »C»),
«19»: _ (u »D»),
«20»: _ (u »E»),
«21»: _ (u »F»),
«22»: _ (u »G»),
«23»: _ (u »H»),
«24»: _ (u »I»),
«25»: _ (u »J»),
«26»: _ (u »K»),
«27»: _ (u »L»),
«28»: _ (u »M»),
«29»: _ (u »1 ″),
«Na»: _ (u »»),
"-": _ (of "")
}

dag_van_week = {
"Vandaag": _ (of "Vandaag"),
«Maandag»: _ (u »maandag»),
«Dinsdag»: _ (u »dinsdag»),
«Woensdag»: _ (u »woensdag»),
«Donderdag»: _ (u »donderdag»),
«Vrijdag»: _ (u »Vrijdag»),
"Saturday": _ (u "Saturday"),
"Sunday": _ (u "Sunday")
}

day_of_week_short = {
"Today": _ (u "Now"),
«Maandag»: _ (u »ma»),
«Dinsdag»: _ (u »di»),
«Woensdag»: _ (u »wo»),
«Donderdag»: _ (u »do»),
«Vrijdag»: _ (u »Vrij»),
"Zaterdag": _ (u "Zat"),
"Sunday": _ (u "Sun")
}

day_of_week_en = {
"Today": _ (u "vandaag"),
«Maandag»: _ (u »maandag»),
«Dinsdag»: _ (of »dinsdag»),
«Woensdag»: _ (u »woensdag»),
«Donderdag»: _ (u »donderdag»),
«Vrijdag»: _ (u »Vrijdag»),
"Saturday": _ (u "Saturday"),
"Sunday": _ (u "Sunday")
}

day_of_week_short_nl = {
"Today": _ (u "vandaag"),
"Maandag": _ (u "mon"),
«Dinsdag»: _ (u »zee»),
«Woensdag»: _ (u »wed»),
«Donderdag»: _ (u »Don»),
«Vrijdag»: _ (u »vr»),
"Saturday": _ (u "sat"),
"Sunday": _ (u "dom")
}

day_of_week_fr = {
«Vandaag»: _ (u »Aujourd'hui»),
«Maandag»: _ (u »Lundi»),
«Dinsdag»: _ (u »Mardi»),
«Woensdag»: _ (u »Mercredi»),
«Donderdag»: _ (u »Jeudi»),
«Vrijdag»: _ (u »Vendredi»),
"Zaterdag": _ (u "Samedi"),
"Sunday": _ (u "Dimanche")
}

day_of_week_short_fr = {
«Vandaag»: _ (u »Auj»),
"Maandag": _ (u "Mon"),
«Dinsdag»: _ (u »maart»),
"Wednesday": _ (u "Mer"),
«Donderdag»: _ (u »Jeu»),
«Vrijdag»: _ (u »Kom»),
"Zaterdag": _ (u "Sam"),
"Sunday": _ (u "Dim")
}

lager_arrow_font = {
«N»: _ (u »i»),
«NNE»: _ (u »j»),
«NE»: _ (u »k»),
«ENE»: _ (u »l»),
«E»: _ (u »m»),
«ESE»: _ (u »n»),
"SE": _ (u "o"),
«SSE»: _ (u »p»),
«S»: _ (u »a»),
«SSW»: _ (u »b»),
«SW»: _ (u »c»),
"WSW": _ (u "d"),
«W»: _ (u »e»),
"WNW": _ (u "f"),
«NW»: _ (u »g»),
«NNW»: _ (u »h»),
«Nvt»: _ (u »«)
}

lager_text_es = {
«N»: _ (u »N»),
«NNO»: _ (u »NNO»),
«NE»: _ (u »NE»),
«ENE»: _ (u »ENE»),
«E»: _ (u »E»),
«ESE»: _ (u »ESE»),
«SE»: _ (u »SE»),
"SSE": _ (u "SSE"),
"Hun"),
"SSW": _ (u "SSO"),
«SW»: _ (u »SO»),
"WSW": _ (u "WOW"),
«W»: _ (u »O»),
«WNW»: _ (u »ONO»),
«NW»: _ (u »NEE»),
«NNW»: _ (u »NNO»),
«N / A»: _ (u »N \ A»)
}

lager_text_fr = {
«N»: _ (u »N»),
«NNO»: _ (u »NNO»),
«NE»: _ (u »NE»),
«ENE»: _ (u »ENE»),
«E»: _ (u »E»),
«ESE»: _ (u »ESE»),
«SE»: _ (u »SE»),
"SSE": _ (u "SSE"),
"Hun"),
"SSW": _ (u "SSO"),
«SW»: _ (u »SO»),
"WSW": _ (u "WOW"),
«W»: _ (u »O»),
«WNW»: _ (u »ONO»),
«NW»: _ (u »NEE»),
«NNW»: _ (u »NNO»),
«N / A»: _ (u »N \ A»)
}

klasse GlobalWeather:

huidige_condities = []
dagvoorspelling = []
nachtvoorspelling = []

locale = "in"

options = Geen
weerxmldoc = «»

TEMP_FILEPATH_CURRENT = "/tmp/conkyForecast-c-LOCATION.pkl"
TEMP_FILEPATH_DAYFORECAST = "/tmp/conkyForecast-df-LOCATION.pkl"
TEMP_FILEPATH_NIGHTFORECAST = "/tmp/conkyForecast-nf-LOCATION.pkl"
EXPIRY_MINUTES = 30
DEFAULT_SPACING = u »«

def __init __ (zelf, opties):

self.options = opties

if self.options.locale == Geen:
Probeer het volgende:
# self.locale = locale.getdefaultlocale () [0] [0: 2]
self.locale = «es» #uncommenteer deze regel om de Spaanse locale te forceren
# self.locale = "fr" #uncommenteer deze regel om de Franse locale af te dwingen
behalve:
print "landinstelling niet ingesteld"
anders:
# self.locale = self.options.locale
self.locale = «es» #uncommenteer deze regel om de Spaanse locale te forceren
# self.locale = "fr" #uncommenteer deze regel om de Franse locale af te dwingen

if self.options.verbose == Waar:
print >> sys.stdout, "locale ingesteld op", self.locale

def getText (zelf, nodelist):
rc = ""
voor knooppunt in nodelist:
als node.nodeType == node.TEXT_NODE:
rc = rc + knooppunt.gegevens
retourneer rc

def getSpaces (zelf, spaties):
string = u »»
if spaties == Geen:
string = zelf.DEFAULT_SPACING
anders:
voor i in bereik (0, spaties + 1):
string = string + u »«
returnstring

def isNumeric (self, string):
Probeer het volgende:
dummy = float (string)
terugkeer Waar
behalve:
retourneer False

def isConnectionAvailable (zelf):
# Zorg ervoor dat we toegang hebben tot de server van weather.com door de url te openen
Probeer het volgende:
Usock = urllib2.urlopen ('http://xoap.weather.com')
Usock.close ()
terugkeer Waar
behalve:
retourneer False

def getBearingText (zelf, lager):
lager = vlotter (lager)
indien lager <11.25:
terug u »N»
elif lager <33.75:
terug u »NNO»
elif lager <56.25:
terug u »NE»
elif lager <78.75:
terug u »JAN»
elif lager <101.25:
terug u »E»
elif lager <123.75:
terug u »ESE»
elif lager <146.25:
terug u »SE»
elif lager <168.75:
terug u »SSE»
elif lager <191.25:
terug u »S»
elif lager <213.75:
terug u »SSW»
elif lager <236.25:
terug u »SW»
elif lager <258.75:
terug u »WSW»
elif lager <281.25:
terug u »W»
elif lager <303.75:
terug u »WNW»
elif lager <326.25:
terug u »NW»
elif lager <348.75:
terug u »NNW»
anders:
terug «N / A»

def convertCelsiusToFahrenheit (zelf, temp):
return str (int (floor (((float (temp) * 9.0) /5.0) +32)))

def convertKilometresToMiles (self, dist):
return str (int (floor (float (dist) * 0.621371192)))

def convertMillibarsToInches (self, mb):
return str (int (floor (float (mb) /33.8582)))

def getTemplateList (zelf, sjabloon):

sjabloonlijst = []

voor template_part in template.split («{«):
if template_part! = «»:
voor template_part in template_part.split ("}"):
if template_part! = «»:
templatelist.append (u »» + template_part)

terugkeer sjabloonlijst

def getOutputText (self, datatype, startday, endday, night, shortweekday, imperial, hideunits, spaties):
#proberen:
output = u »»

# definieer huidige eenheden voor output
als hideunits == False:
als imperiaal == False:
tempunit = u »° C»
speedunit = u »km / u»
pressureunit = u »mb»
anders:
tempunit = u »° F»
speedunit = u »mph»
pressureunit = u »in»
anders:
tempunit = u »°»
speedunit = u »»
pressureunit = u »»

if startday == None: # huidige voorwaarden

als datatype == "DW":
als self.locale == "is":
if korteweekdag == Waar:
output = WeatherText.day_of_week_short_es [self.current_conditions [0] .day_of_week]
anders:
output = WeatherText.day_of_week_es [self.current_conditions [0] .day_of_week]
elif self.locale == "fr":
if korteweekdag == Waar:
output = WeatherText.day_of_week_short_fr [self.current_conditions [0] .day_of_week]
anders:
output = WeatherText.day_of_week_fr [self.current_conditions [0] .day_of_week]
anders:
if korteweekdag == Waar:
output = WeatherText.day_of_week_short [self.current_conditions [0] .day_of_week]
anders:
output = WeatherText.day_of_week [self.current_conditions [0] .day_of_week]
elif datatype == "WF": # weather font
output = WeatherText.conditions_weather_font [self.current_conditions [0] .condition_code]
elif datatype == "LT":
string = self.current_conditions [0] .low
if self.isNumeric (string) == True:
indien imperiaal == Waar:
string = self.convertCelsiusToFahrenheit (string)
string = string + tempeenheid
output = tekenreeks
elif datatype == "HT":
string = self.current_conditions [0] .hoog
if self.isNumeric (string) == True:
indien imperiaal == Waar:
string = self.convertCelsiusToFahrenheit (string)
string = string + tempeenheid
output = tekenreeks
elif datatype == "CC":
als self.locale == "is":
output = WeatherText.conditions_text_es [self.current_conditions [0] .condition_code]
elif self.locale == "fr":
output = WeatherText.conditions_text_fr [self.current_conditions [0] .condition_code]
anders:
output = WeatherText.conditions_text [self.current_conditions [0] .condition_code]
elif datatype == "CT":
output = self.current_conditions [0] .condition_text
elif datatype == "PC":
string = self.current_conditions [0] .precip
if self.isNumeric (string) == True:
string = string + u »%»
output = tekenreeks
elif datatype == "HM":
string = self.current_conditions [0] .vochtigheid
if self.isNumeric (string) == True:
string = string + u »%»
output = tekenreeks
elif datatype == "WD":
string = self.current_conditions [0] .wind_dir
if self.isNumeric (string) == True:
string = self.getBearingText (string)

als self.locale == "is":
output = WeatherText.bearing_text_es [string]
elif self.locale == "fr":
output = WeatherText.bearing_text_fr [string]
anders:
output = tekenreeks

elif datatype == "BF":
string = self.current_conditions [0] .wind_dir
if self.isNumeric (string) == True:
string = WeatherText.bearing_arrow_font [self.getBearingText (string)]
output = tekenreeks
elif datatype == "WS":
string = self.current_conditions [0] .wind_speed
if self.isNumeric (string) == True:
indien imperiaal == Waar:
string = self.convertKilometresToMiles (string)
string = string + snelheidseenheid
output = tekenreeks
elif datatype == "WG":
string = self.current_conditions [0] .wind_gusts
if self.isNumeric (string) == True:
indien imperiaal == Waar:
string = self.convertKilometresToMiles (string)
string = string + snelheidseenheid
output = tekenreeks
elif datatype == "CN":
output = self.current_conditions [0] .city
elif datatype == "SR":
output = self.current_conditions [0] .sunrise
elif datatype == "SS":
output = self.current_conditions [0] .sunset
elif datatype == "MP":
output = self.current_conditions [0] .moon_phase
elif datatype == "MF":
output = WeatherText.conditions_moon_font [self.current_conditions [0] .moon_icon]
elif datatype == "BR":
string = self.current_conditions [0] .bar_read
if self.isNumeric (string) == True:
indien imperiaal == Waar:
string = self.convertMillibarsToInches (string)
string = string + drukeenheid
output = tekenreeks
elif datatype == "BD":
output = self.current_conditions [0] .bar_desc
anders:
output = "\ nFOUT: onbekend gegevenstype aangevraagd"

anders: # prognosegegevens

if endday == None: # als er geen einddag is ingesteld, gebruik startdag
endday = startdag

if night == True: # nachtvoorspelling vereist

voor dagnummer binnen bereik (startdag, einddag + 1):

als datatype == "DW":
als self.locale == "is":
if korteweekdag == Waar:
output = output + self.getSpaces (spaties) + WeatherText.day_of_week_short_es [self.night_forecast [dag_nummer] .day_of_week]
anders:
output = output + self.getSpaces (spaties) + WeatherText.day_of_week_es [self.night_forecast [dag_nummer] .day_of_week]
elif self.locale == "fr":
if korteweekdag == Waar:
output = output + self.getSpaces (spaties) + WeatherText.day_of_week_short_fr [self.night_forecast [day_number] .day_of_week]
anders:
output = output + self.getSpaces (spaties) + WeatherText.day_of_week_fr [self.night_forecast [dag_nummer] .day_of_week]
anders:
if korteweekdag == Waar:
output = output + self.getSpaces (spaties) + WeatherText.day_of_week_short [self.night_forecast [dag_nummer] .day_of_week]
anders:
output = output + self.getSpaces (spaties) + WeatherText.day_of_week [self.night_forecast [dag_nummer] .day_of_week]
elif datatype == "WF": # weather font
output = output + self.getSpaces (spaties) + WeatherText.conditions_weather_font [self.night_forecast [dag_nummer] .condition_code]
elif datatype == "LT":
string = self.night_forecast [dagnummer] .low
if self.isNumeric (string) == True:
indien imperiaal == Waar:
string = self.convertCelsiusToFahrenheit (string)
string = string + tempeenheid
output = output + self.getSpaces (spaties) + string

elif datatype == "HT":
string = self.night_forecast [dag_nummer] .hoog
if self.isNumeric (string) == True:
indien imperiaal == Waar:
string = self.convertCelsiusToFahrenheit (string)
string = string + tempeenheid
output = output + self.getSpaces (spaties) + string
elif datatype == "CC":
als self.locale == "is":
output = output + self.getSpaces (spaties) + WeatherText.conditions_text_es [self.night_forecast [dagnummer] .condition_code]
elif self.locale == "fr":
output = output + self.getSpaces (spaties) + WeatherText.conditions_text_fr [self.night_forecast [dag_nummer] .condition_code]
anders:
output = output + self.getSpaces (spaties) + WeatherText.conditions_text [self.night_forecast [dagnummer] .condition_code]
elif datatype == "CT":
output = output + self.getSpaces (spaties) + self.night_forecast [dag_nummer] .condition_text
elif datatype == "PC":
string = self.night_forecast [dag_nummer] .precip
if self.isNumeric (string) == True:
string = string + u »%»
output = output + self.getSpaces (spaties) + string
elif datatype == "HM":
string = self.night_forecast [dag_nummer] .vochtigheid
if self.isNumeric (string) == True:
string = string + u »%»
output = output + self.getSpaces (spaties) + string
elif datatype == "WD":
string = self.night_forecast [dagnummer] .wind_dir
als self.locale == "is":
output = output + self.getSpaces (spaties) + WeatherText.bearing_text_es [string]
elif self.locale == "fr":
output = output + self.getSpaces (spaties) + WeatherText.bearing_text_fr [string]
anders:
output = output + self.getSpaces (spaties) + string

elif datatype == "BF":
output = output + self.getSpaces (spaties) + WeatherText.bearing_arrow_font [self.night_forecast [day_number] .wind_dir]
elif datatype == "WS":
string = self.night_forecast [dagnummer] .wind_speed
if self.isNumeric (string) == True:
indien imperiaal == Waar:
string = self.convertKilometresToMiles (string)
string = string + snelheidseenheid
output = output + self.getSpaces (spaties) + string
elif datatype == "WG":
string = self.night_forecast [dagnummer] .wind_gusts
if self.isNumeric (string) == True:
indien imperiaal == Waar:
string = self.convertKilometresToMiles (string)
string = string + snelheidseenheid
output = output + self.getSpaces (spaties) + string
elif datatype == "CN":
output = output + self.getSpaces (spaties) + self.night_forecast [dag_nummer] .stad
elif datatype == "SR":
output = output + self.getSpaces (spaties) + self.night_forecast [day_number] .sunrise
elif datatype == "SS":
output = output + self.getSpaces (spaties) + self.night_forecast [day_number] .sunset
elif datatype == "MP":
output = output + self.getSpaces (spaties) + self.night_forecast [dag_nummer] .maanfase
elif datatype == "MF":
output = output + self.getSpaces (spaties) + WeatherText.conditions_moon_font [self.night_forecast [day_number] .moon_icon]
elif datatype == "BR":
output = output + self.getSpaces (spaties) + self.night_forecast [dag_nummer] .bar_read
elif datatype == "BD":
output = output + self.getSpaces (spaties) + self.night_forecast [dag_nummer] .bar_desc
anders:
output = "\ nFOUT: onbekend gegevenstype aangevraagd"
breken

anders: # dagprognose gewenst

voor dagnummer binnen bereik (startdag, einddag + 1):

als datatype == "DW":
als self.locale == "is":
if korteweekdag == Waar:
output = output + self.getSpaces (spaties) + WeatherText.day_of_week_short_es [self.day_forecast [day_number] .day_of_week]
anders:
output = output + self.getSpaces (spaties) + WeatherText.day_of_week_es [self.day_forecast [day_number] .day_of_week]
elif self.locale == "fr":
if korteweekdag == Waar:
output = output + self.getSpaces (spaties) + WeatherText.day_of_week_short_fr [self.day_forecast [day_number] .day_of_week]
anders:
output = output + self.getSpaces (spaties) + WeatherText.day_of_week_fr [self.day_forecast [day_number] .day_of_week]
anders:
if korteweekdag == Waar:
output = output + self.getSpaces (spaties) + WeatherText.day_of_week_short [self.day_forecast [dag_nummer] .day_of_week]
anders:
output = output + self.getSpaces (spaties) + WeatherText.day_of_week [self.day_forecast [day_number] .day_of_week]
elif datatype == "WF": # weather font
output = output + self.getSpaces (spaties) + WeatherText.conditions_weather_font [self.day_forecast [day_number] .condition_code]
elif datatype == "LT":
string = self.day_forecast [day_number] .low
if self.isNumeric (string) == True:
indien imperiaal == Waar:
string = self.convertCelsiusToFahrenheit (string)
string = string + tempeenheid
output = output + self.getSpaces (spaties) + string
elif datatype == "HT":
string = self.day_forecast [dag_nummer] .hoog
if self.isNumeric (string) == True:
indien imperiaal == Waar:
string = self.convertCelsiusToFahrenheit (string)
string = string + tempeenheid
output = output + self.getSpaces (spaties) + string
elif datatype == "CC":
als self.locale == "is":
output = output + self.getSpaces (spaties) + WeatherText.conditions_text_es [self.day_forecast [day_number] .condition_code]
elif self.locale == "fr":
output = output + self.getSpaces (spaties) + WeatherText.conditions_text_fr [self.day_forecast [day_number] .condition_code]
anders:
output = output + self.getSpaces (spaties) + WeatherText.conditions_text [self.day_forecast [day_number] .condition_code]
elif datatype == "CT":
output = output + self.getSpaces (spaties) + self.day_forecast [day_number] .condition_text
elif datatype == "PC":
string = self.day_forecast [dag_nummer] .precip
if self.isNumeric (string) == True:
string = string + u »%»
output = output + self.getSpaces (spaties) + string
elif datatype == "HM":
string = self.day_forecast [dag_nummer] .vochtigheid
if self.isNumeric (string) == True:
string = string + u »%»
output = output + self.getSpaces (spaties) + string
elif datatype == "WD":
string = self.day_forecast [dag_nummer] .wind_dir

als self.locale == "is":
output = output + self.getSpaces (spaties) + WeatherText.bearing_text_es [string]
elif self.locale == "fr":
output = output + self.getSpaces (spaties) + WeatherText.bearing_text_fr [string]
anders:
output = output + self.getSpaces (spaties) + string

elif datatype == "BF":
output = output + self.getSpaces (spaties) + WeatherText.bearing_arrow_font [self.day_forecast [day_number] .wind_dir]
elif datatype == "WS":
string = self.day_forecast [dag_nummer] .wind_speed
if self.isNumeric (string) == True:
indien imperiaal == Waar:
string = self.convertKilometresToMiles (string)
string = string + snelheidseenheid
output = output + self.getSpaces (spaties) + string
elif datatype == "WG":
string = self.day_forecast [dagnummer] .wind_gusts
if self.isNumeric (string) == True:
indien imperiaal == Waar:
string = self.convertKilometresToMiles (string)
string = string + snelheidseenheid
output = output + self.getSpaces (spaties) + string
elif datatype == "CN":
output = output + self.getSpaces (spaties) + self.day_forecast [day_number] .city
elif datatype == "SR":
output = output + self.getSpaces (spaties) + self.day_forecast [day_number] .sunrise
elif datatype == "SS":
output = output + self.getSpaces (spaties) + self.day_forecast [day_number] .sunset
elif datatype == "MP":
output = output + self.getSpaces (spaties) + self.day_forecast [day_number] .moon_phase
elif datatype == "MF":
output = output + self.getSpaces (spaties) + WeatherText.conditions_moon_font [self.day_forecast [day_number] .moon_icon]
elif datatype == "BR":
output = output + self.getSpaces (spaties) + self.day_forecast [day_number] .bar_read
elif datatype == "BD":
output = output + self.getSpaces (spaties) + self.day_forecast [day_number] .bar_desc
anders:
output = u »\ nFOUT: onbekend gegevenstype aangevraagd»
breken

output = u »» + output.strip (u »«) # verlies voorloop- / volgspaties
terugkeer output

#behalve:
#print "getOutputText: Onverwachte fout:", sys.exc_info () [0]

def getOutputTextFromTemplate (zelf, sjabloon):
#proberen:

# sleutels tot sjabloongegevens
DATATYPE_KEY = "–datatype ="
STARTDAY_KEY = "–startday ="
ENDDAY_KEY = "–endday ="
NIGHT_KEY = "–nacht"
SHORTWEEKDAY_KEY = "–shortweekday"
IMPERIAL_KEY = "–imperial"
HIDEUNITS_KEY = "–hideunits"
SPACES_KEY = "–spaces ="

output = u »»

optiegevonden = Onwaar

#load het bestand
Probeer het volgende:
fileinput = open (self.options.template)
sjabloon = fileinput.read ()
fileinput.close ()
behalve:
output = u »Sjabloonbestand niet gevonden!»

templatelist = self.getTemplateList (sjabloon)

# laten we de lijst met sjablonen doorlopen en de uitvoer voor elk gevonden item bepalen
voor i in bereik (0, len (sjabloonlijst) -1):

pos = sjabloonlijst [i] .find (DATATYPE_KEY)
als pos! = -1:
optionfound = Waar
pos = pos + len (DATATYPE_KEY)
datatype = sjabloonlijst [i] [pos: pos + 4] .strip («}»). strip («{«). strip («-«). strip (»«)
anders:
datatype = Geen

pos = sjabloonlijst [i] .find (STARTDAY_KEY)
als pos! = -1:
optionfound = Waar
pos = pos + len (STARTDAY_KEY)
startday = int (sjabloonlijst [i] [pos: pos + 4] .strip ("}"). strip ("{"). strip ("-"). strip (""))
anders:
startday = Geen

pos = sjabloonlijst [i] .find (ENDDAY_KEY)
als pos! = -1:
optionfound = Waar
pos = pos + len (ENDDAY_KEY)
endday = int (sjabloonlijst [i] [pos: pos + 4] .strip ("}"). strip ("{"). strip ("-"). strip (""))
anders:
endday = Geen

pos = sjabloonlijst [i] .find (NIGHT_KEY)
als pos! = -1:
optionfound = Waar
night = waar
anders:
nacht = niet waar

pos = sjabloonlijst [i] .find (SHORTWEEKDAY_KEY)
als pos! = -1:
optionfound = Waar
shortweekday = Waar
anders:
korteweekdag = False

pos = sjabloonlijst [i] .find (IMPERIAL_KEY)
als pos! = -1:
optionfound = Waar
imperial = waar
anders:
imperiaal = onwaar

pos = sjabloonlijst [i] .find (HIDEUNITS_KEY)
als pos! = -1:
optionfound = Waar
hideunits = Waar
anders:
hideunits = Onwaar

pos = sjabloonlijst [i] .find (SPACES_KEY)
als pos! = -1:
optionfound = Waar
pos = pos + len (SPACES_KEY)
spaties = int (sjabloonlijst [i] [pos: pos + 4] .strip («}»). strip («{«). strip («-«). strip (»«))
anders:
spaties = 1

als optiegevonden == Waar:
templatelist [i] = self.getOutputText (datatype, startdag, einddag, nacht, korte weekdag, imperiaal, verbergeenheden, spaties)
optiegevonden = Onwaar

# doorloop de lijst om de uitvoer samen te voegen nu deze is gevuld
voor item in sjabloonlijst:
uitvoer = uitvoer + item

terugkeer output

#behalve:
#print "getOutputTextFromTemplate: Onverwachte fout:", sys.exc_info () [0]

def fetchData (zelf):

# haal altijd metrische gegevens op, gebruik gespreksfuncties op deze gegevens
file_path_current = self.TEMP_FILEPATH_CURRENT.replace ("LOCATION", self.options.location)
file_path_dayforecast = self.TEMP_FILEPATH_DAYFORECAST.replace ("LOCATION", self.options.location)
file_path_nightforecast = self.TEMP_FILEPATH_NIGHTFORECAST.replace ("LOCATION", self.options.location)

if self.isConnectionAvailable () == False:
als os.path.exists (file_path_current):
RefetchData = Onwaar
anders: # geen verbinding, geen cache, bang!
print "Er is geen internetverbinding beschikbaar en er zijn geen weergegevens in de cache."
elif self.options.refetch == Waar:
RefetchData = Waar
anders:
# moeten de gegevens opnieuw worden opgehaald?
als os.path.exists (file_path_current):
lastmodDate = time.localtime (os.stat (file_path_current) [ST_MTIME])
expiryDate = (datetime.datetime.today () - datetime.timedelta (minuten = self.EXPIRY_MINUTES)). timetuple ()

als expiryDate> lastmodDate:
RefetchData = Waar
anders:
RefetchData = Onwaar
anders:
RefetchData = Waar

# haal de huidige conditiegegevens op, hetzij van de website, hetzij door 'unpickling'
if RefetchData == Waar:

# verkrijg de huidige conditiegegevens van de xoap-service
Probeer het volgende:

# http://xoap.weather.com/weather/local/UKXX0103?cc=*&dayf=5&link=xoap∏=xoap&par=1061785028&key=e374effbfd74930b

url = 'http://xoap.weather.com/weather/local/' + self.options.location + '? cc = * & dayf = 8 & link = xoap∏ = xoap & par = 1061785028 & key = e374effbfd74930b & eenheid = m '
if self.options.verbose == Waar:
print >> sys.stdout, «ophalen van weergegevens van«, url

Usock = urllib2.urlopen (url)
xml = usock.read ()
Usock.close ()
self.weatherxmldoc = minidom.parseString (xml)
behalve:
print "fetchData: Unexpected error:", sys.exc_info () [0]
print "Kan geen contact opnemen met de weersbron voor de huidige omstandigheden"

# vertel de gebruiker of de locatie slecht is ...
found = xml.find ("Ongeldige locatie opgegeven")
indien gevonden! = -1:
print "Ongeldige locatie opgegeven"

# weergegevens ondervragen, in de klassenstructuur laden en deze inleggen
Probeer het volgende:

# maak lijsten met weergegevens op
zelf.current_conditions = []
zelf.day_forecast = []
self.night_forecast = []

# verzamel algemene gegevens
weer_n = self.weatherxmldoc.documentElement
location_n = weather_n.getElementsByTagName ('loc') [0]
city_n = location_n.getElementsByTagName ('dnam') [0]
city ​​= self.getText (city_n.childNodes)

# verzamel huidige conditiegegevens
day_of_week = u »Vandaag»
neerslag = u »N / A»
sunrise_n = location_n.getElementsByTagName ('sunr') [0]
sunrise = self.getText (sunrise_n.childNodes)
sunset_n = location_n.getElementsByTagName ('suns') [0]
sunset = self.getText (sunset_n.childNodes)
current_condition_n = weather_n.getElementsByTagName ('cc') [0]
current_desc_n = current_condition_n.getElementsByTagName ('t') [0]
current_desc = self.getText (current_desc_n.childNodes)
current_code_n = current_condition_n.getElementsByTagName ('icon') [0]
current_code = self.getText (current_code_n.childNodes)
current_temp_n = current_condition_n.getElementsByTagName ('tmp') [0]
current_temp = self.getText (current_temp_n.childNodes)
current_temp_feels_n = current_condition_n.getElementsByTagName ('flik') [0]
current_temp_feels = self.getText (current_temp_feels_n.childNodes)
bar_n = current_condition_n.getElementsByTagName ('bar') [0]
bar_read_n = bar_n.getElementsByTagName ('r') [0]
bar_read = self.getText (bar_read_n.childNodes)
bar_desc_n = bar_n.getElementsByTagName ('d') [0]
bar_desc = self.getText (bar_desc_n.childNodes)
wind_n = current_condition_n.getElementsByTagName ('wind') [0]
wind_speed_n = wind_n.getElementsByTagName ('s') [0]
wind_speed = self.getText (wind_speed_n.childNodes)
wind_gust_n = wind_n.getElementsByTagName ('windvlaag') [0]
wind_gusts = self.getText (wind_gust_n.childNodes)
wind_dir_n = wind_n.getElementsByTagName ('d') [0]
wind_direction = self.getText (wind_dir_n.childNodes)
vochtigheid_n = current_condition_n.getElementsByTagName ('hmid') [0]
vochtigheid = self.getText (vochtigheid_n.childNodes)
moon_n = current_condition_n.getElementsByTagName ('moon') [0]
moon_icon_n = moon_n.getElementsByTagName ('icon') [0]
moon_icon = self.getText (moon_icon_n.childNodes)
moon_phase_n = moon_n.getElementsByTagName ('t') [0]
moon_phase = self.getText (moon_phase_n.childNodes)
current_conditions_data = WeatherData (day_of_week, current_temp_feels, current_temp, current_code, current_desc, neerslag, vochtigheid, windrichting, windsnelheid, windstoten, stad, zonsopkomst, zonsondergang, maanfase, maan_pictogram, bar_lezen, bar_desc)
self.current_conditions.append (current_conditions_data)

# verzamel prognosegegevens
bar_read = u »Nvt»
bar_desc = u »Nvt»
moon_phase = u »Nvt»
moon_icon = u »na»
forecast_n = weather_n.getElementsByTagName ('dayf') [0]
day_nodes = forecast_n.getElementsByTagName ('dag')

voor dag in day_nodes:
day_of_week = day.getAttribute ('t')
day_of_year = day.getAttribute ('dt')
high_temp_n = day.getElementsByTagName ('hi') [0]
high_temp = self.getText (high_temp_n.childNodes)
low_temp_n = day.getElementsByTagName ('laag') [0]
low_temp = self.getText (low_temp_n.childNodes)

sunrise_n = day.getElementsByTagName ('sunr') [0]
sunrise = self.getText (sunrise_n.childNodes)
sunset_n = day.getElementsByTagName ('suns') [0]
sunset = self.getText (sunset_n.childNodes)

# dagvoorspellingsspecifieke gegevens
daytime_n = day.getElementsByTagName ('part') [0] # dag
condition_code_n = daytime_n.getElementsByTagName ('icon') [0]
condition_code = self.getText (condition_code_n.childNodes)
condition_n = daytime_n.getElementsByTagName ('t') [0]
condition = self.getText (condition_n.childNodes)
precip_n = daytime_n.getElementsByTagName ('ppcp') [0]
precip = self.getText (precip_n.childNodes)
vochtigheid_n = daytime_n.getElementsByTagName ('hmid') [0]
vochtigheid = self.getText (vochtigheid_n.childNodes)
wind_n = daytime_n.getElementsByTagName ('wind') [0]
wind_speed_n = wind_n.getElementsByTagName ('s') [0]
wind_speed = self.getText (wind_speed_n.childNodes)
wind_direction_n = wind_n.getElementsByTagName ('t') [0]
wind_direction = self.getText (wind_direction_n.childNodes)
wind_gusts_n = wind_n.getElementsByTagName ('windvlaag') [0]
wind_gusts = self.getText (wind_gusts_n.childNodes)
day_forecast_data = WeatherData (day_of_week, low_temp, high_temp, condition_code, condition, neerslag, vochtigheid, windrichting, windsnelheid, windstoten, stad, zonsopkomst, zonsondergang, moon_phase, moon_icon, bar_read, bar_desc)
self.day_forecast.append (day_forecast_data)

# nachtvoorspellingsspecifieke gegevens
daytime_n = day.getElementsByTagName ('part') [1] # nacht
condition_code_n = daytime_n.getElementsByTagName ('icon') [0]
condition_code = self.getText (condition_code_n.childNodes)
condition_n = daytime_n.getElementsByTagName ('t') [0]
condition = self.getText (condition_n.childNodes)
precip_n = daytime_n.getElementsByTagName ('ppcp') [0]
precip = self.getText (precip_n.childNodes)
vochtigheid_n = daytime_n.getElementsByTagName ('hmid') [0]
vochtigheid = self.getText (vochtigheid_n.childNodes)
wind_n = daytime_n.getElementsByTagName ('wind') [0]
wind_speed_n = wind_n.getElementsByTagName ('s') [0]
wind_speed = self.getText (wind_speed_n.childNodes)
wind_direction_n = wind_n.getElementsByTagName ('t') [0]
wind_direction = self.getText (wind_direction_n.childNodes)
wind_gusts_n = wind_n.getElementsByTagName ('windvlaag') [0]
wind_gusts = self.getText (wind_gusts_n.childNodes)
night_forecast_data = WeatherData (day_of_week, low_temp, high_temp, condition_code, condition, neerslag, vochtigheid, windrichting, windsnelheid, windstoten, stad, zonsopkomst, zonsondergang, moon_phase, moon_icon, bar_read, bar_desc)
self.night_forecast.append (night_forecast_data)

# pekel de gegevens voor de volgende keer!
fileoutput = open (file_path_current, 'w')
pickle.dump (self.current_conditions, fileoutput)
fileoutput.close ()

fileoutput = open (file_path_dayforecast, 'w')
pickle.dump (self.day_forecast, bestandsoutput)
fileoutput.close ()

fileoutput = open (file_path_nightforecast, 'w')
pickle.dump (self.night_forecast, bestandsoutput)
fileoutput.close ()

behalve:
print "fetchData: Unexpected error:", sys.exc_info () [0]
print "Kan de weergegevens niet opvragen"

else: # haal weergegevens op uit ingelijste klassenbestanden
if self.options.verbose == Waar:
print >> sys.stdout, «ophalen van weergegevens uit bestand:«, file_path_current

fileinput = open (file_path_current, 'r')
self.current_conditions = pickle.load (bestandsinvoer)
fileinput.close ()

if self.options.verbose == Waar:
print >> sys.stdout, "dagvoorspellingsgegevens ophalen uit bestanden:", file_path_dayforecast, file_path_nightforecast

fileinput = open (file_path_dayforecast, 'r')
self.day_forecast = pickle.load (bestandsinvoer)
fileinput.close ()

if self.options.verbose == Waar:
print >> sys.stdout, «dagvoorspellingsgegevens ophalen uit bestanden:«, file_path_nightforecast, file_path_nightforecast

fileinput = open (file_path_nightforecast, 'r')
self.night_forecast = pickle.load (bestandsinvoer)
fileinput.close ()

def outputData (zelf):
#proberen:

if self.options.template! = Geen:

output = self.getOutputTextFromTemplate (self.options.template)

anders:

output = self.getOutputText (self.options.datatype, self.options.startday, self.options.endday, self.options.night, self.options.shortweekday, self.options.imperial, self.options.hideunits, self. options.spaces)

print output.encode ("utf-8")

#behalve:
#print «outputData: Onverwachte fout:«, sys.exc_info () [0]

if __name__ == "__main__":

parser = CommandLineParser ()
(opties, args) = parser.parse_args ()

if options.verbose == Waar:
print >> sys.stdout, "location:", options.location
print >> sys.stdout, "imperial:", options.imperial
print >> sys.stdout, "datatype:", options.datatype
print >> sys.stdout, "night:", options.night
print >> sys.stdout, "start dag:", options.startday
print >> sys.stdout, "end day:", options.endday
print >> sys.stdout, "spaces:", options.spaces
print >> sys.stdout, "verbose:", options.verbose
print >> sys.stdout, "refetch:", options.refetch

# maak een nieuw globaal weerobject
weather = GlobalWeather (opties)
weather.fetchData ()
weather.outputData ()

We maken het bestand ~ / Conky / scripts / myweather.template

gedit ~ / Conky / scripts / myweather.template

we plakken het volgende erin:

{–Datatype = DW –startday = 1}: {–datatype = CC –startday = 1}
{–Datatype = HT –startday = 1} / {–datatype = LT –startday = 1} Wind van {–datatype = WD –startday = 1} naar {–datatype = WS –startday = 1}
Vochtigheid: {–datatype = HM –startday = 1} Neerslag: {–datatype = PC –startday = 1}
Zonsopgang: {–datatype = SR –startday = 1} Zonsondergang: {–datatype = SS –startday = 1}
----------------
{–Datatype = DW –startday = 2}: {–datatype = CC –startday = 2}
{–Datatype = HT –startday = 2} / {–datatype = LT –startday = 2} Wind van {–datatype = WD –startday = 2} naar {–datatype = WS –startday = 2}
Vochtigheid: {–datatype = HM –startday = 2} Neerslag: {–datatype = PC –startday = 2}
Zonsopgang: {–datatype = SR –startday = 2} Zonsondergang: {–datatype = SS –startday = 2}
----------------
{–Datatype = DW –startday = 3}: {–datatype = CC –startday = 3}
{–Datatype = HT –startday = 3} / {–datatype = LT –startday = 3} Wind van {–datatype = WD –startday = 3} naar {–datatype = WS –startday = 3}
Vochtigheid: {–datatype = HM –startday = 3} Neerslag: {–datatype = PC –startday = 3}
Zonsopgang: {–datatype = SR –startday = 3} Zonsondergang: {–datatype = SS –startday = 3}
----------------
{–Datatype = DW –startday = 4}: {–datatype = CC –startday = 4}
{–Datatype = HT –startday = 4} / {–datatype = LT –startday = 4} Wind van {–datatype = WD –startday = 4} naar {–datatype = WS –startday = 4}
Vochtigheid: {–datatype = HM –startday = 4} Neerslag: {–datatype = PC –startday = 4}
Zonsopgang: {–datatype = SR –startday = 4} Zonsondergang: {–datatype = SS –startday = 4}

We maken het bestand ~ / Conky / scripts / mail / conkyEmail.py (we moeten de mailmap maken)

gedit ~ / Conky / scripts / mail / conkyEmail.py

en we plakken het volgende erin:

os importeren
tekenreeks importeren

#Voer hieronder uw gebruikersnaam en wachtwoord in tussen dubbele aanhalingstekens
# bijv. gebruikersnaam = »gebruikersnaam» en wachtwoord = »wachtwoord»
gebruikersnaam = »YOUR_USUARIO_SINARROBA«
wachtwoord = »JE SLEUTEL«

com = »wget -O - https: //» + gebruikersnaam + »:» + wachtwoord + »@ mail.google.com / mail / feed / atom –geen-check-certificaat»

temp = os.popen (com)
msg = temp.read ()
index = string.find (msg, » ​
index2 = string.find (msg, » ​
fc = int (msg [index + 11: index2])

als fc == 0:
print "0 nieuwe"
anders:
print str (fc) + »nieuw»

Dus nu heb je 7 bestanden:

In de map: ~
-> .startconky << - uitvoerbaar maken

In de map: ~ / Conky
-> conkymain
-> conkyforecast
-> conkymail

en in de map: ~ / Conky / scripts
-> conkyForecast.py << - uitvoerbaar maken
-> myweather.template

en in de map: ~ / Conky / scripts / mail
conkyEmail.py << - uitvoerbaar maken

En dat is het, verduidelijkingen, waar staat / home / user / ... je gebruikersnaam gaat en in het gedeelte waar de Gmail-gegevens naartoe gaan, heb ik in kleuren gemarkeerd waar je je gegevens moet plaatsen.

om het conky-proces te beëindigen, schrijft u naar een console

dood conky

om conky write naar een console uit te voeren

./.startconky

als je eenmaal alles hebt aangepast, als je wilt dat conky elke sessie begint

Systeem—> Voorkeuren—> Sessies en in opstartprogramma's voegen we het toe

In Name kunnen we Conky schrijven, in Order ./.startconky waarmee het zal starten elke keer dat u de pc aanzet.

Dat is het, ik hoop dat het je helpt.


Laat je reactie achter

Uw e-mailadres wordt niet gepubliceerd. Verplichte velden zijn gemarkeerd met *

*

*

  1. Verantwoordelijk voor de gegevens: Miguel Ángel Gatón
  2. Doel van de gegevens: Controle SPAM, commentaarbeheer.
  3. Legitimatie: uw toestemming
  4. Mededeling van de gegevens: De gegevens worden niet aan derden meegedeeld, behalve op grond van wettelijke verplichting.
  5. Gegevensopslag: database gehost door Occentus Networks (EU)
  6. Rechten: u kunt uw gegevens op elk moment beperken, herstellen en verwijderen.