Commit Graph

204 Commits

Author SHA1 Message Date
Leandro Facchinetti 0793f31b4f 2021-03-11 10:29:05 +00:00
Leandro Facchinetti bfc2d126fb 2021-03-11 10:23:37 +00:00
Leandro Facchinetti 171450bf39 2021-03-11 10:08:51 +00:00
Leandro Facchinetti 3415a2d404 2021-03-11 10:04:09 +00:00
Leandro Facchinetti 4e488ca0bb 2021-03-11 08:49:25 +00:00
Leandro Facchinetti e3179f4cde 2021-03-10 21:33:43 +00:00
Leandro Facchinetti 113db29bdc 2021-03-10 14:04:09 +00:00
Leandro Facchinetti 5df7656559 2021-03-10 11:35:48 +00:00
Leandro Facchinetti 319838f7b3 2021-03-10 11:05:04 +00:00
Leandro Facchinetti c051b786df 2021-03-10 10:30:08 +00:00
Leandro Facchinetti 6f7f1ffe3d 2021-03-09 22:04:05 +00:00
Leandro Facchinetti 8bc4034fcc 2021-01-29 16:15:30 +00:00
Leandro Facchinetti 9177b417bf 2021-01-29 16:06:33 +00:00
Leandro Facchinetti 18606987b9 2021-01-29 15:14:40 +00:00
Leandro Facchinetti f3aab0c7e3 2021-01-21 16:35:47 +00:00
Leandro Facchinetti 63669faa42 2021-01-21 15:56:10 +00:00
Leandro Facchinetti ff1101adb7
Merge pull request #35 from leafac/dependabot/npm_and_yarn/axios-0.21.1
Bump axios from 0.19.2 to 0.21.1
2021-01-06 11:46:57 +00:00
dependabot[bot] 03cc6d73d6
Bump axios from 0.19.2 to 0.21.1
Bumps [axios](https://github.com/axios/axios) from 0.19.2 to 0.21.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.19.2...v0.21.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-05 22:31:46 +00:00
Leandro Facchinetti 2d16deb1a8 . 2021-01-05 18:58:17 +00:00
Leandro Facchinetti d64dceaf94 . 2021-01-01 18:46:25 +00:00
Leandro Facchinetti 424721b98c Close https://github.com/leafac/kill-the-newsletter.com/issues/33 2020-12-22 20:50:37 +00:00
Leandro Facchinetti 08ca42693b . 2020-12-22 20:31:27 +00:00
Leandro Facchinetti 574c1cff3e . 2020-12-22 20:00:32 +00:00
Leandro Facchinetti 93b99aa113 Fix https://github.com/leafac/kill-the-newsletter.com/issues/34 2020-12-22 19:43:17 +00:00
Leandro Facchinetti 6de1da51fe . 2020-12-22 19:34:02 +00:00
Leandro Facchinetti 942b8c309c Merge branch 'master' of github.com:leafac/www.kill-the-newsletter.com 2020-12-17 17:24:14 +00:00
Leandro Facchinetti 0b7f488c17 . 2020-12-17 17:24:10 +00:00
Leandro Facchinetti 1dd2ed5e64
Merge pull request #32 from leafac/dependabot/npm_and_yarn/ini-1.3.8
Bump ini from 1.3.5 to 1.3.8
2020-12-12 02:40:10 +00:00
dependabot[bot] 3f3dc8d46e
Bump ini from 1.3.5 to 1.3.8
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-12 02:38:25 +00:00
Leandro Facchinetti cb0bf74025 . 2020-12-12 02:37:21 +00:00
Leandro Facchinetti 640fbef200 Close #31 2020-12-07 22:56:00 +00:00
Leandro Facchinetti ab543e302a
Merge pull request #29 from leafac/dependabot/npm_and_yarn/systeminformation-4.30.6
Bump systeminformation from 4.27.11 to 4.30.6
2020-11-27 16:43:13 +00:00
dependabot[bot] 13d41257c5
Bump systeminformation from 4.27.11 to 4.30.6
Bumps [systeminformation](https://github.com/sebhildebrandt/systeminformation) from 4.27.11 to 4.30.6.
- [Release notes](https://github.com/sebhildebrandt/systeminformation/releases)
- [Changelog](https://github.com/sebhildebrandt/systeminformation/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sebhildebrandt/systeminformation/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-27 16:27:03 +00:00
Leandro Facchinetti d615a0a1fa . 2020-11-24 19:03:16 +00:00
Leandro Facchinetti e452838d27 Don’t store alternates explicitly to save disk space
Instead, fetch alternates from within the feed on the demand.

This makes alternates marginally more expensive to retrieve, but saves on storage (which we were running out on the DigitalOcean deployment), and is a cleaner architecture overall: no need to keep the feeds and alternates in sync.

Here’s a script to migrate existing feeds:

// Call me with, for example: env "BASE_URL=https://kill-the-newsletter.com" npx ts-node migrate.ts
// I’m idempotent and reentrant, you may call me multiple times if necessary (for example, if the migration fails in the middle for whatever reason)

import { promises as fs } from "fs";
import path from "path";
import { JSDOM } from "jsdom";

const BASE_URL = process.env.BASE_URL ?? "http://localhost:8000";
const FEEDS_PATH = "static/feeds";

(async () => {
  await fs.rmdir("static/alternate", { recursive: true });
  for (const feedPath of (await fs.readdir(FEEDS_PATH)).filter((feedPath) =>
    feedPath.endsWith(".xml")
  )) {
    const text = await fs.readFile(path.join(FEEDS_PATH, feedPath), "utf-8");
    const feed = new JSDOM(text, { contentType: "text/xml" });
    const document = feed.window.document;
    const feedIdentifier = document
      .querySelector("id")!
      .textContent!.split(":")[2];
    for (const entry of document.querySelectorAll("entry")) {
      const entryIdentifier = entry
        .querySelector("id")!
        .textContent!.split(":")[2];
      entry
        .querySelector(`link[rel="alternate"]`)
        ?.setAttribute(
          "href",
          `${BASE_URL}/alternate/${feedIdentifier}/${entryIdentifier}.html`
        );
    }
    await fs.writeFile(
      path.join(FEEDS_PATH, feedPath),
      `<?xml version="1.0" encoding="utf-8"?>${feed.serialize()}`.trim()
    );
    console.log(feedIdentifier);
  }
})();
2020-11-24 17:12:14 +00:00
Leandro Facchinetti 212b06eb49 . 2020-10-31 11:43:57 +00:00
Leandro Facchinetti 0ef39970e6
Merge pull request #25 from leafac/dependabot/npm_and_yarn/dot-prop-4.2.1
Bump dot-prop from 4.2.0 to 4.2.1
2020-10-30 21:09:57 +00:00
dependabot[bot] cb33a16fb9
Bump dot-prop from 4.2.0 to 4.2.1
Bumps [dot-prop](https://github.com/sindresorhus/dot-prop) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/sindresorhus/dot-prop/releases)
- [Commits](https://github.com/sindresorhus/dot-prop/compare/v4.2.0...v4.2.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-30 20:46:04 +00:00
Leandro Facchinetti eb58438c3e
Merge pull request #24 from leafac/dependabot/npm_and_yarn/systeminformation-4.27.11
Bump systeminformation from 4.23.1 to 4.27.11
2020-10-30 20:45:22 +00:00
dependabot[bot] 846972b4b1
Bump systeminformation from 4.23.1 to 4.27.11
Bumps [systeminformation](https://github.com/sebhildebrandt/systeminformation) from 4.23.1 to 4.27.11.
- [Release notes](https://github.com/sebhildebrandt/systeminformation/releases)
- [Changelog](https://github.com/sebhildebrandt/systeminformation/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sebhildebrandt/systeminformation/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-27 20:46:07 +00:00
Leandro Facchinetti b9cf415521 . 2020-09-13 02:34:26 +01:00
Leandro Facchinetti ab99bbc699 Rmeove old line 2020-09-03 07:30:19 +01:00
Leandro Facchinetti 2724333412 Add html tagged template literal 2020-08-10 00:30:12 +01:00
Leandro Facchinetti f2fee64925 Switch src and alt 2020-08-09 23:05:31 +01:00
Leandro Facchinetti c6540fc54c Add optional tags back 2020-08-09 22:53:32 +01:00
Leandro Facchinetti f9d826fe54 . 2020-08-05 12:32:16 +01:00
Leandro Facchinetti e2a5ad35db . 2020-08-04 23:00:29 +01:00
Leandro Facchinetti c51272f340 Remove www 2020-08-04 22:57:49 +01:00
Leandro Facchinetti 175fdcae6b . 2020-08-04 22:52:12 +01:00
Leandro Facchinetti ac6f194789 . 2020-08-04 22:50:07 +01:00