Personal wiki notebook (not under development)

dump_emails.py 613B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/python2.4
  2. import os
  3. import os.path
  4. from controller.Database import Database
  5. class Dumper( object ):
  6. def __init__( self, database ):
  7. self.database = database
  8. self.dump_emails()
  9. def dump_emails( self ):
  10. email_addresses = self.database.select_many( unicode, u"select distinct email_address from luminotes_user_current where email_address is not null;" )
  11. for address in email_addresses:
  12. if address:
  13. print address
  14. def main( args ):
  15. database = Database( cache = {} )
  16. ranker = Dumper( database )
  17. if __name__ == "__main__":
  18. import sys
  19. main( sys.argv[ 1: ] )