mewith 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +24 -0
- package/cli/bin/cli.js +9 -0
- package/cli/package.json +10 -0
- package/cli/src/ask.js +45 -0
- package/cli/src/claude.js +88 -0
- package/cli/src/clawd.js +120 -0
- package/cli/src/codex-notes.js +16 -0
- package/cli/src/codex.js +100 -0
- package/cli/src/collect.js +174 -0
- package/cli/src/git.js +95 -0
- package/cli/src/homes.js +140 -0
- package/cli/src/jsonl.js +29 -0
- package/cli/src/lang.js +34 -0
- package/cli/src/main.js +157 -0
- package/cli/src/page.html +279 -0
- package/cli/src/page.js +165 -0
- package/cli/src/pickup.js +99 -0
- package/cli/src/repos.js +203 -0
- package/cli/src/search.js +52 -0
- package/cli/src/shoot.js +339 -0
- package/cli/src/slovechki.js +36 -0
- package/cli/src/submit.js +325 -0
- package/cli/src/terminal.js +108 -0
- package/cli/src/texts.js +140 -0
- package/cli/src/time.js +18 -0
- package/karusel/arcade.js +168 -0
- package/karusel/badge.js +139 -0
- package/karusel/codex/1.png +0 -0
- package/karusel/codex/2.png +0 -0
- package/karusel/codex/3.png +0 -0
- package/karusel/codex/4.png +0 -0
- package/karusel/codex/5.png +0 -0
- package/karusel/codex/6.png +0 -0
- package/karusel/common.js +261 -0
- package/karusel/fonts/OFL-martianmono.txt +93 -0
- package/karusel/fonts/OFL-onest.txt +93 -0
- package/karusel/fonts/OFL-pixelifysans.txt +93 -0
- package/karusel/fonts/OFL-pressstart2p.txt +93 -0
- package/karusel/fonts/OFL-shantellsans.txt +93 -0
- package/karusel/fonts/OFL-sofiasansextracondensed.txt +93 -0
- package/karusel/fonts/fonts.css +25 -0
- package/karusel/fonts/martianmono-cyrillic.woff2 +0 -0
- package/karusel/fonts/martianmono-latin.woff2 +0 -0
- package/karusel/fonts/onest-cyrillic.woff2 +0 -0
- package/karusel/fonts/onest-latin.woff2 +0 -0
- package/karusel/fonts/pixelifysans-cyrillic.woff2 +0 -0
- package/karusel/fonts/pixelifysans-latin.woff2 +0 -0
- package/karusel/fonts/pressstart2p-cyrillic.woff2 +0 -0
- package/karusel/fonts/pressstart2p-latin.woff2 +0 -0
- package/karusel/fonts/shantellsans-cyrillic.woff2 +0 -0
- package/karusel/fonts/shantellsans-latin.woff2 +0 -0
- package/karusel/fonts/sofiasansextracondensed-cyrillic.woff2 +0 -0
- package/karusel/fonts/sofiasansextracondensed-latin.woff2 +0 -0
- package/karusel/index.js +33 -0
- package/karusel/sheet.js +106 -0
- package/karusel/sprites.js +2 -0
- package/karusel/teletext.js +110 -0
- package/package.json +13 -4
- package/shared/config.json +8 -0
- package/shared/details.js +54 -0
- package/shared/limits.js +167 -0
- package/shared/models.js +15 -0
- package/shared/season.js +13 -0
- package/shared/shoot.js +105 -0
- package/shared/sila.js +35 -0
- package/README.md +0 -3
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
// Общее для шаблонов карусели: данные года → кадр. Кадр — чистая функция времени t (секунды) и о браузере не знает:
|
|
2
|
+
// разметка собирается строкой, поэтому один и тот же код рисует страницу года, страницы шаблонов и проверяется в Node.
|
|
3
|
+
// Кадры: 1…6 — слайды 4:5 (1080×1350), 7 — одиночная карточка 9:16 (1080×1920).
|
|
4
|
+
// Файл — обычный сценарий без import и export: так он грузится тегом <script> с диска, вшивается в страницу года
|
|
5
|
+
// и читается Node как модуль (вход для Node — index.js). Всё общее лежит под одним именем — KARUSEL.
|
|
6
|
+
(function (G) {
|
|
7
|
+
'use strict';
|
|
8
|
+
const N = 6, CARD_SLIDE = 7, CARD_DURATION = 5, WIDTH = 1080, HEIGHT = 1350, CARD_HEIGHT = 1920;
|
|
9
|
+
const TEMPLATES = {}; // шаблон: { durs, css, make(k) → { slides, chrome } }
|
|
10
|
+
const AGENT_NAME = { claude: 'Claude Code', codex: 'Codex' };
|
|
11
|
+
const RANK_NAMES = { ru: ['Юнлинг', 'Искатель', 'Падаван', 'Рыцарь', 'Страж', 'Мастер'], en: ['Youngling', 'Seeker', 'Padawan', 'Knight', 'Sentinel', 'Master'] };
|
|
12
|
+
const MONTH_NAMES = { ru: ['ЯНВ', 'ФЕВ', 'МАР', 'АПР', 'МАЙ', 'ИЮН', 'ИЮЛ', 'АВГ', 'СЕН', 'ОКТ', 'НОЯ', 'ДЕК'], en: ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'] };
|
|
13
|
+
const F = { mar: ['марафон', 'марафона', 'марафонов'], bor: ['кастрюлю борща', 'кастрюли борща', 'кастрюль борща'], sleep: ['ночь', 'ночи', 'ночей'],
|
|
14
|
+
proj: ['проект', 'проекта', 'проектов'], com: ['коммит', 'коммита', 'коммитов'], day: ['день', 'дня', 'дней'], ses: ['сессия', 'сессии', 'сессий'] };
|
|
15
|
+
const FE = { mar: ['marathon', 'marathons'], bor: ['pot of borscht', 'pots of borscht'], sleep: ['night', 'nights'], proj: ['project', 'projects'], com: ['commit', 'commits'],
|
|
16
|
+
day: ['day', 'days'], ses: ['session', 'sessions'] };
|
|
17
|
+
// Заголовок следует за агентами человека (решение оператора — PRODUCT.md, «Brand Commitments»); название проекта при этом не меняется.
|
|
18
|
+
// TODO(текст): «Мой год» у человека без агента оператор не называл — это тот же заголовок без имени агента.
|
|
19
|
+
const TITLES = { claude: 'Мой год с Claude Code', codex: 'Мой год с Codex', 'claude+codex': 'Мой год с Claude Code и Codex', '': 'Мой год' };
|
|
20
|
+
|
|
21
|
+
// Перевод: русская строка — ключ. Длинные фразы заменяются и внутри текста, короткие (до 3 знаков) — только целиком.
|
|
22
|
+
const EN = {
|
|
23
|
+
'МОЙ ГОД С CLAUDE CODE': 'MY YEAR WITH CLAUDE CODE', 'Мой год с Claude Code': 'My year with Claude Code', 'МОЙ ГОД': 'MY YEAR',
|
|
24
|
+
'неофициальный фан-проект': 'unofficial fan project', 'НЕОФИЦИАЛЬНЫЙ ФАН-ПРОЕКТ': 'UNOFFICIAL FAN PROJECT',
|
|
25
|
+
'ИТОГИ ГОДА ВАЙБКОДЕРА · СТРАНИЦА': 'VIBE CODER YEAR IN REVIEW · PAGE', 'ИТОГИ ГОДА ВАЙБКОДЕРА': 'A VIBE CODER YEAR IN REVIEW',
|
|
26
|
+
'ПРОЙДЕН!': 'CLEARED!', 'коммиты, дни, часы и ранг': 'commits, days, hours and rank', 'ЛИСТАЙ ДАЛЬШЕ >': 'SWIPE ON >', 'ЛИСТАЙ': 'SWIPE', 'Листай →': 'Swipe →', 'листай →': 'swipe →',
|
|
27
|
+
'БОНУС:': 'BONUS:', 'КОММИТЫ ДНИ ЧАСЫ МОДЕЛИ РАНГ': 'COMMITS DAYS HOURS MODELS RANK', 'КОММИТЫ': 'COMMITS', 'Коммиты': 'Commits', 'коммитов': 'commits',
|
|
28
|
+
'ВСЕГО ЗА ГОД': 'TOTAL THIS YEAR', 'всего за год сменилось моделей:': 'models used this year:', 'всего за год': 'total this year',
|
|
29
|
+
'ИЗ НИХ С CLAUDE CODE': 'OF THEM WITH CLAUDE CODE', 'из них с Claude Code': 'of them with Claude Code', 'вместе с Claude Code': 'with Claude Code',
|
|
30
|
+
'ДНЕЙ С CLAUDE CODE': 'DAYS WITH CLAUDE CODE', 'ДНИ С CLAUDE CODE': 'DAYS WITH CLAUDE CODE', 'дней с Claude Code': 'days with Claude Code',
|
|
31
|
+
'С CLAUDE CODE': 'WITH CLAUDE CODE', 'с Claude Code': 'with Claude Code', 'БЕЗ НЕГО': 'WITHOUT IT', 'без него': 'without it', 'без': 'without',
|
|
32
|
+
'ПРОЕКТЫ': 'PROJECTS', 'ПРОЕКТОВ': 'PROJECTS', 'ПО НЕДЕЛЯМ · ЯНВАРЬ — ДЕКАБРЬ': 'BY WEEK · JANUARY — DECEMBER', 'ПО НЕДЕЛЯМ: ЯНВАРЬ - ДЕКАБРЬ': 'BY WEEK: JANUARY - DECEMBER',
|
|
33
|
+
'по неделям, январь — декабрь': 'by week, January to December', 'ВСЁ, ЧТО ТЫ ОТПРАВИЛ В GIT ЗА ГОД': 'EVERYTHING YOU PUSHED TO GIT THIS YEAR', 'ЗА ГОД СДЕЛАНО': 'SHIPPED THIS YEAR',
|
|
34
|
+
'ДНИ И ЧАСЫ': 'DAYS & HOURS', 'Дни и часы': 'Days & hours', 'СЕРИЯ ДНЕЙ ПОДРЯД': 'DAY STREAK', 'ДНЕЙ ПОДРЯД': 'DAY STREAK', 'дней подряд': 'day streak',
|
|
35
|
+
'ЧАСЫ РАБОТЫ': 'HOURS OF WORK', 'ЧАСОВ РАБОТЫ': 'HOURS OF WORK', 'часов работы': 'hours of work',
|
|
36
|
+
'ЖЁЛТЫЙ - ДЕНЬ С CLAUDE CODE': 'YELLOW - A DAY WITH CLAUDE CODE', 'каждая клетка — день · фиолетовая — с Claude Code': 'each cell is a day · violet means with Claude Code',
|
|
37
|
+
'МОДЕЛИ ГОДА': 'MODELS OF THE YEAR', 'Модели года': 'Models of the year', 'МОДЕЛИ': 'MODELS', 'ГОДА': 'OF THE YEAR', 'ЛЮБИМАЯ МОДЕЛЬ': 'FAVORITE MODEL', 'ЛЮБИМАЯ:': 'FAVORITE:', 'любимая:': 'favorite:',
|
|
38
|
+
'КТО ПИСАЛ С ТОБОЙ ЭТОТ ГОД': 'WHO WROTE WITH YOU THIS YEAR', 'кто писал с тобой этот год': 'who wrote with you this year', 'всего текста': 'of all output',
|
|
39
|
+
'за год сменилось моделей:': 'models used this year:', 'ВСЕГО МОДЕЛЕЙ ЗА ГОД:': 'MODELS USED THIS YEAR:', 'всего моделей за год:': 'models used this year:',
|
|
40
|
+
'ВМЕСТО ЭТОГО': 'INSTEAD', 'Вместо этого': 'Instead', 'ВМЕСТО': 'INSTEAD', 'ЭТОГО': 'OF THIS', 'Вместо': 'Instead', 'этого': 'of this',
|
|
41
|
+
'за эти': 'in those', 'ч ты мог бы:': 'h you could have:', 'ЗА ЭТИ': 'IN THOSE', 'ЧАСОВ ТЫ МОГ БЫ…': 'HOURS YOU COULD HAVE…', 'часов ты мог бы…': 'hours you could have…',
|
|
42
|
+
'пробежать': 'run', 'сварить': 'cooked', 'выспаться': 'slept for', 'ПРОБЕЖАТЬ': 'RUN', 'СВАРИТЬ': 'COOKED', 'ВЫСПАТЬСЯ': 'SLEPT FOR',
|
|
43
|
+
'НО ТЫ ВЫБРАЛ:': 'BUT YOU CHOSE:', 'НО ТЫ ВЫБРАЛ': 'BUT YOU CHOSE', 'но ты выбрал:': 'but you chose:', 'А ЧТО ТЫ ВЫБРАЛ?': 'AND WHAT DID YOU CHOOSE?',
|
|
44
|
+
'РАНГ ЗА ГОД': 'RANK OF THE YEAR', 'Ранг за год': 'Rank of the year', 'РАНГ': 'RANK', 'ДНИ': 'DAYS',
|
|
45
|
+
'чем больше опыта, тем злее клодик': 'the more experience, the angrier Clawd', 'ЧЕМ БОЛЬШЕ ОПЫТА, ТЕМ ЗЛЕЕ КЛОДИК': 'THE MORE EXPERIENCE, THE ANGRIER CLAWD',
|
|
46
|
+
'уровни допуска — чем больше опыта, тем злее клодик': 'access levels — the more experience, the angrier Clawd',
|
|
47
|
+
'Допуск:': 'Access:', 'класс': 'class',
|
|
48
|
+
'ВСТАВЬ МОНЕТУ:': 'INSERT COIN:', '[команда]': '[command]', '[КОМАНДА]': '[COMMAND]', 'получи свой:': 'get yours:', 'ПОЛУЧИ СВОЙ:': 'GET YOURS:',
|
|
49
|
+
'Сезон': 'Season', 'СЕЗОН': 'SEASON', 'ПРОПУСК ВАЙБКОДЕРА': 'VIBE CODER PASS', 'коммиты, дни, часы, модели и ранг — на шести слайдах': 'commits, days, hours, models and rank — on six slides',
|
|
50
|
+
'ИТОГИ': 'RECAP', 'сила': 'force', 'лист персонажа · вайбкодер ·': 'character sheet · vibe coder ·', 'вид спереди · масть: коммит-рыжий': 'front view · color: commit orange',
|
|
51
|
+
'НЕ ВОРОВАТЬ!!! (мои коммиты)': 'DO NOT STEAL!!! (my commits)', 'палитра года · образцы с подписями': 'palette of the year · labelled swatches',
|
|
52
|
+
// Тикет #5, человек с Codex или без агента. TODO(текст): ни русских, ни английских строк ниже оператор ещё не утверждал
|
|
53
|
+
// (кроме русских заголовков с именами агентов); перечень — karusel/README.md, «Чего нет».
|
|
54
|
+
'МОЙ ГОД С CODEX': 'MY YEAR WITH CODEX', 'Мой год с Codex': 'My year with Codex',
|
|
55
|
+
'МОЙ ГОД С CLAUDE CODE И CODEX': 'MY YEAR WITH CLAUDE CODE AND CODEX', 'Мой год с Claude Code и Codex': 'My year with Claude Code and Codex', 'Мой год': 'My year',
|
|
56
|
+
'ДНИ С CODEX': 'DAYS WITH CODEX', 'ДНЕЙ С CODEX': 'DAYS WITH CODEX', 'дней с Codex': 'days with Codex',
|
|
57
|
+
'ЖЁЛТЫЙ - ДЕНЬ С CODEX': 'YELLOW - A DAY WITH CODEX', 'ЖЁЛТЫЙ - ДЕНЬ С АГЕНТОМ': 'YELLOW - A DAY WITH AN AGENT',
|
|
58
|
+
'каждая клетка — день · фиолетовая — с Codex': 'each cell is a day · violet means with Codex',
|
|
59
|
+
'каждая клетка — день · фиолетовая — с агентом': 'each cell is a day · violet means with an agent', 'каждая клетка — день': 'each cell is a day',
|
|
60
|
+
'чем больше опыта, тем злее маскот': 'the more experience, the angrier the mascot', 'ЧЕМ БОЛЬШЕ ОПЫТА, ТЕМ ЗЛЕЕ МАСКОТ': 'MORE EXPERIENCE, ANGRIER MASCOT',
|
|
61
|
+
'уровни допуска — чем больше опыта, тем злее маскот': 'access levels — the more experience, the angrier the mascot',
|
|
62
|
+
'вид спереди': 'front view', 'уровни допуска': 'access levels',
|
|
63
|
+
'ДНИ С АГЕНТОМ': 'DAYS WITH AN AGENT', 'ДНЕЙ С АГЕНТОМ': 'DAYS WITH AN AGENT', 'дней с агентом': 'days with an agent',
|
|
64
|
+
};
|
|
65
|
+
const EN_KEYS = Object.keys(EN).sort((a, b) => b.length - a.length);
|
|
66
|
+
|
|
67
|
+
const int = (x, min = 0, max = Infinity) => Math.max(min, Math.min(max, Number.isFinite(+x) ? Math.trunc(+x) : 0));
|
|
68
|
+
const list = (x) => (Array.isArray(x) ? x : []);
|
|
69
|
+
|
|
70
|
+
// Данные года (форма — спека #1, модуль 1) → они же, но только числами и названиями из списков: кадр собирается
|
|
71
|
+
// из строк, и ничто из данных не должно стать разметкой. Пустые models и agents — законные данные.
|
|
72
|
+
// Сверх спеки понимаются два необязательных поля:
|
|
73
|
+
// date: [месяц, день] — день подсчёта (стоит в шапке телетекста); без него — 31 декабря;
|
|
74
|
+
// place — место среди участников, можно ответом сайта как есть: { number, total, percent, showNumber }.
|
|
75
|
+
// «участник №k» — если так велит showNumber или названо только number; «топ N% из M» — если названы percent и total;
|
|
76
|
+
// без place строки про место нет.
|
|
77
|
+
function normalize(data) {
|
|
78
|
+
const place = data.place || {}, date = list(data.date);
|
|
79
|
+
const number = int(place.number), percent = int(place.percent, 0, 100), total = int(place.total), top = percent && total;
|
|
80
|
+
const known = (a) => a && typeof a.id === 'string' && Object.prototype.hasOwnProperty.call(AGENT_NAME, a.id); // не строка — не агент, даже если как ключ она читается именем
|
|
81
|
+
return {
|
|
82
|
+
year: int(data.year), commits: int(data.commits), commitsClaude: int(data.commitsClaude), projects: int(data.projects),
|
|
83
|
+
streak: int(data.streak), hours: int(data.hours), hoursClaude: int(data.hoursClaude), modelCount: int(data.modelCount),
|
|
84
|
+
// название модели — только знаки, из которых складываются названия у сборщика; прочее показывается как «другая модель»
|
|
85
|
+
models: list(data.models).filter(Boolean).map((m) => ({ name: typeof m.name === 'string' && /^[A-Za-z0-9 .]{1,24}$/.test(m.name) ? m.name : null, share: int(m.share) })),
|
|
86
|
+
cal: list(data.cal).map((d) => list(d).map((x) => int(x))), weeks: list(data.weeks).map((w) => [int(list(w)[0]), int(list(w)[1])]),
|
|
87
|
+
// агент каждого вида один: вторая запись о том же агенте не рисуется
|
|
88
|
+
agents: list(data.agents).filter((a, i, all) => known(a) && all.findIndex((b) => b && b.id === a.id) === i)
|
|
89
|
+
.map((a) => ({ id: a.id, days: int(a.days), sessions: int(a.sessions), sila: int(a.sila), level: int(a.level, 1, 6) })),
|
|
90
|
+
agentDays: int(data.agentDays), rank: int(data.rank, 1, 6),
|
|
91
|
+
date: date.length ? [int(date[0], 1, 12), int(date[1], 1, 31)] : [12, 31],
|
|
92
|
+
place: number && (place.showNumber === true || !top) ? { number } : top ? { percent, total } : null,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Всё, чем шаблон рисует кадр: данные, язык, помощники времени, перевод, маскоты.
|
|
97
|
+
function kit(data, lang, slide, { sprites, codex, command }) {
|
|
98
|
+
const D = normalize(data), LANG = lang === 'en' ? 'en' : 'ru', SLIDE = slide, CARD = SLIDE === CARD_SLIDE, SP = sprites;
|
|
99
|
+
const c01 = (x) => Math.max(0, Math.min(1, x));
|
|
100
|
+
const ease = (p) => 1 - Math.pow(1 - c01(p), 3);
|
|
101
|
+
const seg = (t, a, d) => c01((t - a) / d);
|
|
102
|
+
const cnt = (n, p) => Math.round(n * ease(p));
|
|
103
|
+
const on = (t, a) => t >= a;
|
|
104
|
+
const blink = (t, per = 0.5) => Math.floor(t / per) % 2 === 0;
|
|
105
|
+
const vis = (b) => `visibility:${b ? 'visible' : 'hidden'}`;
|
|
106
|
+
const typed = (s, p) => s.slice(0, Math.round(s.length * c01(p)));
|
|
107
|
+
const bob = (t, k) => (Math.floor(t * 7.5) % 8 < 4 ? 0 : -k);
|
|
108
|
+
const fmt = (n) => LANG === 'en' ? Number(n).toLocaleString('en-US') : String(n).replace(/\B(?=(\d{3})+(?!\d))/g, '\u202f'); // узкий неразрывный пробел
|
|
109
|
+
const plural = (n, f) => { const a = Math.abs(n) % 100, b = a % 10; return a > 10 && a < 20 ? f[2] : b === 1 ? f[0] : b >= 2 && b <= 4 ? f[1] : f[2]; };
|
|
110
|
+
const clawd = (key, k, x = 0, y = 0) => `<img alt="" src="${SP[key]}" style="display:block;image-rendering:pixelated;width:${48 * k}px;height:${40 * k}px;transform:translate(${x}px,${y}px)">`;
|
|
111
|
+
const RANKS = RANK_NAMES[LANG], RANK = RANKS[D.rank - 1], MONTHS = MONTH_NAMES[LANG];
|
|
112
|
+
// На кадре только агенты, по которым есть данные (спека #1, модуль 10). Без агента карточка всё равно рисуется:
|
|
113
|
+
// ранг первый, маскота нет. Строки про Claude Code шаблон показывает, только когда HAS_CLAUDE.
|
|
114
|
+
const AGENTS = D.agents;
|
|
115
|
+
const claude = D.agents.find((a) => a.id === 'claude'), codexAgent = D.agents.find((a) => a.id === 'codex');
|
|
116
|
+
const HAS_CLAUDE = !!claude, HAS_CODEX = !!codexAgent;
|
|
117
|
+
const CLAUDE_DAYS = claude ? claude.days : 0;
|
|
118
|
+
const TITLE = TITLES[AGENTS.map((a) => a.id).sort().join('+')];
|
|
119
|
+
// Чьи дни стоят в строке «дней с …»: Claude Code, а у человека без него — Codex; без агента такой строки нет.
|
|
120
|
+
const MAIN = claude || codexAgent || null, DAYS_WITH = MAIN ? { n: MAIN.days, name: AGENT_NAME[MAIN.id] } : null;
|
|
121
|
+
// Дни, закрашенные в календаре, и их число рядом с ним: с единственным агентом — его дни, «с Claude Code» или «с Codex»;
|
|
122
|
+
// с двумя — дни с любым из них, «с агентом» (сборщик красит объединение); без агента не закрашено ничего.
|
|
123
|
+
const CAL_DAYS = AGENTS.length > 1 ? { n: D.agentDays, name: 'агентом' } : DAYS_WITH; // TODO(текст): «дней с агентом», «день с агентом»
|
|
124
|
+
// Про злость маскота — только когда маскот на кадре есть; без агента строка пустая.
|
|
125
|
+
const ANGRIER = HAS_CLAUDE ? 'чем больше опыта, тем злее клодик' : HAS_CODEX ? 'чем больше опыта, тем злее маскот' : ''; // TODO(текст): «…тем злее маскот»
|
|
126
|
+
const YEAR = D.year, LEAP = new Date(YEAR, 1, 29).getMonth() === 1;
|
|
127
|
+
const OF_YEAR_DAYS = (LANG === 'en' ? 'of ' : 'из ') + (LEAP ? 366 : 365);
|
|
128
|
+
const UP = (s) => String(s).toUpperCase();
|
|
129
|
+
const dd = String(D.date[1]).padStart(2, '0'), DATE = LANG === 'en' ? `${MONTHS[D.date[0] - 1]} ${dd}` : `${dd} ${MONTHS[D.date[0] - 1]}`;
|
|
130
|
+
const WEEKMAX = Math.max(1, ...D.weeks.map((w) => w[0]));
|
|
131
|
+
const ALT = { mar: Math.floor(D.hours / 4.55), bor: Math.floor(D.hours / 2), sleep: Math.floor(D.hours / 8) };
|
|
132
|
+
const unit = (n, k) => LANG === 'en' ? FE[k][n === 1 ? 0 : 1] : plural(n, F[k]);
|
|
133
|
+
// Числа Codex — «40 дней · 90 сессий» — стоят рядом с его маскотом на слайде ранга и на карточке; без Codex — null.
|
|
134
|
+
// Собраны сразу на нужном языке. Сообщений Codex нет нигде: они не считаются. TODO(текст): «N дней · M сессий» / «N days · M sessions».
|
|
135
|
+
const CODEX_LINE = codexAgent ? `${fmt(codexAgent.days)} ${unit(codexAgent.days, 'day')} · ${fmt(codexAgent.sessions)} ${unit(codexAgent.sessions, 'ses')}` : null;
|
|
136
|
+
// «14 проектов и 1 826 коммитов» — целиком на нужном языке, чтобы печаталось по буквам без обрывков перевода
|
|
137
|
+
const chose = (num = fmt) => `${D.projects} ${unit(D.projects, 'proj')} ${LANG === 'en' ? 'and' : 'и'} ${num(D.commits)} ${unit(D.commits, 'com')}`;
|
|
138
|
+
// Модели: неизвестная показывается словами (текст 34); любимая — первая, её может не быть вовсе.
|
|
139
|
+
const OTHER_MODEL = LANG === 'en' ? 'another model' : 'другая модель';
|
|
140
|
+
// other — названия нет: эти слова длиннее любого названия, и шаблон с тесным местом ставит их кеглем меньше.
|
|
141
|
+
const MODELS = D.models.map((m) => ({ name: m.name ?? OTHER_MODEL, share: m.share, other: m.name === null })), FAV = MODELS[0] || null;
|
|
142
|
+
const TOP_SHARE = Math.max(1, FAV ? FAV.share : 0);
|
|
143
|
+
// Место среди участников, три состояния: null — строки нет; { member } — «участник №k» (текст 33); { top, of } — «топ N% из M».
|
|
144
|
+
const place = (num = fmt) => {
|
|
145
|
+
const p = D.place;
|
|
146
|
+
if (!p) return null;
|
|
147
|
+
if (p.number) return { member: LANG === 'en' ? `player #${num(p.number)}` : `участник №${num(p.number)}` };
|
|
148
|
+
const one = p.total % 10 === 1 && p.total % 100 !== 11;
|
|
149
|
+
return LANG === 'en' ? { top: `top ${p.percent}%`, of: `of ${num(p.total)} players` } : { top: `топ ${p.percent}%`, of: `из ${num(p.total)} ${one ? 'участника' : 'участников'}` };
|
|
150
|
+
};
|
|
151
|
+
// Команда, которой получают свою карточку. Имя пакета знает тот, кто рисует (shared/config.json); без него — заглушка.
|
|
152
|
+
const CMD = typeof command === 'string' && /^[a-z0-9@/._-]{1,64}$/.test(command) ? command : null;
|
|
153
|
+
|
|
154
|
+
function trs(s) { // перевод строки
|
|
155
|
+
if (LANG !== 'en' || !/[А-Яа-яЁё]/.test(s)) return s;
|
|
156
|
+
const m = /^(\s*)([\s\S]*?)(\s*)$/.exec(s);
|
|
157
|
+
if (EN[m[2]] !== undefined) return m[1] + EN[m[2]] + m[3];
|
|
158
|
+
let out = s;
|
|
159
|
+
for (const k of EN_KEYS) if (k.length > 3 && out.includes(k)) out = out.split(k).join(EN[k]);
|
|
160
|
+
return out;
|
|
161
|
+
}
|
|
162
|
+
// перевод всего текста кадра: всё, что стоит между тегами
|
|
163
|
+
const trHtml = (html) => (LANG === 'en' ? html.replace(/>([^<]+)</g, (_, text) => `>${trs(text)}<`) : html);
|
|
164
|
+
|
|
165
|
+
// клодик звереет до ранга человека: шаг, кадр спрайта, дрожь. Белой вспышки на всю карточку при смене ступени нет:
|
|
166
|
+
// оператор 03.12.2026 назвал её мерцанием («на долю секунды фон становится белым»).
|
|
167
|
+
function rankState(t, k, start = 0.6, dur = 3.0) {
|
|
168
|
+
const p = seg(t, start, dur) * D.rank, step = Math.min(D.rank - 1, Math.floor(p)), done = t >= start + dur;
|
|
169
|
+
const flick = ['6', '6b', '6c'][Math.floor(t * 9) % 3];
|
|
170
|
+
let key = String(step + 1);
|
|
171
|
+
if (done && D.rank === 6) key = flick;
|
|
172
|
+
const shake = done && D.rank >= 5 ? [[-4, 0], [4, 2], [0, -3], [3, 0]][Math.floor(t * 15) % 4] : [0, bob(t, k)];
|
|
173
|
+
return { step, done, key, shake, flick, t };
|
|
174
|
+
}
|
|
175
|
+
// Один маскот: картинка агента на его ступени. r — состояние ранга (звереет не выше своей ступени) или null (спокойный).
|
|
176
|
+
function mascotOne(a, kk, r, t) {
|
|
177
|
+
const lvl = r ? Math.min(a.level, r.step + 1) : 1, fin = !!(r && r.done), hot = fin && a.level >= 5;
|
|
178
|
+
const [x, y] = r ? (hot ? r.shake : [0, fin ? 0 : bob(r.t, kk)]) : [0, bob(t, kk)];
|
|
179
|
+
const pic = a.id === 'codex'
|
|
180
|
+
? `<img alt="" src="${codex(lvl)}" style="display:block;width:${46 * kk}px;height:${46 * kk}px;margin:${-3 * kk}px ${-2 * kk}px;transform:translate(${x}px,${y}px)">`
|
|
181
|
+
: clawd(fin && a.level === 6 ? r.flick : String(lvl), kk, x, y);
|
|
182
|
+
return { pic, lvl };
|
|
183
|
+
}
|
|
184
|
+
// Маскоты агентов: один или двое рядом, под двумя — подписи; без агента — ничего. Там, где маскот показывает ранг
|
|
185
|
+
// (r задан: слайд ранга и карточка), под маскотом Codex стоят его дни и сессии. Шаблон с тесным местом раскладывает
|
|
186
|
+
// сам через mascotOne и CODEX_LINE.
|
|
187
|
+
function mascots(k, r, t) {
|
|
188
|
+
if (!AGENTS.length) return '';
|
|
189
|
+
const two = AGENTS.length > 1, kk = two ? k * 0.62 : k;
|
|
190
|
+
const line = (text, size) => `<div style="font:700 ${size}px 'Martian Mono', ui-monospace, monospace; color:#fff; text-align:center; white-space:nowrap; margin-top:${Math.round(kk)}px">${text}</div>`;
|
|
191
|
+
const one = (a) => { const m = mascotOne(a, kk, r, t), size = Math.round(Math.max(15, kk * 2.1));
|
|
192
|
+
const cap = two ? line(`${AGENT_NAME[a.id]} · ${RANKS[m.lvl - 1]}`, size) : '';
|
|
193
|
+
// под двумя маскотами строки чисел нет только у клодика — место под ним держится пустой строкой, чтобы маскоты стояли ровно
|
|
194
|
+
const nums = r && HAS_CODEX ? (a.id === 'codex' ? line(CODEX_LINE, size) : two ? line(' ', size) : '') : '';
|
|
195
|
+
return `<div style="display:flex; flex-direction:column; align-items:center; justify-content:flex-end">${m.pic}${cap}${nums}</div>`; };
|
|
196
|
+
return `<div style="display:flex; align-items:flex-end; justify-content:center; gap:${Math.round(kk * 3)}px">${AGENTS.map(one).join('')}</div>`;
|
|
197
|
+
}
|
|
198
|
+
// Лесенка рангов (у «Листа персонажа»): маскот ступени i + 1 — клодик, а у человека без Claude Code — маскот Codex.
|
|
199
|
+
// Картинка Codex берётся, только пока ступень показана и не выше его собственной: в страницу года они вшиты лишь до неё.
|
|
200
|
+
function ladderPic(i, k, shown) {
|
|
201
|
+
if (HAS_CLAUDE) return clawd(String(i + 1), k);
|
|
202
|
+
const box = `width:${48 * k}px; height:${40 * k}px`;
|
|
203
|
+
return HAS_CODEX && shown && i < codexAgent.level ? `<div style="${box}; display:flex; justify-content:center"><img alt="" src="${codex(i + 1)}" style="display:block; height:${40 * k}px"></div>` : `<div style="${box}"></div>`;
|
|
204
|
+
}
|
|
205
|
+
return { D, LANG, SLIDE, N, CARD, c01, ease, seg, cnt, on, blink, vis, typed, bob, fmt, plural, clawd, RANKS, RANK, AGENTS, AGENT_NAME, MONTHS,
|
|
206
|
+
CLAUDE_DAYS, YEAR, LEAP, OF_YEAR_DAYS, DATE, UP, WEEKMAX, ALT, unit, chose, MODELS, FAV, TOP_SHARE, place, CMD, trs, trHtml, rankState, mascotOne, mascots,
|
|
207
|
+
HAS_CLAUDE, HAS_CODEX, TITLE, DAYS_WITH, CAL_DAYS, ANGRIER, CODEX_LINE, ladderPic };
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Сцена — один кадр одного шаблона на одном языке, готовый к показу в любой момент времени.
|
|
212
|
+
* data — данные года; template — 'arcade' | 'badge' | 'teletext' | 'sheet'; lang — 'ru' | 'en'; slide — 1…6 или 7 (карточка);
|
|
213
|
+
* sprites — клодик (sprites.js); codex — ступень → адрес картинки маскота Codex; command — имя команды для строки «получи свой».
|
|
214
|
+
* → { width, height, duration, at(t) → разметка кадра }
|
|
215
|
+
*/
|
|
216
|
+
function scene({ data, template, lang = 'ru', slide = CARD_SLIDE, sprites = G.SPRITES, codex = (level) => `codex/${level}.png`, command = null }) {
|
|
217
|
+
const tpl = TEMPLATES[template];
|
|
218
|
+
if (!tpl) throw new Error(`нет шаблона ${template}`);
|
|
219
|
+
if (!(slide >= 1 && slide <= CARD_SLIDE) || slide % 1) throw new Error(`нет кадра ${slide}`);
|
|
220
|
+
const k = kit(data, lang, slide, { sprites, codex, command });
|
|
221
|
+
const { slides, chrome } = tpl.make(k), duration = k.CARD ? CARD_DURATION : tpl.durs[slide];
|
|
222
|
+
return { width: WIDTH, height: k.CARD ? CARD_HEIGHT : HEIGHT, duration, at: (t = duration) => k.trHtml(chrome(t, slides[slide](t))) };
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Заголовок по агентам участника — тот же, что стоит в шапке кадра: «Мой год с Claude Code», «…с Codex», «…с Claude Code
|
|
227
|
+
* и Codex», без агента — «Мой год». Для тех, кто пишет его рядом с кадром (личный предпросмотр ссылки на сайте).
|
|
228
|
+
*/
|
|
229
|
+
function title(data, lang = 'ru') {
|
|
230
|
+
const text = TITLES[normalize(data).agents.map((a) => a.id).sort().join('+')];
|
|
231
|
+
return lang === 'en' ? EN[text] : text;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/** Данные года, шаблон, язык, кадр, время → разметка кадра. Без t — последний кадр (он же картинка). */
|
|
235
|
+
const frame = (o) => scene(o).at(o.t ?? undefined);
|
|
236
|
+
|
|
237
|
+
/** В браузере: ставит сцену в root (элемент или теневой корень) вместе со стилями шаблона. → сцена и set(t). */
|
|
238
|
+
function mount(root, o) {
|
|
239
|
+
const sc = scene(o);
|
|
240
|
+
// Язык стоит на самом кадре: от него зависят начертания кириллицы в шрифтах, а страница вокруг может его не передать.
|
|
241
|
+
root.innerHTML = `<style>${TEMPLATES[o.template].css}</style><div id="stage" lang="${o.lang === 'en' ? 'en' : 'ru'}" style="height:${sc.height}px"></div>`;
|
|
242
|
+
const stage = root.querySelector('#stage');
|
|
243
|
+
return { ...sc, set: (t) => { stage.innerHTML = sc.at(t); } };
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Страница одного шаблона (karusel/<шаблон>.html): кадр — из адреса, для съёмки — window.setT(t) и window.DURATION.
|
|
248
|
+
* Имя команды — из config.js (его собирает config.mjs из shared/config.json).
|
|
249
|
+
*/
|
|
250
|
+
function standalone(template) {
|
|
251
|
+
const q = new URLSearchParams(location.search), lang = q.get('lang') === 'en' ? 'en' : 'ru', slide = +q.get('slide');
|
|
252
|
+
document.documentElement.lang = lang;
|
|
253
|
+
const m = mount(document.getElementById('karusel'), { data: G.DATA, template, lang, slide: slide >= 1 && slide <= CARD_SLIDE ? Math.trunc(slide) : 1,
|
|
254
|
+
command: G.KARUSEL_CONFIG ? G.KARUSEL_CONFIG.command : null });
|
|
255
|
+
G.DURATION = m.duration;
|
|
256
|
+
G.setT = m.set;
|
|
257
|
+
m.set(+(q.get('t') || m.duration));
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
G.KARUSEL = { TEMPLATES, N, CARD_SLIDE, scene, frame, mount, standalone, title };
|
|
261
|
+
})(globalThis);
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2021 The Martian Mono Project Authors (https://github.com/evilmartians/mono)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2021 The Onest Project Authors (https://github.com/googlefonts/onest)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2021 The Pixelify Sans Project Authors (https://github.com/eifetx/Pixelify-Sans)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|