Esempio n. 1
0
def search(request, page_title):
	# note: these parameters can only be used if the timeline has never been
	# processed yet. if the timeline has been processed, the existing
	# parameters will be used. if we did not use this policy, anyone with
	# knowledge of the URL structure could do significant harm to the data.
	# Parameters can be changed through the admin interface
	separate = request.GET.get('separate', None) == 'yes'
	single_section = request.GET.get('single_section', '')
	result = Timeline.process_wikipedia_page(page_title,
		p = { 'separate': separate, 'single_section': single_section })
	if not result:
		raise Http404
	else:
		return HttpResponse(result.details_json(), content_type = 'application/json')
Esempio n. 2
0
 def handle(self, *args, **options):
     # Timeline.process_wikipedia_page(options['title'], True)
     # Timeline.process_wikipedia_page('Timeline_of_\'s-Hertogenbosch', True)
     Timeline.process_wikipedia_page('Timeline_of_World_War_II', True)
Esempio n. 3
0
def getWikipediaTimeline(page_title):
    Timeline.process_wikipedia_page(page_title)