コード例 #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
ファイル: relink.py プロジェクト: drewsynan/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")
コード例 #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")