How to use the merlin.export function in merlin

To help you get started, we’ve selected a few merlin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pyre / pyre / packages / merlin / spells / AssetManager.py View on Github external
    @merlin.export
    def main(self, plexus, argv):
        """
        This is the action of the spell
        """
        # check
        try:
            # whether this project is initialized
            project = self.vfs['project']
        # if it isn't
        except self.vfs.NotFoundError:
            # complain
            return plexus.error.log("not a merlin project; did you forget to cast 'merlin init'?")
        # get hold of my local filesystem
        local = self.vfs['pyre/startup']
        # dump it
        # local.dump()
github pyre / pyre / packages / merlin / spells / About.py View on Github external
    @merlin.export(tip='dump the application virtual filesystem')
    def vfs(self, plexus, **kwds):
        """
        Dump the application virtual filesystem
        """
        # get the prefix
        prefix = self.prefix or '/merlin'
        # build the report
        report = '\n'.join(plexus.vfs[prefix].dump())
        # sign in
        plexus.info.line('vfs: prefix={!r}'.format(prefix))
        # dump
        plexus.info.log(report)
        # all done
        return
github pyre / pyre / packages / merlin / spells / About.py View on Github external
    @merlin.export(tip="print out the license and terms of use")
    def license(self, plexus, **kwds):
        """
        Print the license and terms of use of the merlin package
        """
        # make some space
        plexus.info.line()
        # print the license
        plexus.info.log(merlin.meta.license)
        # all done
        return
github pyre / pyre / packages / merlin / spells / About.py View on Github external
    @merlin.export(tip='dump the application configuration namespace')
    def nfs(self, plexus, **kwds):
        """
        Dump the application configuration namespace
        """
        # get the prefix
        prefix = self.prefix or 'merlin'
        # show me
        plexus.pyre_nameserver.dump(prefix)
        # all done
        return
github pyre / pyre / packages / merlin / spells / Copyright.py View on Github external
    @merlin.export
    def main(self, plexus, argv):
        """
        Print the copyright note of the merlin package
        """
        # invoke the package function
        merlin.copyright()
        # all done
        return
github pyre / pyre / packages / merlin / spells / About.py View on Github external
    @merlin.export(tip="print out the acknowledgments")
    def credits(self, plexus, **kwds):
        """
        Print the acknowledgments
        """
        # make some space
        plexus.info.line()
        # print the acknowledgments
        plexus.info.log(merlin.meta.acknowledgments)
        # all done
        return
github pyre / pyre / packages / merlin / spells / About.py View on Github external
    @merlin.export(tip="print the version number")
    def version(self, plexus, **kwds):
        """
        Print the version of the merlin package
        """
        # print the version number as simply as possible
        print(merlin.meta.version)
        # all done
        return
github pyre / pyre / packages / merlin / spells / License.py View on Github external
    @merlin.export
    def main(self, plexus, argv):
        """
        Print out the license and terms of use of the merlin package
        """
        # invoke the package function
        merlin.license()
        # all done
        return
github pyre / pyre / packages / merlin / spells / Version.py View on Github external
    @merlin.export
    def main(self, plexus, argv):
        """
        Print the version of the merlin package
        """
        # invoke the package function
        print(merlin._merlin_header)
        # all done
        return