Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/portraits/hacking-legends/card_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_006.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_008.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_009.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_010.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_011.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_012.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_013.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_014.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_015.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_016.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_017.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_018.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_019.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_020.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_021.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_022.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_023.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_025.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/portraits/hacking-legends/card_026.png
Binary file added assets/portraits/hacking-legends/card_027.png
Binary file added assets/portraits/hacking-legends/card_028.png
Binary file added assets/portraits/hacking-legends/card_029.png
Binary file added assets/portraits/hacking-legends/card_030.png
Binary file added public/cards/hacking/002-john-draper-back.png
Binary file added public/cards/hacking/002-john-draper-front.png
Binary file added public/cards/hacking/004-peiter-zatko-back.png
Binary file added public/cards/hacking/004-peiter-zatko-front.png
Binary file added public/cards/hacking/006-eric-corley-back.png
Binary file added public/cards/hacking/006-eric-corley-front.png
Binary file added public/cards/hacking/008-jeff-moss-back.png
Binary file added public/cards/hacking/008-jeff-moss-front.png
Binary file added public/cards/hacking/009-dan-kaminsky-back.png
Binary file added public/cards/hacking/009-dan-kaminsky-front.png
Binary file added public/cards/hacking/010-cliff-stoll-back.png
Binary file added public/cards/hacking/010-cliff-stoll-front.png
Binary file added public/cards/hacking/013-susan-headley-back.png
Binary file added public/cards/hacking/013-susan-headley-front.png
Binary file added public/cards/hacking/014-adrian-lamo-back.png
Binary file added public/cards/hacking/014-adrian-lamo-front.png
Binary file added public/cards/hacking/015-gary-mckinnon-back.png
Binary file added public/cards/hacking/015-gary-mckinnon-front.png
Binary file added public/cards/hacking/016-jonathan-james-back.png
Binary file added public/cards/hacking/017-chris-wysopal-back.png
Binary file added public/cards/hacking/017-chris-wysopal-front.png
Binary file added public/cards/hacking/021-solar-designer-back.png
Binary file added public/cards/hacking/022-hd-moore-back.png
Binary file added public/cards/hacking/022-hd-moore-front.png
Binary file added public/cards/hacking/023-barnaby-jack-back.png
Binary file added public/cards/hacking/023-barnaby-jack-front.png
Binary file added public/cards/hacking/024-charlie-miller-back.png
Binary file added public/cards/hacking/025-chris-valasek-back.png
Binary file added public/cards/hacking/025-chris-valasek-front.png
Binary file added public/cards/hacking/026-samy-kamkar-back.png
Binary file added public/cards/hacking/026-samy-kamkar-front.png
Binary file added public/cards/hacking/027-george-hotz-back.png
Binary file added public/cards/hacking/027-george-hotz-front.png
Binary file added public/cards/hacking/029-karsten-nohl-back.png
Binary file added public/cards/hacking/029-karsten-nohl-front.png
12 changes: 8 additions & 4 deletions scripts/hacking-legends.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -448,22 +448,26 @@ async function writeArtPaths(published) {
const lines = (await fs.readFile(file, 'utf8')).split('\n');
const wanted = new Map(published.map((h) => [h.number, h]));
const out = [];
const inserted = new Set();
let current = null;
let changed = 0;

for (const line of lines) {
const num = line.match(/^ {4}number: (\d+),$/);
if (num) current = Number(num[1]);
// Drop any previous art lines for a card we are about to rewrite.
if (current !== null && wanted.has(current) && /^ {4}(front|back): '.*',$/.test(line)) continue;
const rewriting = current !== null && wanted.has(current);
// Drop any previous art lines for a card we are about to rewrite. `current`
// has to stay set past the insert below, or existing lines sitting *after*
// `status:` slip through and the card ends up with duplicate keys.
if (rewriting && /^ {4}(front|back): '.*',$/.test(line)) continue;
out.push(line);
if (current !== null && wanted.has(current) && /^ {4}status: '.*',$/.test(line)) {
if (rewriting && !inserted.has(current) && /^ {4}status: '.*',$/.test(line)) {
const h = wanted.get(current);
const stem = `/cards/hacking/${String(h.number).padStart(3, '0')}-${h.slug}`;
out.push(` front: '${stem}-front.png',`);
out.push(` back: '${stem}-back.png',`);
changed++;
current = null;
inserted.add(current);
}
}

Expand Down
54 changes: 54 additions & 0 deletions src/data/hacking.ts

Large diffs are not rendered by default.

Loading