Ejemplo n.º 1
0
 def save_to_file(self, filename, text):
     text = style2telnet(text).replace('\r\n', '\n')
     with codecs.open('static/%s' % filename, "w", encoding="utf8") as f:
         f.write(text)
     self.message(u'修改系统档案成功!')
     self.pause()
     self.goto_back()
Ejemplo n.º 2
0
Archivo: view.py Proyecto: sscst/argon
 def finish(self, e=None):
     logger.debug('finish - [%s]', e)
     if e is None:
         self.session['lastpid'] = self.post['pid']
         self.goto_back()
     if e is True:
         post = self.next_loader(self.post['pid'])
     else:
         post = self.prev_loader(self.post['pid'])
     if not post:
         self.session['lastpid'] = self.post['pid']
         self.goto_back()
     self.post = post
     manager.readmark.set_read(self.userid, self.session['lastboardname'],
                               post['pid'])
     text = self.wrapper_post(self.post)
     text = style2telnet(text)
     self.reset_text(text, 0)
Ejemplo n.º 3
0
Archivo: view.py Proyecto: sscst/argon
 def finish(self, e=None):
     logger.debug('finish - [%s]', e)
     if e is None:
         self.session['lastpid'] = self.post['pid']
         self.goto_back()
     if e is True:
         post = self.next_loader(self.post['pid'])
     else :
         post = self.prev_loader(self.post['pid'])
     if not post:
         self.session['lastpid'] = self.post['pid']
         self.goto_back()
     self.post = post
     manager.readmark.set_read(self.userid,
                               self.session['lastboardname'],
                               post['pid'])
     text = self.wrapper_post(self.post)
     text = style2telnet(text)
     self.reset_text(text, 0)
Ejemplo n.º 4
0
 def tidy_text(self, text):
     return style2telnet(text)