Compare commits

..

No commits in common. "f6e591c940321ef9a8215ecf7e0c9137e15e195b" and "e8e9886e78198b9efee8389c40bb31ee9c4b39bd" have entirely different histories.

30 changed files with 238 additions and 705 deletions

View file

@ -3,8 +3,8 @@ $dark: #020202;
$light: #fffff0;
// Fonts
$defaultFont: "Domitian", "Palatino Linotype", "Book Antiqua", Palatino, serif;
$codeFont: /*"Input Mono", */"Lucida Console", Monaco, monospace;
$defaultFont: "Palatino Linotype", "Book Antiqua", Palatino, serif;
$codeFont: "Input Mono", "Lucida Console", Monaco, monospace;
// Breakpoints
$breakpoints: (

View file

@ -216,22 +216,11 @@ cite,
}
}
table .cite {
font-style: normal;
}
.episode-number,
.authors--additional,
.comments,
.edition,
.authors--addtional,
.year--original {
font-size: 0.75em;
}
.comments,
.edition {
margin-block-start: 0.4em;
margin-block-end: 0;
opacity: 0.8;
}
code,
@ -317,12 +306,7 @@ kbd {
* Special Text
*/
:where([title]) {
text-decoration: underline;
text-decoration: underline dotted;
&:not(a *) {
cursor: help;
}
}

View file

@ -1,18 +0,0 @@
.log-stats {
text-align: center;
font-size: 1.4em;
& summary {
cursor: pointer;
}
& div {
display: flex;
justify-content: center;
& p {
float: left;
margin-inline-end: 1.2em;
}
}
}

View file

@ -57,7 +57,6 @@
@import "components/icons";
@import "components/item-tile";
@import "components/table";
@import "components/log-stats";
@import "pages/home";
@import "pages/collection";

View file

@ -21,5 +21,3 @@ markup:
renderer:
unsafe: true
enableRobotsTXT: true
ignoreFiles:
- data/media.db

View file

@ -1,14 +1,4 @@
[
{
"name": "EFF Podcast",
"date_added": "2024-07-07",
"date_started": "2024-07-02"
},
{
"name": "Cool People Who Did Cool Stuff",
"date_added": "2024-07-07",
"date_started": "2024-05-30"
},
{
"name": "The Bugle",
"date_added": "2024-04-23"

View file

@ -1,4 +1,66 @@
[
{
"authors": [
{
"ol_id": "OL8140761A",
"name": "Andrea Ellner"
},
{
"ol_id": "OL1484358A",
"name": "Robinson, Paul"
},
{
"ol_id": "OL6618160A",
"name": "David Whetham"
}
],
"isbn_13": "9781134763160",
"languages": [
"eng"
],
"publish_date": "2016",
"publishers": [
"Taylor & Francis Group"
],
"title": "When Soldiers Say No",
"subtitle": "Selective Conscientious Objection in the Modern Military",
"full_title": "When Soldiers Say No Selective Conscientious Objection in the Modern Military",
"work": {
"ol_id": "OL21256292W",
"title": "When Soldiers Say No",
"authors": [
{
"ol_id": "OL8140761A",
"name": "Andrea Ellner"
},
{
"ol_id": "OL1484358A",
"name": "Robinson, Paul"
},
{
"ol_id": "OL6618160A",
"name": "David Whetham"
}
],
"subjects": [
"Military ethics",
"Selective conscientious objection",
"BUSINESS & ECONOMICS",
"Business Ethics",
"Kriegsdienstverweigerung",
"Soldat",
"Vapenv\u00e4gran",
"Etik och moral",
"Krig",
"Ansvar"
],
"date_added": "2024-05-21"
},
"ol_id": "OL35812678M",
"date_added": "2024-05-21",
"date_started": "2024-05-19",
"added_by_id": "9781134763160"
},
{
"publishers": [
"Pluto Press"

View file

@ -1,67 +1,4 @@
[
{
"authors": [
{
"ol_id": "OL8140761A",
"name": "Andrea Ellner"
},
{
"ol_id": "OL1484358A",
"name": "Robinson, Paul"
},
{
"ol_id": "OL6618160A",
"name": "David Whetham"
}
],
"isbn_13": "9781134763160",
"languages": [
"eng"
],
"publish_date": "2016",
"publishers": [
"Taylor & Francis Group"
],
"title": "When Soldiers Say No",
"subtitle": "Selective Conscientious Objection in the Modern Military",
"full_title": "When Soldiers Say No Selective Conscientious Objection in the Modern Military",
"work": {
"ol_id": "OL21256292W",
"title": "When Soldiers Say No",
"authors": [
{
"ol_id": "OL8140761A",
"name": "Andrea Ellner"
},
{
"ol_id": "OL1484358A",
"name": "Robinson, Paul"
},
{
"ol_id": "OL6618160A",
"name": "David Whetham"
}
],
"subjects": [
"Military ethics",
"Selective conscientious objection",
"BUSINESS & ECONOMICS",
"Business Ethics",
"Kriegsdienstverweigerung",
"Soldat",
"Vapenv\u00e4gran",
"Etik och moral",
"Krig",
"Ansvar"
],
"date_added": "2024-05-21"
},
"ol_id": "OL35812678M",
"date_added": "2024-05-21",
"date_started": "2024-05-19",
"added_by_id": "9781134763160",
"date_finished": "2024-07-11"
},
{
"ol_id": "OL3621057W",
"title": "Against His-Story, Against Leviathan!",

View file

@ -1,61 +1,4 @@
[
{
"ol_id": "OL478864W",
"title": "Doing Battle",
"authors": [
{
"ol_id": "OL30002A",
"name": "Paul Fussell"
}
],
"subjects": [
"Biography",
"Critics",
"English teachers",
"Teachers, biography",
"Criticism",
"World war, 1939-1945, personal narratives, american"
],
"date_added": "2024-06-15"
},
{
"ol_id": "OL478876W",
"title": "The Great War and Modern Memory",
"authors": [
{
"ol_id": "OL30002A",
"name": "Paul Fussell"
}
],
"subjects": [
"World War, 1914-1918",
"History and criticism",
"English literature",
"War and literature",
"Literature and the war",
"Memory in literature",
"World War, 1914-1918, in literature",
"Poetry",
"Campaigns",
"English literature, history and criticism, 20th century",
"World war, 1914-1918, great britain",
"World war, 1914-1918, literature and the war",
"World war, 1914-1918, influence",
"English literature--history and criticism",
"English literature--20th century--history and criticism",
"World war, 1914-1918--literature and the war",
"World war, 1914-1918--great britain--literature and the war",
"Pr478.e8 f8",
"820/.93",
"World war, 1914-1918--campaigns",
"World war, 1914-1918--campaigns--western front",
"World war, 1914-1918--poetry",
"World war, 1914-1918, in literature",
"Pr478.e8 f8 2000",
"820.9/358"
],
"date_added": "2024-06-15"
},
{
"ol_id": "OL27282809W",
"title": "Burnout",

View file

@ -1,141 +1,4 @@
[
{
"belongs_to_collection": null,
"genres": [
{
"id": 18,
"name": "Drama"
},
{
"id": 10749,
"name": "Romance"
}
],
"imdb_id": "tt0245574",
"origin_country": [
"MX"
],
"original_language": "es",
"original_title": "Y tu mam\u00e1 tambi\u00e9n",
"overview": "In Mexico, two teenage boys and an attractive older woman embark on a road trip and learn a thing or two about life, friendship, sex, and each other.",
"poster_path": "/izw41PkE8y891yraO6fN1tCNmOG.jpg",
"production_countries": [
{
"iso_3166_1": "MX",
"name": "Mexico"
}
],
"release_date": "2001-06-08",
"spoken_languages": [
{
"english_name": "Spanish",
"iso_639_1": "es",
"name": "Espa\u00f1ol"
}
],
"title": "Y Tu Mam\u00e1 Tambi\u00e9n",
"tmdb_id": 1391,
"date_added": "2024-07-23",
"date_finished": "2024-07-21",
"is_repeat": true,
"added_by_id": "1391"
},
{
"belongs_to_collection": null,
"genres": [],
"imdb_id": null,
"origin_country": [
"FR"
],
"original_language": "fr",
"original_title": "Poolparty",
"overview": "Music video for song by Maryus feat. Qualsiasi (featured at MONTIFF 2024)",
"poster_path": null,
"production_countries": [],
"release_date": "2023-07-05",
"spoken_languages": [
{
"english_name": "French",
"iso_639_1": "fr",
"name": "Fran\u00e7ais"
}
],
"title": "Poolparty",
"tmdb_id": 1319928,
"date_added": "2024-07-23",
"date_finished": "2024-07-20",
"added_by_id": "1319928",
"comments": "MONTIFF"
},
{
"belongs_to_collection": null,
"genres": [],
"imdb_id": "tt30208033",
"origin_country": [
"FR"
],
"original_language": "fr",
"original_title": "Aquarium",
"overview": "A woman attends a stressful and surreal voice-over recording session.",
"poster_path": "/o7U1ZBiwow7cP6iImVPovHfoyeY.jpg",
"production_countries": [],
"release_date": "2023-10-16",
"spoken_languages": [
{
"english_name": "French",
"iso_639_1": "fr",
"name": "Fran\u00e7ais"
},
{
"english_name": "Spanish",
"iso_639_1": "es",
"name": "Espa\u00f1ol"
}
],
"title": "Aquarium",
"tmdb_id": 1319926,
"date_added": "2024-07-23",
"date_finished": "2024-07-20",
"added_by_id": "1319926",
"comments": "MONTIFF"
},
{
"belongs_to_collection": null,
"genres": [
{
"id": 18,
"name": "Drama"
}
],
"imdb_id": "tt27425279",
"origin_country": [
"FR"
],
"original_language": "fr",
"original_title": "D\u00e9shabille-moi",
"overview": "Antoine, a young doctoral student, pays a camgirl for a webcam striptease. But Ana\u00efs, tired of the camshow routine, doesn't want to undress.",
"poster_path": "/amgCR6UmVoN2xOBB98XF2F0na2E.jpg",
"production_countries": [
{
"iso_3166_1": "FR",
"name": "France"
}
],
"release_date": "2023-11-01",
"spoken_languages": [
{
"english_name": "French",
"iso_639_1": "fr",
"name": "Fran\u00e7ais"
}
],
"title": "Undress Me",
"tmdb_id": 1189547,
"date_added": "2024-07-22",
"date_finished": "2024-07-20",
"added_by_id": "1189547",
"comments": "MONTIFF"
},
{
"belongs_to_collection": null,
"genres": [

View file

@ -1,115 +1,17 @@
[
{
"name": "Regent",
"overview": "Amid whispers of bad omens, the Greens consider how to fill a void on Aegon's Council, Jacaerys sets out on a rogue mission to strike a deal, and Daemon enlists Lord Willem Blackwood to help persuade the Brackens to bend the knee.",
"air_date": "2024-07-14",
"episode_number": 5,
"season_number": 2,
"tmdb_id": 5234726,
"name": "Shades Of Grey: Part II",
"overview": "D.I. Deakin and D.S. Boulton are on the trail of the kidnapper, but the children's father has decided to pay the ransom money.",
"air_date": "1997-10-28",
"episode_number": 128,
"season_number": 13,
"tmdb_id": 146134,
"series": {
"tmdb_id": 94997
},
"date_added": "2024-07-16",
"date_finished": "2024-07-16",
"added_by_id": "10396632"
},
{
"name": "The Red Dragon and the Gold",
"overview": "In Rhaenyra's absence and with no word from Daemon at Harrenhal, Rhaenys tries to keep the peace on the Black Council as Cole mounts a campaign into the Crownlands. In King's Landing, Aemond continues to undermine Aegon's fragile hold on authority.",
"air_date": "2024-07-07",
"episode_number": 4,
"season_number": 2,
"tmdb_id": 5234724,
"series": {
"tmdb_id": 94997
},
"date_added": "2024-07-16",
"date_finished": "2024-07-16",
"added_by_id": "10396631"
},
{
"name": "The Burning Mill",
"overview": "As ancient grudges resurface, Rhaenys suggests that Alicent may see reason while the men around her seek bloodshed. Ser Criston proposes a bold scheme. Daemon arrives at Harrenhal to raise an army for the Blacks.",
"air_date": "2024-06-30",
"episode_number": 3,
"season_number": 2,
"tmdb_id": 5234723,
"series": {
"tmdb_id": 94997
},
"date_added": "2024-07-16",
"date_finished": "2024-07-16",
"added_by_id": "10396630"
},
{
"name": "Rhaenyra the Cruel",
"overview": "As Otto schemes to turn the public against her, Rhaenyra questions Daemon's loyalty. Meanwhile, Ser Criston Cole concocts a misguided plan for revenge.",
"air_date": "2024-06-23",
"episode_number": 2,
"season_number": 2,
"tmdb_id": 5234722,
"series": {
"tmdb_id": 94997
},
"date_added": "2024-07-15",
"date_finished": "2024-07-15",
"added_by_id": "10396629"
},
{
"name": "A Son for a Son",
"overview": "While Rhaenyra struggles to come to terms with her son's murder, in King's Landing, Alicent grows concerned that Aegon's Small Council may lead them to an all-out war. Larys suggests Aegon needs a new Hand, and Rhaenyra arrives at a fateful decision.",
"air_date": "2024-06-16",
"episode_number": 1,
"season_number": 2,
"tmdb_id": 5044090,
"series": {
"tmdb_id": 94997
},
"date_added": "2024-07-15",
"date_finished": "2024-07-14",
"added_by_id": "10396624"
},
{
"name": "The New Year\u2019s-Year End Hidden Talent Contest",
"overview": "It had to happen eventually. The producers got behind schedule\u2014there\u2019s way no way enough material for a whole new show could be produced in time. So what plan than to polish off some old clips, do some fancy editing, and make up a review episode? Yes, it\u2019s Excel Saga\u2019s turn for a clip show, framed by a seasonal New Year-Year\u2019s End Hidden Talent Content, as presented by Excel and Hyatt.",
"air_date": "2000-01-06",
"episode_number": 13,
"season_number": 1,
"tmdb_id": 408079,
"series": {
"tmdb_id": 9519
},
"date_added": "2024-07-08",
"date_finished": "2024-07-08",
"added_by_id": "86593"
},
{
"name": "Big City Part II",
"overview": "Having decided that his employees need some additional training, Kabapu sends Watanabe and the others to train under Purin, a detective who can turn from a tough-as-nails old-timer into a cute girl quite literally at the drop of a hat! And whilst they tag along for Purin\u2019s latest case, Excel has some problem solving of her own to do when Hyatt is taken hostage by a pair of burglars.",
"air_date": "1999-12-23",
"episode_number": 12,
"season_number": 1,
"tmdb_id": 408078,
"series": {
"tmdb_id": 9519
},
"date_added": "2024-07-08",
"date_finished": "2024-07-08",
"added_by_id": "86592"
},
{
"name": "Butt Out, Youth!",
"overview": "Thanks to the state of modern education, the future is looking bleak\u2014and that means that Across must take action. To that end, Ilpalazzo sends Excel and Hyatt to work at Excel\u2019s old high school, which has since become a dumping ground for all manner of juvenile delinquents. But no sooner have they tamed the students than a new challenge arises\u2014whipping the school\u2019s woefully poor baseball team back into shape. But even with all the clich\u00e9s of sports anime on their side, will Excel and Hyatt be able to create a team good enough to win their crucial match against the Monkey Balls High team?",
"air_date": "1999-12-16",
"episode_number": 11,
"season_number": 1,
"tmdb_id": 408077,
"series": {
"tmdb_id": 9519
"tmdb_id": 2072
},
"date_added": "2024-07-04",
"date_finished": "2024-07-04",
"added_by_id": "86591"
"added_by_id": "9519"
},
{
"name": "The Black Queen",
@ -28551,4 +28453,4 @@
"date_added": "2024-03-19",
"added_by_id": "4517464"
}
]
]

View file

@ -9,8 +9,7 @@
{{ define "main-header" }}
<header class="site-content__header">
{{- .Scratch.Set "section" ( first 1 ( split .File.Dir "/" ) ) -}}
{{- $section := .Scratch.Get "section" -}}
{{ $section := first 1 ( split .File.Dir "/" ) }}
{{ if ( or ( in "books" ( delimit $section "" ) ) ( in "games" ( delimit $section "" ) ) ) }}
<a href="/{{ delimit $section "" }}/current">Current</a> ~
{{ end }}
@ -29,27 +28,18 @@
{{ end }}
{{ define "main-body" }}
<main class="site-content__body">
<main class="site-content__body">
{{ if .File }}
{{ .Scratch.Set "page" ( index ( split .File.Dir "/" ) 1 ) }}
{{ if ( in "current log wishlist" ( .Scratch.Get "page" ) ) }}
{{ if ( eq ( .Scratch.Get "page" ) "current" ) }}
{{ .Scratch.Set "listMode" "current" }}
{{ else if ( eq ( .Scratch.Get "page" ) "log" ) }}
{{ .Scratch.Set "listMode" "log" }}
{{ else if ( eq ( .Scratch.Get "page" ) "wishlist" ) }}
{{ .Scratch.Set "listMode" "wishlist" }}
{{ end }}
{{ partial "stats" . }}
{{ partial "table" . }}
{{ end }}
{{ end }}
</main>

View file

@ -0,0 +1,7 @@
<p class="year">{{- index . "Year Published" -}}
{{- if ( index . "Original Publication Year" ) -}}
{{- if ( ne ( index . "Original Publication Year" ) ( index . "Year Published" ) ) -}}
&nbsp;<span class="year--original">(<abbr title="original publication year">orig.</abbr>&nbsp;{{ index . "Original Publication Year" }})</span>
{{- end -}}
{{- end -}}
</p>

View file

@ -1,34 +0,0 @@
{{- with .Author -}}
<p class="authors">{{ . }}</p>
{{- else -}}
{{- $authors_names := slice -}}
{{- range .authors -}}
{{- $authors_names = $authors_names | append .name -}}
{{- end -}}
{{- range .work.authors -}}
{{- $authors_names = $authors_names | append .name -}}
{{- end -}}
{{- if .contributors -}}
{{- range ( where .contributors "role" "like" `[aA]uthor` ) -}}
{{- $authors_names = $authors_names | append .name -}}
{{- end -}}
{{- end -}}
<p class="authors">{{ delimit ( uniq $authors_names ) ", " }}</p>
{{- end -}}
{{- if .contributors -}}
{{- $translators_names := slice -}}
{{- range ( where .contributors "role" "like" `[tT]ranslat` ) -}}
{{- $translators_names = $translators_names | append .name -}}
{{- end -}}
{{- with $translators_names -}}
<p class="authors--additional">Translator(s): {{ delimit ( uniq . ) ", " }}</p>
{{- end -}}
{{- end -}}
{{- with ( index . "Additional Authors" ) -}}
<p class="authors--additional">Additional Author(s): {{ . }}</p>
{{- end -}}

View file

@ -1,7 +0,0 @@
<p class="year">{{- .publish_date -}}
{{- if .first_publish_date -}}
{{- if ( ne .first_publish_date .publish_date ) -}}
&nbsp;<span class="year--original">(<abbr title="original publication year">orig.</abbr>&nbsp;{{ .first_publish_date }})</span>
{{- end -}}
{{- end -}}
</p>

View file

@ -1,9 +0,0 @@
{{- with .date_started -}}
{{- time.Format "Jan 2, 2006" . -}}
{{- else -}}
Unknown
{{- end -}}&ndash;{{- with .date_finished -}}
{{- time.Format "Jan 2, 2006" . -}}
{{- else -}}
Unknown
{{- end -}}

View file

@ -1,23 +0,0 @@
{{-
$cite_options := ( dict
"c" .c
"g" .g
"section" "books"
"schemaType" "Book"
"title" ( cond ( isset .c "subtitle" ) (
printf "%s: %s" .c.title .c.subtitle
) (
.c.title
)
)
"edition" (
default .c.edition_name .c.Edition
)
)
-}}
{{- if .c.work.original_language -}}
{{- $cite_options = merge $cite_options ( dict "titleLang" .c.work.original_language "titleTrans" .c.work.title ) -}}
{{- end -}}
{{- partial "cite" $cite_options -}}

View file

@ -1,26 +1,23 @@
{{ if ( eq ( .Scratch.Get "listMode" ) "current" ) }}
{{ range ( sort $.Site.Data.books.current "date_started" "desc" ) }}
{{ range ( sort $.Site.Data.books.current "Date Started" "desc" ) }}
<tr>
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ else }}n/a{{ end }}</td>
<td>{{ if index . "Date Added" }}{{ time.Format "Jan 2, 2006" ( index . "Date Added" ) }}{{ else }}n/a{{end }}</td>
<td>
{{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}}
{{- with .comments -}}
<p class="comments">Comments: {{ . }}</p>
{{- partial "cite" ( dict "c" . "schemaType" "Book" ) -}}
</td>
<td>
<p class="author">{{ .Author }}</p>
{{- if ( index . "Additional Authors" ) -}}
<p class="author--additional">Additional: {{ index . "Additional Authors" }}</p>
{{- end -}}
</td>
<td>
{{- partial "books/rows/authors.html" . -}}
{{- partial "books/publication-year.html" . -}}
</td>
<td>
{{- partial "books/rows/publish-date.html" . -}}
</td>
<td>
{{- partial "books/rows/read-dates.html" . -}}
{{- if index . "Date Started" -}}
{{- time.Format "Jan 2, 2006" ( index . "Date Started" ) -}}
{{- end -}}&ndash;
</td>
</tr>
{{ end }}
@ -30,26 +27,39 @@
</tr>
{{ range ( sort ( where $.Site.Data.books.log "Date Finished" "!=" "" ) "Date Finished" "desc" ) }}
<tr>
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ else }}n/a{{ end }}</td>
<td>{{ if index . "Date Added" }}{{ time.Format "Jan 2, 2006" ( index . "Date Added" ) }}{{ else }}n/a{{end }}</td>
<td>
{{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}}
{{- with .comments -}}
<p class="comments">Comments: {{ . }}</p>
<p>
{{- with ( where ( where $.Site.Pages "Section" "books" ) "Title" .Title ) -}}
{{ range . }}
<a href="{{ .RelPermalink }}">
{{ end }}
{{- end -}}
<cite class="book">{{ .Title }}</cite>{{ if .Edition }} <span class="book--edition">({{ .Edition }})</span>{{ end }}
{{- with ( where ( where $.Site.Pages "Section" "books" ) "Title" .Title ) -}}
</a>
{{- end -}}
</p>
</td>
<td>
<p class="author">{{ .Author }}</p>
{{- if ( index . "Additional Authors" ) -}}
<p class="author--additional">Additional: {{ index . "Additional Authors" }}</p>
{{- end -}}
</td>
<td>
{{- partial "books/rows/authors.html" . -}}
{{- partial "books/publication-year.html" . -}}
</td>
<td>
{{- partial "books/rows/publish-date.html" . -}}
</td>
<td>
{{- partial "books/rows/read-dates.html" . -}}
{{- if index . "Date Started" -}}
{{- time.Format "Jan 2, 2006" ( index . "Date Started" ) -}}
{{- else -}}
Unknown
{{- end -}}&ndash;{{- if index . "Date Finished" -}}
{{- time.Format "Jan 2, 2006" ( index . "Date Finished" ) -}}
{{- else -}}
Unknown
{{- end -}}
</td>
</tr>
{{ end }}
@ -58,50 +68,68 @@
</tr>
{{ range ( sort ( where $.Site.Data.books.log "Date Finished" "" ) "Title" "asc" ) }}
<tr>
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ else }}n/a{{ end }}</td>
<td>{{ if index . "Date Added" }}{{ time.Format "Jan 2, 2006" ( index . "Date Added" ) }}{{ else }}n/a{{end }}</td>
<td>
{{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}}
{{- with .comments -}}
<p class="comments">Comments: {{ . }}</p>
<p>
{{- with ( where ( where $.Site.Pages "Section" "books" ) "Title" .Title ) -}}
{{ range . }}
<a href="{{ .RelPermalink }}">
{{ end }}
{{- end -}}
<cite class="book">{{ .Title }}</cite>{{ if .Edition }} <span class="book--edition">({{ .Edition }})</span>{{ end }}
{{- with ( where ( where $.Site.Pages "Section" "books" ) "Title" .Title ) -}}
</a>
{{- end -}}
</p>
</td>
<td>
<p class="author">{{ .Author }}</p>
{{- if ( index . "Additional Authors" ) -}}
<p class="author--additional">Additional: {{ index . "Additional Authors" }}</p>
{{- end -}}
</td>
<td>
{{- partial "books/rows/authors.html" . -}}
{{- partial "books/publication-year.html" . -}}
</td>
<td>
{{- partial "books/rows/publish-date.html" . -}}
</td>
<td>
{{- partial "books/rows/read-dates.html" . -}}
{{- if index . "Date Started" -}}
{{- time.Format "Jan 2, 2006" ( index . "Date Started" ) -}}
{{- else -}}
Unknown
{{- end -}}&ndash;{{- if index . "Date Finished" -}}
{{- time.Format "Jan 2, 2006" ( index . "Date Finished" ) -}}
{{- else -}}
Unknown
{{- end -}}
</td>
</tr>
{{ end }}
{{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }}
{{ range ( sort $.Site.Data.books.wishlist "Title" "asc" ) }}
<tr>
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ else }}n/a{{ end }}</td>
<td>{{ if index . "Date Added" }}{{ time.Format "Jan 2, 2006" ( index . "Date Added" ) }}{{ else }}n/a{{end }}</td>
<td>
{{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}}
{{- with .comments -}}
<p class="comments">Comments: {{ . }}</p>
<p>
{{- with ( where ( where $.Site.Pages "Section" "books" ) "Title" .Title ) -}}
{{ range . }}
<a href="{{ .RelPermalink }}">
{{ end }}
{{- end -}}
<cite class="book">{{ .Title }}</cite>{{ if .Edition }} <span class="book--edition">({{ .Edition }})</span>{{ end }}
{{- with ( where ( where $.Site.Pages "Section" "books" ) "Title" .Title ) -}}
</a>
{{- end -}}
</p>
</td>
<td>
<p class="author">{{ .Author }}</p>
{{- if ( index . "Additional Authors" ) -}}
<p class="author--additional">Additional: {{ index . "Additional Authors" }}</p>
{{- end -}}
</td>
<td>
{{- partial "books/rows/authors.html" . -}}
{{- partial "books/publication-year.html" . -}}
</td>
<td>
{{- partial "books/rows/publish-date.html" . -}}
</td>
<td>n/a</td>
</tr>
{{ end }}

View file

@ -1,21 +1,16 @@
{{- $itemType := default "CreativeWork" .schemaType -}}
{{- $pages := where ( where .g.Site.Pages "Section" .section ) "title" .title | first 1 -}}
{{- with .c -}}
{{- with $pages -}}{{- range . -}}<a href="{{ .RelPermalink }}">{{- end -}}{{- end -}}
<cite
class="cite{{ with .citeStyle }} cite--{{ . }}{{ end }}"
itemscope
itemprop="citation"
itemtype="https://schema.org/{{- $itemType -}}"
{{- if $.titleTrans -}}
lang="{{- $.titleLang -}}"
title="{{- $.titleTrans -}}"
{{- end -}}>
{{- default .Title $.title -}}
</cite>
{{- with $pages -}}</a>{{- end -}}
{{- with $.edition }}<p class="edition">{{ . }}</p>{{- end -}}
<cite
class="cite{{ with .CiteStyle }} cite--{{ . }}{{ end }}"
itemscope
itemprop="citation"
itemtype="https://schema.org/{{- $itemType -}}"
{{- if .TitleLang -}}
lang="{{- .TitleLang -}}"
title="{{- .TitleTrans -}}"
{{- end -}}>
{{- default .Title $.title -}}
</cite>
{{- if .Edition }} <span class="edition">({{ .Edition }})</span>{{- end -}}
{{- end -}}

View file

@ -2,23 +2,16 @@
<tr>
<td colspan=4><h3>Diary</h3></td>
</tr>
{{ range ( sort ( where $.Site.Data.films.log "date_finished" "!=" "" ) "date_finished" "desc" ) }}
{{ range ( sort ( where $.Site.Data.films.log "date_completed" "!=" "" ) "date_completed" "desc" ) }}
<tr>
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
<td>
{{- partial "cite" ( dict "c" . "g" $ "section" "films" "schemaType" "Movie" "title" .title "titleLang" .original_language "titleTrans" .original_title ) -}}
{{- with .comments -}}
<p class="comments">Comments: {{ . }}</p>
{{- end -}}
{{ .title }}
</td>
<td>{{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
<td>
{{- if .date_finished -}}
{{- time.Format "Jan 2, 2006" .date_finished -}}
{{- if .date_completed -}}
{{- time.Format "Jan 2, 2006" .date_completed -}}
{{- if .is_repeat }} &#x21BB;{{ end -}}
{{- else -}}
n/a
@ -29,23 +22,24 @@
<tr>
<td colspan=4><h3>Assorted</h3></td>
</tr>
{{ range ( sort ( where $.Site.Data.films.log "date_finished" "" ) "title" "asc" ) }}
{{ range ( sort ( where $.Site.Data.films.log "date_completed" "" ) "title" "asc" ) }}
<tr>
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
<td>
{{- partial "cite" ( dict "c" . "g" $ "section" "films" "schemaType" "Movie" "title" .title "titleLang" .original_language "titleTrans" .original_title ) -}}
{{- with .comments -}}
<p class="comments">Comments: {{ . }}</p>
{{- end -}}
{{- with ( where ( where $.Site.Pages "Section" "films" ) "title" .title ) -}}
{{ range . }}
<a href="{{ .RelPermalink }}">
{{ end }}
{{- end -}}
<cite class="film">{{ .title }}</cite>
{{- with ( where ( where $.Site.Pages "Section" "films" ) "title" .title ) -}}
</a>
{{- end -}}
</td>
<td>{{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
<td>
{{- if .date_finished -}}
{{- time.Format "Jan 2, 2006" .date_finished -}}
{{- if .date_completed -}}
{{- time.Format "Jan 2, 2006" .date_completed -}}
{{- if .is_repeat }} &#x21BB;{{ end -}}
{{- else -}}
n/a
@ -57,20 +51,21 @@
{{ range ( sort $.Site.Data.films.wishlist "title" "asc" ) }}
<tr>
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
<td>
{{- partial "cite" ( dict "c" . "g" $ "section" "films" "schemaType" "Movie" "title" .title "titleLang" .original_language "titleTrans" .original_title ) -}}
{{- with .comments -}}
<p class="comments">Comments: {{ . }}</p>
{{- with ( where ( where $.Site.Pages "Section" "films" ) "title" .title ) -}}
{{ range . }}
<a href="{{ .RelPermalink }}">
{{ end }}
{{- end -}}
<cite class="film">{{ .title }}</cite>
{{- with ( where ( where $.Site.Pages "Section" "films" ) "title" .title ) -}}
</a>
{{- end -}}
</td>
<td>{{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
<td>
{{- if .date_finished -}}
{{- time.Format "Jan 2, 2006" .date_finished -}}
{{- if .date_completed -}}
{{- time.Format "Jan 2, 2006" .date_completed -}}
{{- if .is_repeat }} &#x21BB;{{ end -}}
{{- else -}}
n/a

View file

@ -1,4 +1,4 @@
<th>Date Added</th>
<th>Title</th>
<th>Release Date</th>
<th>Release Year</th>
<th>Date Watched</th>

View file

@ -2,7 +2,7 @@
{{ range ( sort $.Site.Data.games.current "Date Started" "desc" ) }}
<tr>
<td>
{{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}}
{{- partial "cite" ( dict "c" . "schemaType" "VideoGame" ) -}}
</td>
<td>{{ index . "Date Released" }}</td>
<td>{{ .Platforms }}</td>
@ -22,7 +22,7 @@
{{ range ( sort ( where $.Site.Data.games.log "Date Finished" "!=" "" ) "Date Finished" "desc" ) }}
<tr>
<td>
{{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}}
{{- partial "cite" ( dict "c" . "schemaType" "VideoGame" ) -}}
</td>
<td>{{ index . "Date Released" }}</td>
<td>{{ .Platforms }}</td>
@ -46,7 +46,7 @@
{{ range ( sort ( where $.Site.Data.games.log "Date Finished" "" ) "Title" "asc" ) }}
<tr>
<td>
{{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}}
{{- partial "cite" ( dict "c" . "schemaType" "VideoGame" ) -}}
</td>
<td>{{ index . "Date Released" }}</td>
<td>{{ .Platforms }}</td>
@ -68,7 +68,7 @@
{{ range ( sort $.Site.Data.games.wishlist "Title" "asc" ) }}
<tr>
<td>
{{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}}
{{- partial "cite" ( dict "c" . "schemaType" "VideoGame" ) -}}
</td>
<td>{{ index . "Date Released" }}</td>
<td>{{ .Platforms }}</td>

View file

@ -1,22 +0,0 @@
{{- $series_tmdb_id := .tmdb_id -}}
{{- $series := "" -}}
{{- range ( index .g.Site.Data.tv_series.current ) -}}
{{- if ( eq .tmdb_id $series_tmdb_id ) -}}
{{- $series = . -}}
{{- end -}}
{{- end -}}
{{- range ( index .g.Site.Data.tv_series.log ) -}}
{{- if ( eq .tmdb_id $series_tmdb_id ) -}}
{{- $series = . -}}
{{- end -}}
{{- end -}}
{{- range ( index .g.Site.Data.tv_series.wishlist ) -}}
{{- if ( eq .tmdb_id $series_tmdb_id ) -}}
{{- $series = . -}}
{{- end -}}
{{- end -}}
{{- return $series -}}

View file

@ -1,26 +0,0 @@
{{- $section := default "" ( .Scratch.Get "section" ) -}}
{{- $list_mode := default "" ( .Scratch.Get "listMode" ) -}}
{{- $log_file := index ( index $.Site.Data $section ) $list_mode -}}
{{- if $log_file -}}
{{- $total := len $log_file -}}
{{- $today := time.Now -}}
{{- $this_year_total := len ( where ( where $log_file "date_finished" "gt" ( ( $today.AddDate -1 0 0 ).Format "2006-01-02" ) ) "date_finished" "lt" "2024-12-31" ) -}}
{{- $this_quarter_total := len ( where ( where $log_file "date_finished" "gt" ( ( $today.AddDate 0 -3 0 ).Format "2006-01-02" ) ) "date_finished" "lt" "2024-09-30" ) -}}
{{- $this_month_total := len ( where ( where $log_file "date_finished" "gt" ( ( $today.AddDate 0 -1 0 ).Format "2006-01-02" ) ) "date_finished" "lt" "2024-07-31" ) -}}
<details class="log-stats">
<summary>Summary</summary>
<div>
<p>Total: {{ $total }}</p>
{{- if eq $list_mode "log" -}}
<p>Last 12 months: {{ $this_year_total }}</p>
<p>Last 3 months: {{ $this_quarter_total }}</p>
<p>Last month: {{ $this_month_total }}</p>
{{- end -}}
</div>
</details>
{{- end -}}

View file

@ -1,45 +1,25 @@
{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
{{ .Scratch.Set "filterCol" "date_finished" }}
{{ .Scratch.Set "filterCol" "Date Watched" }}
{{ .Scratch.Set "filterDir" "desc" }}
{{ end }}
{{ range ( sort ( index $.Site.Data.tv_episodes ( .Scratch.Get "listMode" ) ) ( .Scratch.Get "filterCol" ) ( .Scratch.Get "filterDir" ) ) }}
{{ range ( sort ( index $.Site.Data.tv ( .Scratch.Get "listMode" ) ) ( .Scratch.Get "filterCol" ) ( .Scratch.Get "filterDir" ) ) }}
<tr>
<td>
{{- with ( index . "Series Title" ) -}}
<cite class="cite" itemscope itemtype="TVSeries">{{ . }}</cite>
{{- else -}}
{{- $series := partialCached "series_by_id" ( dict "g" $ "tmdb_id" .series.tmdb_id ) .series.tmdb_id -}}
{{- if ( not ( eq $series "" ) ) -}}
{{- partial "cite" ( dict "c" . "g" $ "section" "tv" "schemaType" "TVSeries" "title" $series.name "titleLang" $series.original_language "titleTrans" $series.original_name ) -}}
{{- else -}}
Unknown series
{{- end -}}
{{- end -}}
{{- partial "cite" ( dict "c" . "schemaType" "TVSeries" "title" ( index . "Series Title" ) ) -}}
</td>
<td>
{{- if ( index . "Episode Title" ) -}}
{{- partial "cite" ( dict "c" . "g" $ "section" "tv" "schemaType" "TVEpisode" "title" ( index . "Episode Title" ) ) -}}
<span class="episode-number">({{ index . "Episode Number" }})</span>
{{- else -}}
{{- partial "cite" ( dict "c" . "g" $ "section" "tv" "schemaType" "TVEpisode" "title" .name ) -}}
<span class="episode-number">(S{{ .season_number }}E{{ .episode_number }})</span>
{{- end -}}
{{- partial "cite" ( dict "c" . "schemaType" "TVEpisode" "title" ( index . "Episode Title" ) ) -}}
<span class="episode-number">({{ index . "Episode Number" }})</span>
</td>
<td>
{{- if ( or ( index . "Date Watched" ) .date_finished ) -}}
{{- with ( index . "Date Watched" ) -}}
{{- time.Format "Jan 2, 2006" . -}}
{{- else -}}
{{- time.Format "Jan 2, 2006" .date_finished -}}
{{- end -}}
{{- if ( or .is_rewatch .Rewatch ) }} &#x21BB;{{ end -}}
{{- else -}}
n/a
{{- end -}}
{{- if ( index . "Date Watched" ) -}}
{{- time.Format "Jan 2, 2006" ( index . "Date Watched" ) -}}
{{- if .Rewatch }} &#x21BB;{{ end -}}
{{- else -}}
n/a
{{- end -}}
</td>
</tr>
{{ end }}

View file

@ -3,7 +3,6 @@
"version": "1.0.0",
"description": "Ben Goldsworthy's media cataloguing site.",
"scripts": {
"dev": "snap run hugo serve",
"build": "rm -rf ./public/ && snap run hugo --templateMetrics --templateMetricsHints",
"deploy": "rsync -rP ./public/ ovhvps:~/catalogue/content",
"add": "python ./scripts/add_item.py",

View file

@ -101,7 +101,7 @@ def delete_existing(item_id: str, media_type: str, log: str) -> None:
else:
raise Exception("Invalid ID for book")
elif media_type in ["films", "tv_episodes"]:
elif media_type in ["films", "tv-episodes"]:
if re.search("tt[0-9]+", item_id) is not None:
id_key = "isbn_id"
elif re.search("[0-9]+", item_id) is not None:
@ -150,10 +150,10 @@ def check_for_existing(
p_log for p_log in ["log", "current", "wishlist"] if p_log != log
]:
if (
"current" == log_to_check and media_type in ["books", "games", "tv_series"]
"current" == log_to_check and media_type in ["books", "games", "tv-series"]
) or (
"wishlist" == log_to_check
and media_type in ["books", "games", "films", "tv_series"]
and media_type in ["books", "games", "films", "tv-series"]
):
existing_item = return_if_exists(item_id, media_type, log_to_check)
if existing_item is not None:
@ -169,7 +169,7 @@ def add_item_to_log(item_id: str, media_type: str, log: str) -> None:
item: dict | None = None
log_to_delete = None
if media_type not in ["tv_episodes", "books"]:
if media_type not in ["tv-episodes", "books"]:
item, log_to_delete = check_for_existing(item_id, media_type, log)
if item is None:
@ -203,7 +203,7 @@ def add_item_to_log(item_id: str, media_type: str, log: str) -> None:
item = new_item if new_item is not None else item
if log in ["log", "current"]:
if "date_started" not in item and media_type in ["books", "tv_series", "games"]:
if "date_started" not in item and media_type in ["books", "tv-series", "games"]:
date_started = ""
while re.search("[0-9]{4}-[0-9]{2}-[0-9]{2}", date_started) is None:
date_started = input("Enter date started [YYYY-MM-DD, t for today]: ")
@ -260,10 +260,10 @@ def add_item_to_log(item_id: str, media_type: str, log: str) -> None:
def import_by_id(import_id, media_type, log) -> dict | None:
"""Import from the appropriate API by unique ID"""
if media_type in ["films", "tv_series"]:
if media_type in ["films", "tv-series"]:
return import_from_tmdb_by_id(import_id, media_type)
if media_type in ["tv_episodes"]:
if media_type in ["tv-episodes"]:
return import_from_tmdb_by_external_id(import_id, media_type)
if media_type in ["books"]:
@ -307,9 +307,9 @@ def import_from_tmdb_by_external_id(external_id, media_type) -> dict:
raise Exception(f"Error {response.status_code}: {response.text}")
key = ""
if "tv_episodes" == media_type:
if "tv-episodes" == media_type:
key = "tv_episode_results"
elif "tv_series" == media_type:
elif "tv-series" == media_type:
key = "tv_results"
elif "films" == media_type:
key = "movie_results"
@ -537,11 +537,11 @@ def cleanup_result(item, media_type) -> dict:
if field_name in item:
del item[field_name]
if media_type in ["films", "tv_series", "tv_episodes"]:
if media_type in ["films", "tv-series", "tv-episodes"]:
item["tmdb_id"] = item["id"]
del item["id"]
title_key = "name" if "tv_series" == media_type else "title"
title_key = "name" if "tv-series" == media_type else "title"
if f"original_{title_key}" in item and "original_language" in item:
if (
@ -550,7 +550,7 @@ def cleanup_result(item, media_type) -> dict:
):
del item[f"original_{title_key}"], item["original_language"]
if "tv_episodes" == media_type:
if "tv-episodes" == media_type:
item["series"] = {"tmdb_id": item["show_id"]}
del item["show_id"]
@ -605,8 +605,8 @@ def main() -> None:
"""Prompt user to select media type and log to process"""
media_type = ""
while media_type not in ["films", "tv_episodes", "tv_series", "books"]:
media_type = input("Select media type [films|tv_episodes|tv_series|books]: ")
while media_type not in ["films", "tv-episodes", "tv-series", "books"]:
media_type = input("Select media type [films|tv-episodes|tv-series|books]: ")
try:
item_id = ""
@ -628,12 +628,12 @@ def main() -> None:
else:
item_id = "".join(re.findall(r"\d+", input("Enter ISBN: ")))
elif "tv_episodes" == media_type:
elif "tv-episodes" == media_type:
log = "log"
while re.search("(tt)?[0-9]+", item_id) is None:
item_id = input("Enter TVDB or IMDB ID: ")
elif "tv_series" == media_type:
elif "tv-series" == media_type:
while log not in ["log", "current", "wishlist"]:
log = input("Enter log to update [log|current|wishlist]: ")