Exemple #1
0
def ipo_tiger():
    cld = CalendarTiger()
    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"
Exemple #2
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"
Exemple #3
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"
Exemple #4
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"