Example #1
0
 def _process(self):
     if yes_no("Process Ticket Bookings?"):
         self._process_bookings()
     if yes_no("Process Ticket Cancellations?"):
         self._process_cancellations()
     if yes_no("Process Discount Codes?"):
         self._process_discounts()
Example #2
0
 def event_id_input(self):
     is_valid = False
     accepted = False
     while not is_valid or not accepted:
         event_id = raw_input("Please enter the DoAttend event ID: ")
         is_valid = self.set_event_id(event_id)
         if is_valid:
             title = self.get_event_title()
             self.event_title = title
             if title:
                 accepted = yes_no("Is %s the correct event?" % title)
             else:
                 accepted = yes_no("Could not retrieve the title for the event. Please check %s to confirm if %s is the correct event. Is it the correct event?" % (self.doattend.get_url(), event_id))
Example #3
0
 def new(self, event):
     path = 'events/%s' % event
     if os.path.exists(path):
         if yes_no('%s already exists. Do you want to replace it?' % event):
             shutil.rmtree(path)
         else:
             sys.exit(1)
     shutil.copytree('eventbase', path)
     print "Event created in %s. Please edit the data and templates as required by you." % event
Example #4
0
#!/usr/bin/env python

import os
from mechanize import Browser, RobustFactory
from eventer.doattend import DoAttend
from eventer.funnel import Funnel
from helpers import yes_no

browser = Browser(factory=RobustFactory())
print "Mechanize browser is available in object 'browser'..."
if yes_no("Log into DoAttend? "):
	doattend = DoAttend(browser)
	print "Use the object 'doattend' to take actions..."

if yes_no("Log into Funnel? "):
	funnel = Funnel(browser)
	print "Use the object 'funnel' to take actions..."

os.environ['PYTHONINSPECT'] = 'True'