-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨v0.1.4.2,在展览列表中显示出场嘉宾(数据不全?),展览开始时间精确到秒
- Loading branch information
Showing
4 changed files
with
42 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
from .config import BGIMAGE_PATH | ||
import random | ||
import datetime | ||
def choose_random_bgimage(): | ||
randomfile = random.choice(list(BGIMAGE_PATH.iterdir())) | ||
randomurl = randomfile.as_uri() | ||
return randomurl | ||
return randomurl | ||
def convert_timestamp(timestamp): | ||
obj = datetime.datetime.fromtimestamp(timestamp) | ||
formatted_time = obj.strftime('%Y-%m-%d %H:%M:%S') | ||
return formatted_time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters