Example #1
0
    class PluginAutoRenamer(Plugin):
        def __init__(self, application):
            Plugin.__init__(self, application)
            self._autorenamer = AutoRenamer(self, application)

        @property
        def name(self):
            return u"AutoRenamer"

        @property
        def description(self):
            description = _(
                u'''Plugin allows to rename all pages automatically using the first line of the page or automatically rename just those pages where you place (:autorename:) mark'''
            )
            author = _(
                u'''<b>Author:</b> Vitalii Koshura ([email protected])'''
            )
            return u"""{description}\n\n{author}""".format(
                description=description, author=author)

        @property
        def url(self):
            return u"https://github.com/AenBleidd/OutwikerPlugin"

        @property
        def version(self):
            return __version__

        def initialize(self):
            self._initlocale(u"AutoRenamer")
            self._autorenamer.initialize()

        def destroy(self):
            self._autorenamer.destroy()

        def _initlocale(self, domain):
            langdir = unicode(
                os.path.join(os.path.dirname(__file__), "locale"),
                getOS().filesEncoding)
            global _
            try:
                _ = self._init_i18n(domain, langdir)
            except BaseException, e:
                print e
            set_(_)
Example #2
0
    class PluginAutoRenamer(Plugin):
        def __init__(self, application):
            Plugin.__init__(self, application)
            self._autorenamer = AutoRenamer(self, application)

        @property
        def name(self):
            return u"AutoRenamer"

        @property
        def description(self):
            description = _(
                u"""Plugin allows to rename all pages automatically using the first line of the page or automatically rename just those pages where you place (:autorename:) mark"""
            )
            author = _(u"""<b>Author:</b> Vitalii Koshura ([email protected])""")
            return u"""{description}\n\n{author}""".format(description=description, author=author)

        @property
        def url(self):
            return u"https://github.com/AenBleidd/OutwikerPlugin"

        @property
        def version(self):
            return __version__

        def initialize(self):
            self._autorenamer.initialize()
            self._initlocale(u"AutoRenamer")

        def destroy(self):
            self._autorenamer.destroy()

        def _initlocale(self, domain):
            langdir = unicode(os.path.join(os.path.dirname(__file__), "locale"), getOS().filesEncoding)
            global _
            try:
                _ = self._init_i18n(domain, langdir)
            except BaseException, e:
                print e
            set_(_)
Example #3
0
		def __init__ (self, application):
			Plugin.__init__ (self, application)
			self._autorenamer = AutoRenamer(self, application)
Example #4
0
 def __init__(self, application):
     Plugin.__init__(self, application)
     self._autorenamer = AutoRenamer(self, application)