[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [nepomuk-web-extractor] dev-scripts/newplugin: Fix bugs in
From:       Artem Serebriyskiy <v.for.vandal () gmail ! com>
Date:       2011-07-18 7:58:17
Message-ID: 20110718075817.AA607A60A6 () git ! kde ! org
[Download RAW message or body]

Git commit 7031896ee4df093208c72419d8290de91cfef752 by Artem Serebriyskiy.
Committed on 17/07/2011 at 11:19.
Pushed by artemserebriyskiy into branch 'master'.

Fix bugs in newplugin dev script

1. Year is now determined using 'date' command instead of being
hardcoded
2. Fix hardcoded author in kcm.[h|cpp].template

M  +1    -1    dev-scripts/newplugin/plugin.cpp.template
M  +1    -1    dev-scripts/newplugin/plugin.h.template
M  +1    -1    dev-scripts/newplugin/kcm.cpp.template
M  +1    -1    dev-scripts/newplugin/kcm.h.template
M  +1    -1    dev-scripts/newplugin/executive.cpp.template
M  +1    -1    dev-scripts/newplugin/executivereply.cpp.template
M  +1    -1    dev-scripts/newplugin/executive.h.template
M  +1    -1    dev-scripts/newplugin/executivereply.h.template
M  +5    -1    dev-scripts/newplugin/newplugin.py
M  +1    -1    dev-scripts/newplugin/reply.h.template
M  +1    -1    dev-scripts/newplugin/plugin_config.h.in.template

http://commits.kde.org/nepomuk-web-extractor/7031896ee4df093208c72419d8290de91cfef752

diff --git a/dev-scripts/newplugin/executive.cpp.template \
b/dev-scripts/newplugin/executive.cpp.template index 9e34047..caa73ae 100644
--- a/dev-scripts/newplugin/executive.cpp.template
+++ b/dev-scripts/newplugin/executive.cpp.template
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2010 by $author <$mail>
+   Copyright (C) $year  by $author <$mail>
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/dev-scripts/newplugin/executive.h.template \
b/dev-scripts/newplugin/executive.h.template index 096ae50..dcc9fbc 100644
--- a/dev-scripts/newplugin/executive.h.template
+++ b/dev-scripts/newplugin/executive.h.template
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2010 by $author <$mail>
+   Copyright (C) $year  by $author <$mail>
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/dev-scripts/newplugin/executivereply.cpp.template \
b/dev-scripts/newplugin/executivereply.cpp.template index c3f77c7..6c2ac7b 100644
--- a/dev-scripts/newplugin/executivereply.cpp.template
+++ b/dev-scripts/newplugin/executivereply.cpp.template
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2010 by $author <$mail>
+   Copyright (C) $year  by $author <$mail>
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/dev-scripts/newplugin/executivereply.h.template \
b/dev-scripts/newplugin/executivereply.h.template index 3f55b8f..e7cd7d4 100644
--- a/dev-scripts/newplugin/executivereply.h.template
+++ b/dev-scripts/newplugin/executivereply.h.template
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2010 by $author <$mail>
+   Copyright (C) $year  by $author <$mail>
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/dev-scripts/newplugin/kcm.cpp.template \
b/dev-scripts/newplugin/kcm.cpp.template index 24c197b..f1ce2ca 100644
--- a/dev-scripts/newplugin/kcm.cpp.template
+++ b/dev-scripts/newplugin/kcm.cpp.template
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2010 by Artem Serebriyskiy <v.for.vandal@gmail.com>
+   Copyright (C) $year  by $author <$mail>
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/dev-scripts/newplugin/kcm.h.template \
b/dev-scripts/newplugin/kcm.h.template index 551f080..2e5b208 100644
--- a/dev-scripts/newplugin/kcm.h.template
+++ b/dev-scripts/newplugin/kcm.h.template
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2010 by Artem Serebriyskiy <v.for.vandal@gmail.com>
+   Copyright (C) $year  by $author <$mail>
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/dev-scripts/newplugin/newplugin.py b/dev-scripts/newplugin/newplugin.py
index 99d7894..2d6b334 100755
--- a/dev-scripts/newplugin/newplugin.py
+++ b/dev-scripts/newplugin/newplugin.py
@@ -67,7 +67,7 @@ def check_generate(namespace,git_enabled):
 		exit()
 
 	if version is None:
-		namespace['version'] = 0.1
+		namespace['version'] = 1
 
 	if namespace['kcm'] is None:
 		namespace['kcm'] = False
@@ -100,6 +100,10 @@ def check_generate(namespace,git_enabled):
 		if mail is None or len(mail) == 0:
 			namespace['mail'] = ""
 
+	# Get year
+	year = Popen(["date", "+%Y"], stdout=PIPE).communicate()[0].rstrip("\n \t")
+	namespace["year"] = year
+
 
 
 	generate(namespace)
diff --git a/dev-scripts/newplugin/plugin.cpp.template \
b/dev-scripts/newplugin/plugin.cpp.template index ae8b103..822d5cf 100644
--- a/dev-scripts/newplugin/plugin.cpp.template
+++ b/dev-scripts/newplugin/plugin.cpp.template
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2010 by $author <$mail>
+   Copyright (C) $year  by $author <$mail>
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/dev-scripts/newplugin/plugin.h.template \
b/dev-scripts/newplugin/plugin.h.template index f6032e8..c096781 100644
--- a/dev-scripts/newplugin/plugin.h.template
+++ b/dev-scripts/newplugin/plugin.h.template
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2010 by $author <$mail>
+   Copyright (C) $year  by $author <$mail>
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/dev-scripts/newplugin/plugin_config.h.in.template \
b/dev-scripts/newplugin/plugin_config.h.in.template index 8c7b4d6..0d4289c 100644
--- a/dev-scripts/newplugin/plugin_config.h.in.template
+++ b/dev-scripts/newplugin/plugin_config.h.in.template
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2010 by $author <$mail>
+   Copyright (C) $year  by $author <$mail>
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/dev-scripts/newplugin/reply.h.template \
b/dev-scripts/newplugin/reply.h.template index 1fbd69c..c19988e 100644
--- a/dev-scripts/newplugin/reply.h.template
+++ b/dev-scripts/newplugin/reply.h.template
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2010 by $author <$mail>
+   Copyright (C) $year  by $author <$mail>
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic