Author: andar

Revision: 5337

Log:
        Update create_plugin script a bit

Diff:
Modified: trunk/deluge/scripts/create_plugin.py
===================================================================
--- trunk/deluge/scripts/create_plugin.py       2009-06-02 00:56:05 UTC (rev 
5336)
+++ trunk/deluge/scripts/create_plugin.py       2009-06-02 00:57:04 UTC (rev 
5337)
@@ -48,9 +48,9 @@
 
     name = options.name.replace(" ", "_")
     safe_name = name.lower()
-    plugin_base = os.path.realpath(os.path.join(options.path, name))
+    plugin_base = os.path.realpath(os.path.join(options.path, safe_name))
     src = os.path.join(plugin_base, safe_name)
-    template_dir = os.path.join(src,"template")
+    template_dir = os.path.join(src, "template")
 
     if os.path.exists(plugin_base):
         print "the directory %s already exists, delete it first" % plugin_base
@@ -77,7 +77,7 @@
     print "creating folders.."
     os.mkdir(plugin_base)
     os.mkdir(src)
-    os.mkdir(os.path.join(src,"data"))
+    os.mkdir(os.path.join(src, "data"))
     os.mkdir(template_dir)
 
     print "creating files.."
@@ -195,7 +195,7 @@
 COMMON = """
 def get_resource(filename):
     import pkg_resources, os
-    return pkg_resources.resource_filename("extractor", os.path.join("data", 
filename))
+    return pkg_resources.resource_filename("%(safe_name)s", 
os.path.join("data", filename))
 """
 
 GTKUI = """



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to