Example #1
0
 def get_url(self):
     if self._attributes['language'] == 'JavaScript':
         ext = ".js"
     elif self._attributes['language'] == 'Python':
         ext = ".py"
     # The important parts are the ID and the extension, so the
     # name itself can be sluggified so the autosave routine
     # doesn't get caught up with special characters in the name.
     return "macro2://%s/%s%s" % (self.id, koToolbox2.slugify(self.name), ext)
Example #2
0
 def get_url(self):
     if self._attributes['language'] == 'JavaScript':
         ext = ".js"
     elif self._attributes['language'] == 'Python':
         ext = ".py"
     # The important parts are the ID and the extension, so the
     # name itself can be sluggified so the autosave routine
     # doesn't get caught up with special characters in the name.
     return "macro2://%s/%s%s" % (self.id, koToolbox2.slugify(self.name), ext)
Example #3
0
 def get_url(self):
     """
     See _KoMacroTool.get_url for docs
     """
     return "template://%s/%s.template" % (self.id,
                                           koToolbox2.slugify(self.name))
Example #4
0
 def get_url(self):
     """
     See _KoMacroTool.get_url for docs
     """
     return "snippet2://%s/%s.snippet" % (self.id,
                                          koToolbox2.slugify(self.name))
Example #5
0
 def get_url(self):
     """
     See _KoMacroTool.get_url for docs
     """
     return "template://%s/%s.template" % (self.id, koToolbox2.slugify(self.name))
Example #6
0
 def get_url(self):
     """
     See _KoMacroTool.get_url for docs
     """
     return "snippet2://%s/%s.snippet" % (self.id, koToolbox2.slugify(self.name))