mirror of
https://github.com/fhem/fhem-mirror.git
synced 2024-11-22 02:59:49 +00:00
Meta.pm: add more META.json examples
git-svn-id: https://svn.fhem.de/fhem/trunk@19092 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c36da0646d
commit
94681ef493
@ -2263,7 +2263,10 @@ sub CreateMetadataList ($$$) {
|
||||
$l .= $tdOpen;
|
||||
|
||||
if ( $mAttr eq 'release_date' ) {
|
||||
if ( defined( $modMeta->{x_vcs} ) ) {
|
||||
if ( defined( $modMeta->{x_release_date} ) ) {
|
||||
$l .= $modMeta->{x_release_date};
|
||||
}
|
||||
elsif ( defined( $modMeta->{x_vcs} ) ) {
|
||||
$l .= $modMeta->{x_vcs}[7];
|
||||
}
|
||||
else {
|
||||
|
@ -2249,7 +2249,7 @@ m/(^#\s+(?:\d{1,2}\.\d{1,2}\.(?:\d{2}|\d{4})\s+)?[^v\d]*(v?(?:\d{1,3}\.\d{1,3}(?
|
||||
}
|
||||
}
|
||||
|
||||
# generate x_version
|
||||
# generate x_version and x_release_date
|
||||
__SetXVersion($modMeta);
|
||||
|
||||
return "$@" if ($@);
|
||||
@ -3067,6 +3067,12 @@ sub __SetXVersion {
|
||||
if ( defined( $modMeta->{release_status} )
|
||||
&& $modMeta->{release_status} ne 'stable' );
|
||||
}
|
||||
|
||||
# set x_release_date
|
||||
unless ( defined( $modMeta->{x_release_date} ) ) {
|
||||
$modMeta->{x_release_date} = $modMeta->{x_vcs}[7]
|
||||
if ( defined( $modMeta->{x_vcs} ) );
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -1,3 +1,18 @@
|
||||
###############################################################################
|
||||
# About metadata in FHEM
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# This aims to be a full example of all possible options to document
|
||||
# a FHEM module or FHEM package.
|
||||
# It does not necessarially mean that every attribute will need to be used or
|
||||
# makes sense in every case. Also, some combinations might be weired, depending
|
||||
# on the actual use case. That is, if your module is part of FHEM core
|
||||
# (hosted on svn.fhem.de) or externally on a different plattform, which is then
|
||||
# considered a 3rd-party module.
|
||||
#
|
||||
# Please consult https://wiki.fhem.de/wiki/Meta for more information.
|
||||
#
|
||||
|
||||
=pod
|
||||
|
||||
=encoding utf8
|
||||
@ -114,14 +129,30 @@
|
||||
"description": "Hier kann eine erweiterte Beschreibung oder Dokumentation stehen."
|
||||
}
|
||||
},
|
||||
"license": "GPL_2",
|
||||
"license": [
|
||||
"apache_2_0",
|
||||
"mozilla_1_0"
|
||||
],
|
||||
"version": "v1.0.0",
|
||||
"x_release_date": "1970-01-01",
|
||||
"release_status": "stable",
|
||||
"author": [
|
||||
"I am the maintainer <firstname.lastname@gmail.com>",
|
||||
"I am a co-author <firstname.lastname@gmail.com>",
|
||||
"I am another co-author <firstname.lastname@gmail.com>",
|
||||
"I might be the orignal author <firstname.lastname@gmail.com>"
|
||||
"I am another co-author w/o email <>",
|
||||
"I might be the orignal author long time ago <firstname.lastname@gmail.com>"
|
||||
],
|
||||
"x_fhem_maintainer": [
|
||||
"maintainer-myFhemForumAndSVNusername",
|
||||
"co-maintainer-myFhemForumAndSVNusername",
|
||||
"another-author-myFhemForumAndSVNusername",
|
||||
"original-author-myFhemForumAndSVNusername"
|
||||
],
|
||||
"x_fhem_maintainer_github": [
|
||||
"maintainer-myGithubUsername",
|
||||
"co-maintainer-myGithubUsername",
|
||||
null,
|
||||
null
|
||||
],
|
||||
"keywords": [
|
||||
"additional",
|
||||
@ -148,8 +179,32 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"x_prereqs_nodejs": {
|
||||
"runtime": {
|
||||
"requires": {
|
||||
"node": 8.0,
|
||||
"npm": 0
|
||||
},
|
||||
"recommends": {
|
||||
},
|
||||
"suggests": {
|
||||
}
|
||||
}
|
||||
},
|
||||
"x_prereqs_python": {
|
||||
"runtime": {
|
||||
"requires": {
|
||||
"pip": 0
|
||||
},
|
||||
"recommends": {
|
||||
},
|
||||
"suggests": {
|
||||
}
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"bugtracker": {
|
||||
"mailto": "bugs@example.com",
|
||||
"web": "https://github.com/fhem/myModule/issues",
|
||||
"x_web_title": "Github Issues for fhem/myModule"
|
||||
},
|
||||
@ -173,22 +228,31 @@
|
||||
"x_filepath": "subdir/",
|
||||
"x_raw": "https://raw.githubusercontent.com/fhem/myModule/master/subdir/00_myModule.pm"
|
||||
},
|
||||
"x_commandref" : {
|
||||
"title" : "I want to name it differently, not 'Online version'",
|
||||
"web" : "https://myModuleHasAhomepage.com/myModuleHasAnExternalOnlineCommandRef.html"
|
||||
},
|
||||
"x_support_commercial": {
|
||||
"mailto": "support@mycompany.com",
|
||||
"title": "My Company",
|
||||
"web": "https://support.mycompany.com"
|
||||
},
|
||||
"x_support_community": {
|
||||
"rss": "https://forum.fhem.de/index.php?action=.xml;type=rss;board=33",
|
||||
"title": "FHEM Forum: Server - Linux",
|
||||
"web": "https://forum.fhem.de/index.php/board,33.0.html"
|
||||
}
|
||||
"rss": "https://forum.fhem.de/index.php?action=.xml;type=rss;board=19",
|
||||
"title": "I want to have a special title. Prefix 'FHEM Forum: ' will be added if URL is forum.fhem.de",
|
||||
"web": "https://forum.fhem.de/index.php/board,19.0.html",
|
||||
"subCommunity" : {
|
||||
"rss" : "https://forum.fhem.de/index.php?action=.xml;type=rss;board=93",
|
||||
"title" : "This sub-board will be first contact point",
|
||||
"web" : "https://forum.fhem.de/index.php/board,93.0.html"
|
||||
}
|
||||
},
|
||||
"x_wiki" : {
|
||||
"title" : "I want to have a special title. Prefix 'FHEM Wiki: ' will be added if URL is wiki.fhem.de",
|
||||
"web" : "https://wiki.fhem.de/wiki/myModule_is_simply_different"
|
||||
}
|
||||
},
|
||||
"x_fhem_maintainer": [
|
||||
"myFhemForumAndSVNusername"
|
||||
],
|
||||
"x_fhem_maintainer_github": [
|
||||
"myGithubUsername"
|
||||
]
|
||||
"x_support_status": "supported"
|
||||
}
|
||||
=end :application/json;q=META.json
|
||||
|
||||
|
@ -8,6 +8,9 @@
|
||||
"author": [
|
||||
"I am the maintainer <firstname.lastname@gmail.com>"
|
||||
],
|
||||
"x_fhem_maintainer": [
|
||||
"myFhemForumAndSVNusername"
|
||||
],
|
||||
"keywords": [
|
||||
"additional",
|
||||
"keywords",
|
||||
@ -32,11 +35,5 @@
|
||||
"suggests": {
|
||||
}
|
||||
}
|
||||
},
|
||||
"x_fhem_maintainer": [
|
||||
"myFhemForumAndSVNusername"
|
||||
],
|
||||
"x_fhem_maintainer_github": [
|
||||
"myGithubUsername"
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user