From: Mischa POSLAWSKY Date: Sun, 2 Jan 2022 00:00:51 +0000 (+0100) Subject: word/edit: remap/rename priority levels X-Git-Tag: v1.13~51 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/588ae20483b15e9accb6a14090f127ef87cbf4a5 word/edit: remap/rename priority levels Insert additional levels to distinguish within animal groups, such as recent mapping of different species with various levels of notoriety. Splits priority 2 and 3 into two options each: UPDATE word SET prio = prio + 1 WHERE prio > 2; 0 essential → essential : core terms and categorisation 1 basic → ubiquitous : beginner level words 2 common → basic : internationally known → common : expected, readily recognisable 3 distinctive → distinctive : native names, popular genus 4 optional → specialised : significant species in field 5 invisible → rare : expert distinction or knowledge invisible : placeholder group, ignored For future listings of people, it would map to Brian Buckley's hierarchy of fame : 1 = l8 Incredulity (Einstein, Shakespeare, Jesus, Batman) 2 = l7 Reassessment− (Joan of Arc, Bill Gates, Moses, Vader) 3 = l6 Hiccup− (Newton, Jobs, Lennon, Lancelot, Jabba) 4 = l5 Ambivalence (Elon Musk, Carl Sagan, Lovecraft, Boba Fett) 5 = l4 Hiccup+ (Randall Munroe, Shigeru Miyamoto, Sylvia Plath, Mothma) 6 = l3 Reassessment+ (Douglas Hofstadter, Carl Linnaeus, Kosh) 7 = l2 Explanation (notable not famous: Lu Xun, Jane Espenson, Sim Aloo) --- diff --git a/word.plp b/word.plp index f47c4f4..89da827 100644 --- a/word.plp +++ b/word.plp @@ -14,7 +14,7 @@ if ($Request and $Request =~ m{\A([^/]+)}) { } my $wordlist = "$wordlistbase.inc.pl"; -my $limit = $get{v} // (exists $get{v} ? 4 : 3); +my $limit = $get{v} // (exists $get{v} ? 5 : 3); Html({ title => 'words cheat sheet', diff --git a/word/edit.plp b/word/edit.plp index 5957b1a..8b9311c 100644 --- a/word/edit.plp +++ b/word/edit.plp @@ -90,7 +90,9 @@ my %wordcol = ( prio => [ {-label => 'Level', -select => sub { my ($row) = @_; - my @enum = qw[ essential basic common distinctive optional invisible ]; + my @enum = qw[ + essential ubiquitous basic common distinctive specialised rare invisible + ]; return { ('' => 'parent') x (defined $row->{ref}), map { $_ => $enum[$_] } 0 .. $#enum @@ -226,7 +228,7 @@ elsif (defined $post{form}) {{ else { $row->{lang} //= $user->{editlang}->[0] unless exists $row->{lang}; $row->{$_} = $get{$_} for keys %get; - $row->{prio} = defined $row->{ref} ? undef : 1 unless exists $row->{prio}; + $row->{prio} = defined $row->{ref} ? undef : 4 unless exists $row->{prio}; } eval { diff --git a/word/quiz.js b/word/quiz.js index 187aea7..2385455 100644 --- a/word/quiz.js +++ b/word/quiz.js @@ -49,7 +49,7 @@ class WordQuiz { this.preset.cat = input[0]; } if (window.location.hash.match(/a/)) { - this.preset.level = 2; + this.preset.level = 3; } fetch(dataurl).then(res => res.json()).then(json => {