Ejemplo n.º 1
0
def fix_hyperlink_protocol(composer, href):
	if urlparse(href).netloc != '': return href
	
	match = parse_slide_name_from_href(href)

	if match is None:
		return href
	else:
		return composer("gotoSlide", match + ".zip")
Ejemplo n.º 2
0
def fix_hyperlink_protocol(composer, href):
	if urlparse(href).netloc != '': return href
	
	def index_to_slide(path_string):
		# replace any index.html refs with a veeva name
		slide_name = re.match("(?:.*/)*([^/]+)/index.htm(?:l)?$", path_string)
		if slide_name:
			path_string = re.sub("index.htm(?:l)$", slide_name.group(1)+".html", path_string)
		return path_string

	match = parse_slide_name_from_href(index_to_slide(href))

	if match is None:
		return href
	else:
		return composer("gotoSlide", match + ".zip")
Ejemplo n.º 3
0
def fix_hyperlink_protocol(composer, href):
	if urlparse(href).netloc != '': return href
	
	def index_to_slide(path_string):
		# replace any index.html refs with a veeva name
		slide_name = re.match("(?:.*/)*([^/]+)/index.htm(?:l)?$", path_string)
		if slide_name:
			path_string = re.sub("index.htm(?:l)$", slide_name.group(1)+".html", path_string)
		return path_string

	match = parse_slide_name_from_href(index_to_slide(href))

	if match is None:
		return href
	else:
		return composer("gotoSlide", match + ".zip")
Ejemplo n.º 4
0
def fix_veev_2_rel(composer, href):
	match = parse_slide_name_from_href(href)
	if match is None:
		return href
	else:
		return composer(match, ".html")
Ejemplo n.º 5
0
def fix_veev_2_rel(composer, href):
	match = parse_slide_name_from_href(href)
	if match is None:
		return href
	else:
		return composer(match, ".html")