Onkohan chromesta apua ?
Sillä saa tulostettua DOM-puun tiedostoksi.
google-chrome --headless --disable-gpu --dump-dom http://ilmatieteenlaitos.fi/paikallissaa >saa.html
En jaksanut tutkia enempää itl:n sivuja, mutta siitä saattaa olla apua sinulle.
Onkohan chromesta apua ?
Sillä saa tulostettua DOM-puun tiedostoksi.
google-chrome --headless --disable-gpu --dump-dom http://ilmatieteenlaitos.fi/paikallissaa >saa.html
En jaksanut tutkia enempää itl:n sivuja, mutta siitä saattaa olla apua sinulle.
ja chromium kanssa, ja myös vivaldi!
kiitos, tästä on tosiaan apua; raskas riippuvuus se on, mutta monilla on varmaan joku näistä asennettu.
tutkin nyt myös phantomjs jne.
nettisivu käyttää uudet kuvakkeet, ja ne un numeroitu eri tavalla, jonka takia scripta ei näytä kuvakkeita enää.
kohta tulee kunnon päivistys, mutta tällä saa scriptan taas toimimaan:
#!/bin/bash
path=( "img/fc-img-svg" "img/fc-img-orig" "img/fc-img-alpha80" "img/fc-img-less-alpha80" "img/fc-img-gray" )
sep="________________"
cat <<EOF
Download icons straight from the Finnish Meteorological Insitute's website.
===========================================================================
Apply some conversions.
=======================
Colorful vector icons as seen here: http://ilmatieteenlaitos.fi/saa/helsinki
The SVG icons (unusable by conky) will be downloaded first, then
converted to 4 different 60px PNG icon sets:
- original
- original, 80% opacity
- 90% brightness, 90% saturation, 80% opacity
- 70% brightness, 0% saturation, 100% opacity
It is best if you call this script from the base directory of the
conky-itl-weather repository. Make sure you have write permissions for the
present working directory.
Requirements: wget for downloading, imagemagick (convert) for all conversions.
EOF
read -p "Press <Enter> to continue... "
! which wget >/dev/null 2>&1 && echo "Could not find wget in PATH. No downloading. :(" && exit 1
i=0
mkdir -vp "${path[i]}" || exit 1
printf "\nThe vector icon set is now downloaded to %s\n" "${path[i]}"
for ((c=0 ; c<200 ; c++)); do
wget -O "${path[i]}/$c.svg" https://cdn.fmi.fi/symbol-images/smartsymbol/p/$c.svg >/dev/null 2>&1
printf '.'
done
printf "\n"
# delete all the empty files wget produced.
find "${path[i]}" -maxdepth 1 -empty -type f -delete
! which convert >/dev/null 2>&1 && echo "Could not find convert (imagemagick) in PATH. No conversion. :(" && exit 1
for (( i=1 ; i<${#path[@]} ; i++ )); do
printf "\nCreating directory ${path[i]}\n$sep\n"
mkdir -p "${path[i]}"
case $i in
1) command="convert -background none -resize 60"
;;
2) command="convert -background none -channel A -evaluate divide 1.25 +channel -resize 60"
;;
3) command="convert -background none -channel A -evaluate divide 1.25 +channel -define modulate:colorspace=HSB -modulate 100,90,90 -resize 60"
;;
4) command="convert -background none -grayscale rec601luma -define modulate:colorspace=HSB -modulate 100,100,70 -resize 60"
;;
esac
printf "\nUsing command \n$command\nConverting ${path[0]}/*.svg to ${path[i]}/*.png\n$sep\n";
for file in "${path[0]}"/*.svg; do
$command "$file" "${file%.*}.png"
done
mv "${path[0]}"/*.png "${path[i]}/"
done
printf "\nSuccess! Now you can adjust your config file to include one of:\n"
for (( i=1 ; i<${#path[@]} ; i++ )); do
echo "FcImgDir=\"${path[i]}\""
done
Kaikki on nyt päivitetty kunnolla, testattu debianilla (stretch) ja Xubuntulla (16.04.3) mun oman archlinux koneen lisäksi.
Olen muuttanut aika paljon, joten kannattaa katsoa vähän tarkemmin jos jotain ei toimi ihan automaattisesti.
Huom: kuvakkeita on nyt pakko ladata itse ilmatieteen laitoksen verkkosivuilta! mutta geticons.sh-scriptan avulla se onnistuu helposti.
kuvakaappaus
https://github.com/ohnonot/conky-itl-weather/
Tästä lähtien projektini löytyvät täältä:
https://notabug.org/ohnonot -
tai täältä:
https://framagit.org/ohnonot (molemmat aina samalla tasolla).
Hei, ilmeisesti päädyttiin GitHubin käyttäjäksi ja sittemmin GitLabin käyttöliittymää muistuttavaan , mutta Git-keskusteluun heittäisin vielä jotain. Gitea toimii vaikka Raspberry Pi:llä ja siten olisi omassa hallinnassa.
Hieno projekti!
Gitea
https://gitea.io/en-us/
https://docs.gitea.io/en-us/comparison/
Hei, tämä projekti on vielä elossa.
Pahoittelen etten jaksa dokumentoida kaiken kahdella kielellä - tässä englanninkielinen README:
The scripts in this repository will
Clone the repository or download the zip to a folder of your choice. Keep in mind that all files need to stay together.
From framagit.org | Download zip file
From notabug.org | Download zip file
For the main script get_weather:
jshon, curl, sed (for conky formatted output)
bash
the coreutils package
a conky version with lua support - on Arch Linux this most likely means conky-lua-nv or conky-cairo.
On other distros, if you’re unsure, look out for a package named conky-all. The script itself doesn’t require conky; its plain text output can be used elsewhere.
Some helper scripts have their own dependencies, but they will tell you if something’s missing.
yad for location-select (available in most distro repositories)
Recommended: the “Roboto Condensed” font, available through most ditributions’ package management.
$ cd /path/to/conky-fmi-weather/
$ ./location-select
Allows you to choose your location & immediately display the forecast window.
If one location is enough, you can start the conky immediately after choosing a location for the first time.
The location and additional stuff can be configured in files/get_weather.d/conf. Please see the output of
$ ./get_weather -h
This script gets weather data from widget.weatherproof.fi/android/androidwidget.php, downloads icons from cdn.fmi.fi/symbol-images/smartsymbol/v31/p, and wind gust data from opendata.fmi.fi.
Most data and files are cached in files/get_weather.d and only re-downloaded when necessary.
get_location_id bash script will get your location’s id from geonames.org (location-select uses it).get_weather_opendata bash script is an alternative implementation that uses only data from opendata.fmi.fi.wfs_describeStoredQueries bash script allows you to get more information about what sort of data you canAll scripts have -h switches for help.
If you don’t know conky, check this out first.
chmod +x ./get_* (this normally shouldn’t be an issue).lua templates in files (used by ./get_weather to create conky-readable output).*.my.lua first, and remember to refer to them as such when calling the script, e.g.: ./get_weather -f my.luafiles/get_weather.d; all files therein can be deleted if they’re corrupt.If you found a bug please open an issue in one of the git repos.
But it’s more precise than most “weather widgets”.
The reason I use this is because IMHO a locally retrieved weather forecast is always superior to one from a large international
website somewhere halfway around the globe, and because the Finnish Metereological Institute is not trying to sell me anything.
I am trying as far as possible to mirror the website’s way of displaying information (except for making it vertical).
It might look unwieldy, but it has more granularity and objectivity than most weather widgets out there.
Happy customizing and don’t forget to look out the window sometimes!