2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2024-11-22 02:59:49 +00:00

zwave_pepperlinks.csv.gz: update with jeedomconvert/openzwave (Forum #64275)

git-svn-id: https://svn.fhem.de/fhem/trunk@13033 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-01-10 09:01:34 +00:00
parent 315d7a44b0
commit e1d9dd8726
2 changed files with 3 additions and 6 deletions

View File

@ -3,16 +3,13 @@
use strict;
use warnings;
# Details in Forum #35416
if(@ARGV != 0) {
print "Usage:\n".
" git clone https://github.com/jeedom/plugin-openzwave".
" cd plugin-openzwave/core/config".
" gzip -d < <fhem>/FHEM/lib/zwave_pepperlinks.csv.gz > zwave_pepperlinks.csv\n".
" perl <fhem>/contrib/zwave_jeedomconvert.pl\n".
" diff zwave_pepperlinks.csv zwave_pepperlinks.csv.NEW\n".
" upload shown *.jpg files to fhem.de/deviceimages\n".
" copy *.jpg to fhem.de/deviceimages/zwave\n".
" gzip < zwave_pepperlinks.csv.NEW > <fhem>/FHEM/lib/zwave_pepperlinks.csv.gz\n".
" rm *.jpg\n";
exit 1;
@ -29,7 +26,7 @@ while(my $l = <F1>) {
}
close(F1);
open(F1, "find devices -name *.jpg -print|") || die("Cant start find: $!\n");
open(F1, "find devices -name \\*.jpg -print|") || die("Cant start find: $!\n");
while(my $l = <F1>) {
chomp($l);
next if($l !~ m,/(\d+)\.(\d+)\.(\d+)_(.*)$,);
@ -39,7 +36,7 @@ while(my $l = <F1>) {
$file =~ s/ /_/g;
print "WARNING: bogus filename $file\n" if($file =~ m/^[^0-9A-Za-z.]+$/);
$m{$i}{P} = $file;
symlink($l, $file);
`cp "$l" $file`;
}
close(F1);