示例#1
0
文件: relink.py 项目: gacomm/VELVEEVA
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")
示例#2
0
文件: relink.py 项目: iroc7/VELVEEVA
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")
示例#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")
示例#4
0
文件: relink.py 项目: iroc7/VELVEEVA
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")
示例#5
0
文件: relink.py 项目: gacomm/VELVEEVA
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")