Exemple #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)
Exemple #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)
Exemple #3
0
 def get_url(self):
     """
     See _KoMacroTool.get_url for docs
     """
     return "template://%s/%s.template" % (self.id,
                                           koToolbox2.slugify(self.name))
Exemple #4
0
 def get_url(self):
     """
     See _KoMacroTool.get_url for docs
     """
     return "snippet2://%s/%s.snippet" % (self.id,
                                          koToolbox2.slugify(self.name))
Exemple #5
0
 def get_url(self):
     """
     See _KoMacroTool.get_url for docs
     """
     return "template://%s/%s.template" % (self.id, koToolbox2.slugify(self.name))
Exemple #6
0
 def get_url(self):
     """
     See _KoMacroTool.get_url for docs
     """
     return "snippet2://%s/%s.snippet" % (self.id, koToolbox2.slugify(self.name))