Esempio n. 1
0
    def read(self):
        if not self.values:
            return "Read what?"

        book = self.values[0]
        if book[-4:] != '.txt':
            return "Plain text file only. %s purist." % self.ego.nick

        name = "%s_%s.txt" % (int(time.mktime(
            time.localtime())), self.lastsender)
        path = '%s/%s' % (self.cx.settings.media.books, name)

        savefromweb(book, path)
        with open(path) as b:
            for line in b:
                self.mark(line)

        return 'Eh, I like his older, funnier work'
Esempio n. 2
0
    def read(self):
        if not self.values:
            return "Read what?"


        book = self.values[0]
        if book[-4:] != '.txt':
            return "Plain text file only. %s purist." % self.ego.nick


        name = "%s_%s.txt" % ( int(time.mktime(time.localtime())), self.lastsender )
        path = '%s/%s' % (self.cx.settings.media.books, name)

        savefromweb(book, path)
        with open(path) as b:
            for line in b:
                self.mark(line)

        return 'Eh, I like his older, funnier work'
Esempio n. 3
0
    def read(self):
        if not self.values:
            self.chat("Read what?")
            return

        book = self.values[0]
        if book[-4:] != '.txt':
            self.chat("Plain text file only. %s purist." % NICK)
            return

        name = "%s_%s.txt" % ( int(time.mktime(time.localtime())), self.lastsender )
        path = BOOKS + name

        savefromweb(book, path)
        with open(path) as b:
            for line in b:
                self.mark(line)

        return 'Eh, I like his older, funnier work'