#!/usr/bin/python """ UNIT TESTER """ import sys sys.path.append( '../web/' ) import MVC as MVC MVC = MVC.MVC() JobLog = MVC.loadModel('JobLog') ModelCompany = MVC.loadModel('Company') ModelCompanies = MVC.loadModel('Companies') ModelCompanyTypes = MVC.loadModel('CompanyTypes') ModelNews = MVC.loadModel('News') ModelNewsSources = MVC.loadModel('NewsSources') ModelPerson = MVC.loadModel('Person') Wikipedia = MVC.loadDriver('Wikipedia') GoogleNews = MVC.loadDriver('GoogleNews') Debugger = MVC.loadHelper('Debug') if __name__ == "__main__": ModelNewsSources.updateCounts()
#!/usr/bin/python """ Data Exporter Creates two exports, one for site backup, one for public sharing """ import os import sys import urllib2 from bs4 import BeautifulSoup sys.path.append( '../web/' ) import MVC as MVC MVC = MVC.MVC() Backup = MVC.loadHelper( 'Backup' ) print MVC.app_dir print 'Backing Up Database' # Backup.database( phile='public', tables=['companies', 'company_meta', 'people', 'people_meta'] ) # Backup.database( phile='backup')