Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions blog/update_weasel_appcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def format_time(time_str):

# get release notes link
if tags_name[latest_index] == "latest":
releaseNotesLink = "https://github.com/rime/weasel/releases/tag/latest"
releaseNotesLink = "http://github.com/rime/weasel/releases/tag/latest/index.html"
else:
releaseNotesLink = "http://rime.github.io/testing/weasel/"
releaseNotesLink = "http://rime.github.io/testing/weasel/index.html"
# format xml file content
template = f"""<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
Expand Down Expand Up @@ -85,7 +85,7 @@ def format_time(time_str):
break
if 'release_url' not in locals():
print("release_url not found, using default url")
release_url = f"https://github.com/rime/weasel/releases/download/{release_json["tag_name"]}/weasel-{release_json["tag_name"]}.0-installer.exe"
release_url = f"https://github.com/rime/weasel/releases/download/{release_json['tag_name']}/weasel-{release_json['tag_name']}.0-installer.exe"
# update appcast.xml
template_release = f"""<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
Expand All @@ -96,7 +96,7 @@ def format_time(time_str):
<language>zh</language>
<item>
<title>小狼毫 {release_json["tag_name"]}</title>
<sparkle:releaseNotesLink>http://rime.github.io/release/weasel/</sparkle:releaseNotesLink>
<sparkle:releaseNotesLink>http://rime.github.io/release/weasel/index.html</sparkle:releaseNotesLink>
<pubDate>{release_formatted_time}</pubDate>
<enclosure url="{release_url}"
sparkle:version="{release_json["tag_name"]}"
Expand Down