Versions

  • v18

    10/23/2023
    Open: Version
    Changes from v17 to v18
    +12
    -6
    const hnFollow = async () => {
    // poll using @stevekrouse's helper function
    let posts = await @stevekrouse.hnLatestPosts({
    authors: @me.hnAuthors,
    lastSyncTime: @me.hnFollowLastSyncTime,
    search_by_date: true,
    });
    // if there are results, email yourself
    if (!posts?.length) {
    return;
    }
    let { text, subject } = await @me.hnEmail({ posts });
    await @std.email({ html: text, subject });
    };
    import { email } from "https://esm.town/v/std/email?v=9";
    import { hnEmail } from "https://esm.town/v/akkartik/hnEmail";
    import { hnFollowLastSyncTime } from "https://esm.town/v/akkartik/hnFollowLastSyncTime";
    import { hnAuthors } from "https://esm.town/v/akkartik/hnAuthors";
    import { hnLatestPosts } from "https://esm.town/v/stevekrouse/hnLatestPosts?v=18";

    export const hnFollow = async () => {
    // poll using @stevekrouse's helper function
    let posts = await hnLatestPosts({
    authors: hnAuthors,
    lastSyncTime: hnFollowLastSyncTime,
    search_by_date: true,
    });
    // if there are results, email yourself
    if (!posts?.length) {
    return;
    }
    let { text, subject } = await hnEmail({ posts });
    await email({ html: text, subject });
    };
  • v17

    10/10/2023
    Open: Version
    Changes from v16 to v17
    +1
    -1
    ⦚ 10 unchanged lines ⦚
    }
    let { text, subject } = await @me.hnEmail({ posts });
    console.email({ html: text }, subject);
    };
    ⦚ 10 unchanged lines ⦚
    }
    let { text, subject } = await @me.hnEmail({ posts });
    await @std.email({ html: text, subject });
    };
  • v16

    5/7/2023
    Open: Version
    Changes from v15 to v16
    +2
    -5
    // one iteration of the poll job: send an email with new posts since the last sync time,
    // but without updating the last sync time.
    export hnFollow = async () => {
    // poll using @stevekrouse's helper function
    let posts = await @stevekrouse.hnLatestPosts({
    authors: @me.hackerNewsAuthors,
    lastSyncTime: @me.hnFollowLastSyncTime,
    search_by_date: true,
    });

    // if there are results, email yourself
    if (!posts?.length) {
    ⦚ 5 unchanged lines ⦚
    const hnFollow = async () => {
    // poll using @stevekrouse's helper function
    let posts = await @stevekrouse.hnLatestPosts({
    authors: @me.hnAuthors,
    lastSyncTime: @me.hnFollowLastSyncTime,
    search_by_date: true,
    });
    // if there are results, email yourself
    if (!posts?.length) {
    ⦚ 5 unchanged lines ⦚
  • v15

    3/2/2023
    Open: Version
    Changes from v14 to v15
    +3
    -1
    let hnFollow = async () => {
    // poll using @stevekrouse's helper function
    let posts = await @stevekrouse.hnLatestPosts({
    ⦚ 12 unchanged lines ⦚
    // one iteration of the poll job: send an email with new posts since the last sync time,
    // but without updating the last sync time.
    export hnFollow = async () => {
    // poll using @stevekrouse's helper function
    let posts = await @stevekrouse.hnLatestPosts({
    ⦚ 12 unchanged lines ⦚
  • v14

    3/2/2023
    Open: Version
    Changes from v13 to v14
    +15
    -8
    export hnFollow = [
    "@akkartik.hackerNewsAuthors",
    "@akkartik.hnFollowStart",
    "@akkartik.hnFollowIntervalMS",
    "@akkartik.hnFollowPollJob",
    "@stevekrouse.hnLatestPosts",
    "@stevekrouse.hnEmail",
    ];
    let hnFollow = async () => {
    // poll using @stevekrouse's helper function
    let posts = await @stevekrouse.hnLatestPosts({
    authors: @me.hackerNewsAuthors,
    lastSyncTime: @me.hnFollowLastSyncTime,
    search_by_date: true,
    });

    // if there are results, email yourself
    if (!posts?.length) {
    return;
    }
    let { text, subject } = await @me.hnEmail({ posts });
    console.email({ html: text }, subject);
    };
  • v13

    11/12/2022
    Open: Version
    Changes from v12 to v13
    +1
    -1
    export hnFollow = [
    "@akkartik.hackerNewsAuthors",
    "@akkartik.hnFollowStart",
    '@akkartik.hnFollowIntervalMS'
    "@akkartik.hnFollowPollJob",
    "@stevekrouse.hnLatestPosts",
    "@stevekrouse.hnEmail",
    ];
    export hnFollow = [
    "@akkartik.hackerNewsAuthors",
    "@akkartik.hnFollowStart",
    "@akkartik.hnFollowIntervalMS",
    "@akkartik.hnFollowPollJob",
    "@stevekrouse.hnLatestPosts",
    "@stevekrouse.hnEmail",
    ];
  • v12

    11/12/2022
    Open: Version
    Changes from v11 to v12
    +1
    -0
    export hnFollow = [
    "@akkartik.hackerNewsAuthors",
    "@akkartik.hnFollowStart",
    "@akkartik.hnFollowPollJob",
    "@stevekrouse.hnLatestPosts",
    "@stevekrouse.hnEmail",
    ];
    export hnFollow = [
    "@akkartik.hackerNewsAuthors",
    "@akkartik.hnFollowStart",
    '@akkartik.hnFollowIntervalMS'
    "@akkartik.hnFollowPollJob",
    "@stevekrouse.hnLatestPosts",
    "@stevekrouse.hnEmail",
    ];
  • v11

    11/12/2022
    Open: Version
    Changes from v10 to v11
    +3
    -4
    // set by @akkartik.untitled4865758 at 2022-11-12T03:11:35.854Z
    hnFollow = [
    "@akkartik.hackerNewsAuthors",
    "@akkartik.hnFollowStart",
    "@akkartik.hnFollowPollJob",
    "@stevekrouse.hnLatestPosts",
    "@stevekrouse.hnEmail"
    ]
    export hnFollow = [
    "@akkartik.hackerNewsAuthors",
    "@akkartik.hnFollowStart",
    "@akkartik.hnFollowPollJob",
    "@stevekrouse.hnLatestPosts",
    "@stevekrouse.hnEmail",
    ];
  • v10

    11/12/2022
    Open: Version
    +8
    -0

    // set by @akkartik.untitled4865758 at 2022-11-12T03:11:35.854Z
    hnFollow = [
    "@akkartik.hackerNewsAuthors",
    "@akkartik.hnFollowStart",
    "@akkartik.hnFollowPollJob",
    "@stevekrouse.hnLatestPosts",
    "@stevekrouse.hnEmail"
    ]
Updated: October 23, 2023