예제 #1
0
def ipo_china():
    cld = CalendarChina()
    output = cld.get_output_path()
    text = read_file(output)
    if expired_for_seconds(cld.name, 60 * 60 * 3) or text is None:
        cld.gen_ics()
    return read_file(output) or "FILE NOT FOUND"
예제 #2
0
def ipo_tiger_rss():
    rss = get_rss()
    cld = CalendarTiger()
    cld.name += rss
    output = cld.get_output_path(rss)
    text = read_file(output)

    if expired_for_seconds(cld.name, 60 * 60 * 3) or text is None:
        cld.gen_ics(rss)
    return read_file(output) or "FILE NOT FOUND"
예제 #3
0
def ipo_tiger_mainland():
    cld = CalendarTiger(filter_fn=lambda x: x["market"] in ["SZ", "SH"])
    cld.name = "ipo-tiger-mainland"
    cld.cal_name = "IPO (tiger) (SH/SZ)"

    output = cld.get_output_path()
    text = read_file(output)
    if expired_for_seconds(cld.name, 60 * 60 * 3) or text is None:
        cld.gen_ics()
    return read_file(output) or "FILE NOT FOUND"
예제 #4
0
def ipo_tiger_hk():
    cld = CalendarTiger(filter_fn=lambda x: x["market"] == "HK")
    cld.name = "ipo-tiger-hk"
    cld.cal_name = "IPO (tiger) (HK)"

    output = cld.get_output_path()
    text = read_file(output)
    if expired_for_seconds(cld.name, 60 * 60 * 3) or text is None:
        cld.gen_ics()
    return read_file(output) or "FILE NOT FOUND"
예제 #5
0
def ipo_tiger_rss_us():
    ext = get_rss()
    cld = CalendarTiger(filter_fn=lambda x: x["market"] == "US")
    cld.name = "ipo-tiger-us" + "-" + ext
    cld.cal_name = "IPO (tiger) (US)"

    output = cld.get_output_path(ext)
    text = read_file(output)
    if expired_for_seconds(cld.name, 60 * 60 * 3) or text is None:
        cld.gen_ics(ext)
    return read_file(output) or "FILE NOT FOUND"