mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
Meta.pm: enhanced support link generator, no release_status visible for stable modules
git-svn-id: https://svn.fhem.de/fhem/trunk@18904 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1a0d772fdb
commit
590dfadd11
@ -1131,6 +1131,12 @@ sub CreateMetadataList ($$$) {
|
||||
|
||||
my $linecount = 1;
|
||||
foreach my $mAttr (@mAttrs) {
|
||||
next
|
||||
if (
|
||||
$mAttr eq 'release_status'
|
||||
&& ( !defined( $modMeta->{release_status} )
|
||||
|| $modMeta->{release_status} eq 'stable' )
|
||||
);
|
||||
next
|
||||
if ( $mAttr eq 'copyright' && !defined( $modMeta->{x_copyright} ) );
|
||||
next
|
||||
@ -1291,7 +1297,7 @@ sub CreateMetadataList ($$$) {
|
||||
. $webname
|
||||
. '/docs/commandref.html#'
|
||||
. ( $modName eq 'Global' ? 'global' : $modName )
|
||||
. '" target="_blank">local</a>';
|
||||
. '" target="_blank">Offline version</a>';
|
||||
}
|
||||
|
||||
if ( defined( $modMeta->{resources} )
|
||||
@ -1301,11 +1307,7 @@ sub CreateMetadataList ($$$) {
|
||||
my $title =
|
||||
defined( $modMeta->{resources}{x_commandref}{title} )
|
||||
? $modMeta->{resources}{x_commandref}{title}
|
||||
: (
|
||||
$modMeta->{resources}{x_commandref}{web} =~
|
||||
m/^(?:https?:\/\/)?([^\/]+).*/i ? $1
|
||||
: $modMeta->{resources}{x_commandref}{web}
|
||||
);
|
||||
: 'Online version';
|
||||
|
||||
my $url =
|
||||
$modMeta->{resources}{x_commandref}{web};
|
||||
@ -1387,7 +1389,17 @@ sub CreateMetadataList ($$$) {
|
||||
$l .=
|
||||
'<a href="'
|
||||
. $modMeta->{resources}{x_support_community}{web}
|
||||
. '" target="_blank">'
|
||||
. '" target="_blank"'
|
||||
. (
|
||||
defined(
|
||||
$modMeta->{resources}{x_support_community}{description}
|
||||
)
|
||||
? ' title="'
|
||||
. $modMeta->{resources}{x_support_community}{description}
|
||||
. '"'
|
||||
: ''
|
||||
)
|
||||
. '>'
|
||||
. $title . '</a>';
|
||||
}
|
||||
|
||||
@ -1514,7 +1526,7 @@ sub CreateMetadataList ($$$) {
|
||||
$url .= $modMeta->{resources}{repository}{x_branch_dev};
|
||||
|
||||
$l .=
|
||||
' <a href="'
|
||||
' | <a href="'
|
||||
. $url
|
||||
. '" target="_blank">'
|
||||
. $modMeta->{resources}{repository}{x_branch_dev}
|
||||
@ -1536,7 +1548,7 @@ sub CreateMetadataList ($$$) {
|
||||
|
||||
$l .=
|
||||
uc( $modMeta->{resources}{repository}{type} )
|
||||
. ' Repository: '
|
||||
. ' repository: '
|
||||
. $modMeta->{resources}{repository}{url};
|
||||
|
||||
if (
|
||||
|
@ -202,7 +202,7 @@ our %supportForumCategories = (
|
||||
},
|
||||
'Unterstützende Dienste' => {
|
||||
description =>
|
||||
'Themen zu unterstützenden Diensten und Modulen wie z.B. Calendar, HCS, Twiligth, Weather, etc.',
|
||||
'Themen zu unterstützenden Diensten und Modulen wie z.B. Calendar, HCS, Twilight, Weather, etc.',
|
||||
boardId => 44,
|
||||
|
||||
'Kalendermodule' => {
|
||||
@ -1018,14 +1018,6 @@ m/(^#\s+(?:\d{1,2}\.\d{1,2}\.(?:\d{2}|\d{4})\s+)?[^v\d]*(v?(?:\d{1,3}\.\d{1,3}(?
|
||||
}
|
||||
}
|
||||
|
||||
# Add info from MAINTAINER.txt
|
||||
if ( defined( $moduleMaintainers{$modName} ) ) {
|
||||
$modMeta->{x_fhem_maintenance} = $moduleMaintainers{$modName};
|
||||
}
|
||||
elsif ( defined( $packageMaintainers{$modName} ) ) {
|
||||
$modMeta->{x_fhem_maintenance} = $packageMaintainers{$modName};
|
||||
}
|
||||
|
||||
# Get some other info about fhem.pl
|
||||
if ( $modMeta->{x_file}[2] eq 'fhem.pl' ) {
|
||||
$versionFrom = 'attr/featurelevel+vcs';
|
||||
@ -1354,8 +1346,10 @@ sub __GetMaintainerdata {
|
||||
$line[2] =~ m/\(deprecated\)/i
|
||||
? 'deprecated'
|
||||
: 'supported'; # Lifecycle status
|
||||
|
||||
$line[2] =~ s/\s*\(.*\)\s*$//; # remove all comments
|
||||
$maintainer[3] =
|
||||
$line[2] =~ /^\(deprecated\)$/
|
||||
$maintainer[2] eq 'deprecated'
|
||||
? ()
|
||||
: __GetSupportForum( $line[2] ); # Forum support section
|
||||
|
||||
@ -1422,6 +1416,13 @@ sub __GetSupportForum {
|
||||
my ($req) = @_;
|
||||
my %ret;
|
||||
|
||||
if ( $req =~ /^http/ ) {
|
||||
$ret{web} = $req;
|
||||
$ret{title} = $1
|
||||
if ( $req =~ m/^.+:\/\/([^\/]+).*/ && $1 !~ /fhem\.de$/ );
|
||||
return \%ret;
|
||||
}
|
||||
|
||||
my %umlaute = (
|
||||
"ä" => "ae",
|
||||
"Ä" => "Ae",
|
||||
@ -1442,7 +1443,8 @@ sub __GetSupportForum {
|
||||
);
|
||||
my $umlautRevKeys = join( "|", keys(%umlauteRev) );
|
||||
|
||||
$req =~ s/($umlautRevKeys)/$umlauteRev{$1}/g; # yes, we know umlauts
|
||||
$req =~ s/($umlautRevKeys)/$umlauteRev{$1}/g # yes, we know umlauts
|
||||
unless ( $req =~ /uerung/ );
|
||||
|
||||
foreach my $cat ( keys %supportForumCategories ) {
|
||||
foreach my $board ( keys %{ $supportForumCategories{$cat} } ) {
|
||||
@ -1488,7 +1490,10 @@ sub __GetSupportForum {
|
||||
|| $subBoard eq 'description'
|
||||
|| $subBoard eq 'language' );
|
||||
|
||||
if ( lc($subBoard) eq lc($req) ) {
|
||||
my $reqSub = $req;
|
||||
$reqSub =~ s/$board\///;
|
||||
|
||||
if ( lc($subBoard) eq lc($reqSub) ) {
|
||||
|
||||
# we found a sub board
|
||||
if (
|
||||
@ -1959,7 +1964,6 @@ sub __SetXVersion {
|
||||
"description": "FHEM® (eingetragene Marke) ist ein in Perl geschriebener, GPL lizensierter Server für die Heimautomatisierung. Man kann mit FHEM häufig auftretende Aufgaben automatisieren, wie z.Bsp. Lampen / Rollladen / Heizung / usw. schalten, oder Ereignisse wie Temperatur / Feuchtigkeit / Stromverbrauch protokollieren und visualisieren.\\n\\nDas Programm läuft als Server, man kann es über WEB, dedizierte Smartphone Apps oder telnet bedienen, TCP Schnittstellen für JSON und XML existieren ebenfalls.\\n\\nUm es zu verwenden benötigt man einen 24/7 Rechner (NAS, RPi, PC, Mac Mini, etc.) mit einem Perl Interpreter und angeschlossene Hardware-Komponenten wie CUL-, EnOcean-, Z-Wave-USB-Stick, etc. für einen Zugang zu den Aktoren und Sensoren.\\n\\nAusgesprochen wird es ohne h, wie bei feminin."
|
||||
}
|
||||
},
|
||||
"release_status": "testing",
|
||||
"prereqs": {
|
||||
"runtime": {
|
||||
"requires": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user