From 5c2278d6ee056898720005d3e1ed463979f3da0a Mon Sep 17 00:00:00 2001 From: nate smith Date: Fri, 15 Mar 2024 16:01:28 -0700 Subject: [PATCH] crappy WIP experimenting with layout --- assets/main.js | 4 +++- main.go | 27 +++++++++++++++++++++++++++ templates/index.tmpl | 43 +++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 71 insertions(+), 3 deletions(-) diff --git a/assets/main.js b/assets/main.js index 02ef8bf..c9512ba 100644 --- a/assets/main.js +++ b/assets/main.js @@ -214,7 +214,9 @@ class PoemLine extends HTMLDivElement { this.querySelector(".linetext").innerText = payload.Text; this.querySelector(".linetext").setAttribute("data-source", payload.Source.Name); this.originalText = payload.Text; - this.querySelector("p[is=source-text]").update(payload.Source); + const source = payload.Source + const sourceName = source.Name.slice(source.Name.indexOf(' ')); + this.querySelector(".source").innerText = sourceName; }); } } diff --git a/main.go b/main.go index 6e693db..25ac4bf 100644 --- a/main.go +++ b/main.go @@ -15,6 +15,33 @@ import ( _ "github.com/mattn/go-sqlite3" ) +// TODO multiple backends +// I've been waffling on the question of whether to support multiple backends. +// there are two narratives here. +// NARRATIVE ONE: TRUNKLESS IS AN ART MACHINE BASED ON GUTENBERG +// Trunkless is specifically about exploring the project gutenberg corpus. It's a massive corpus that depicts a particular era of the English language. This focus means anyone working with it is exploring the same phrase space. +// +// Poets wishing for a similar interface that can be used generally should consult $TOOLTHATDOESNOTEXIST for doing digital cutup poetry locally. + +// NARRATIVE TWO: TRUNKLESS IS A GENERAL PURPOSE CUTUP POETRY WORKBENCH +// Embodied in trunkless is a fundamental user interface for making digital cut-up poetry. This interface can support any kind of phrase backend. Because preparing the phrase backends is time and labor consuming, the user-poets cannot add their own; however, they can submit them for addition. + +// If I wanted to support multiple backends what would it take? +// - a backend selector on the web tool -- drop down +// - extension of schema to include more clear metadata -- specifically a an optional sourceURL +// - changes to this file to support pairs of (dsn, maxID)s +// +// it's not that hard but given that i'm a stopgap for adding new phrase backends it feels like wasted effort. + +// what about this narrative? I launch just with gutenberg and see if I hear "wow i want this for other stuff" +// the thing is, I want it for my stuff. but I consistently don't want a web app. I want a CLI or a controller-based interface. I can sit myself and put time into working on poems from gutenberg and then see if I want to build something totally new or just add new phrase backends. + +// no matter what there are improvements to phrasing I want to see before I let anyone see this (even to beta test) so the plan now is: + +// ship phraser improvements +// get a deployment pipeline +// seek beta feedback + const ( dsn = "phrase.db?cache=shared&mode=r" maxID = 467014991 diff --git a/templates/index.tmpl b/templates/index.tmpl index 0d093c8..7fc4340 100644 --- a/templates/index.tmpl +++ b/templates/index.tmpl @@ -15,7 +15,7 @@ body { font-size:125%; background-color: black; color: white; - background-image: url("/bg_dark.gif"); + /* background-image: url("/bg_dark.gif");*/ } a { @@ -61,11 +61,50 @@ span.linetext {

Trunkless