cleanup
This commit is contained in:
parent
a1c6ab0c09
commit
1dfb7e5067
@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
#coding: utf-8
|
|
||||||
|
|
||||||
from models import Base, Feed, Feedinfo, Entry
|
from models import Base, Feed, Feedinfo, Entry
|
||||||
|
|
||||||
@ -217,3 +216,5 @@ def main():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
3
ddate.py
3
ddate.py
@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from calendar import isleap
|
from calendar import isleap
|
||||||
|
|
||||||
@ -41,3 +40,5 @@ class ddate(object):
|
|||||||
if(self.dApostleHoliday):
|
if(self.dApostleHoliday):
|
||||||
msg = u'%s\nCelebrate %s!' % (msg, strHolidayApostle)
|
msg = u'%s\nCelebrate %s!' % (msg, strHolidayApostle)
|
||||||
return msg
|
return msg
|
||||||
|
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
@ -1,31 +1,9 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
#coding: utf-8
|
|
||||||
|
|
||||||
#from sqlalchemy import create_engine, Table, Column, Integer, Text, String, Boolean, DateTime, MetaData, ForeignKey, desc
|
|
||||||
#from sqlalchemy.orm import sessionmaker, relation, backref
|
|
||||||
from sqlalchemy.ext.declarative import declarative_base
|
from sqlalchemy.ext.declarative import declarative_base
|
||||||
#from datetime import datetime, timedelta
|
|
||||||
#from time import mktime
|
|
||||||
#import feedparser
|
|
||||||
#import re
|
|
||||||
#import sys
|
|
||||||
#import urllib
|
|
||||||
#import urllib2
|
|
||||||
#import hn
|
|
||||||
#import html2text
|
|
||||||
#import ConfigParser
|
|
||||||
#import pprint
|
|
||||||
#from optparse import OptionParser
|
|
||||||
#from cStringIO import StringIO
|
|
||||||
#from email.mime.multipart import MIMEMultipart
|
|
||||||
#from email.mime.text import MIMEText
|
|
||||||
#from email.header import Header
|
|
||||||
#from email import Charset
|
|
||||||
#from email.generator import Generator
|
|
||||||
#import smtplib
|
|
||||||
|
|
||||||
Base = declarative_base()
|
Base = declarative_base()
|
||||||
|
|
||||||
from models.feed import Feed
|
from models.feed import Feed
|
||||||
from models.feedinfo import Feedinfo
|
from models.feedinfo import Feedinfo
|
||||||
from models.entry import Entry
|
from models.entry import Entry
|
||||||
|
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
#coding: utf-8
|
|
||||||
|
|
||||||
from sqlalchemy import Column, Integer, ForeignKey, String, Text, DateTime
|
from sqlalchemy import Column, Integer, ForeignKey, String, Text, DateTime
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from time import mktime
|
from time import mktime
|
||||||
@ -143,3 +140,4 @@ class Entry(Base):
|
|||||||
text += '\n\nEnclosures:\n%s' % self.enclosures
|
text += '\n\nEnclosures:\n%s' % self.enclosures
|
||||||
return text
|
return text
|
||||||
|
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
#coding: utf-8
|
|
||||||
|
|
||||||
from sqlalchemy import Column, Integer, String, Boolean, Enum
|
from sqlalchemy import Column, Integer, String, Boolean, Enum
|
||||||
from sqlalchemy.orm import relationship, backref
|
from sqlalchemy.orm import relationship, backref
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
@ -107,3 +104,5 @@ class Feed(Base):
|
|||||||
def reset(self):
|
def reset(self):
|
||||||
self.entries[:] = []
|
self.entries[:] = []
|
||||||
self.feedinfo = None
|
self.feedinfo = None
|
||||||
|
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
#coding: utf-8
|
|
||||||
|
|
||||||
from sqlalchemy import Column, Integer, ForeignKey, String, DateTime
|
from sqlalchemy import Column, Integer, ForeignKey, String, DateTime
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from random import randint
|
from random import randint
|
||||||
@ -56,3 +53,4 @@ class Feedinfo(Base):
|
|||||||
waitminutes = 0
|
waitminutes = 0
|
||||||
self.nextfetch = (datetime.now() + timedelta(minutes=waitminutes))
|
self.nextfetch = (datetime.now() + timedelta(minutes=waitminutes))
|
||||||
|
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
Loading…
Reference in New Issue
Block a user