Skip to content

AlanjRichardson/kinghorninformationsources.github.io

Repository files navigation

Kinghorn Information Sources

This repository hosts the Kinghorn Information Sources website, maintained by Alan Richardson.

The site brings together material on the people, places, industries, natural history, old maps, and everyday life of Kinghorn, using text, photographs, and archival sources built up over many years.

It is intended as a long-term, independent historical record rather than a general-purpose blog or wiki.

The site is published using GitHub Pages and is intentionally static and lightweight, with an emphasis on longevity, clarity, and ease of maintenance.


WEBSITE STRUCTURE

The repository root contains the main HTML pages, with assets organised by purpose.

kinghorninformationsources.github.io/

index.html gallery.html kinghorn_history.html industryhistory.html naturalhistory.html maps.html documents.html Culture.html

kinghorn.css

js/ menu.js photos-with-names-gallery.js people-data.js epitaph-data.js

photos-with-names/ full/ thumbnails/ people-index.json

scripts/ make_people_js.py make_people_index.py

data/ photo_names_sorted.ods

README.md

.venv/ (local Python virtual environment – not committed)


PHOTOS WITH NAMES – GALLERY SYSTEM

The Photos With Names gallery is driven entirely by structured data generated offline. The public-facing site is read-only.


SOURCE OF TRUTH

The authoritative source is a LibreOffice spreadsheet:

data/photo_names_sorted.ods

This file contains:

  • Surname
  • Full name
  • Photo file name

All downstream files used by the gallery are generated from this spreadsheet.


PYTHON ENVIRONMENT

The Python scripts require a virtual environment.

One-time setup (from repo root):

python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt

Use as required:

source .venv/bin/activate - "Terminal command required to activate venv (the virtual environment)" python scripts/make_people_js.py - "Described below" python scripts/make_people_index.py - "Described below"

The scripts will warn if the virtual environment is not active.


WORKFLOW: ADDING NEW PHOTOS

Follow these steps IN ORDER.

STEP 1 – Add the full-size photo

Copy the image into:

photos-with-names/full/

File naming rules:

  • Include a year where possible (e.g. School1948.jpg)
  • If multiple photos exist for a year, suffix with a letter: School1948a.jpg, School1948b.jpg
  • Use consistent spelling and casing
  • Always include the .jpg extension

STEP 2 – Update the spreadsheet

Edit:

data/photo_names_sorted.ods

Add one row per identified person.

Rules:

  • Use the EXACT filename, including .jpg
  • Multiple people may reference the same photo
  • Correct spelling errors here, not later

STEP 3 – Generate people-data.js

Run:

python scripts/make_people_js.py

This overwrites:

js/people-data.js

It also creates or updates:

photos-with-names/thumbnails/

Thumbnails are generated automatically from the full-size images.

DO NOT edit this file manually.


STEP 4 – Generate the photo index

Run:

python scripts/make_people_index.py

This produces:

photos-with-names/people-index.json

This file:

  • Deduplicates photos
  • Extracts years from filenames
  • Aggregates names per photo
  • Powers gallery searching and filtering

STEP 5 – Commit and publish

git add . git commit -m "Add new named photos" git push

GitHub Pages updates automatically.


GALLERY SEARCH BEHAVIOUR

  • Year search (e.g. 1948) Shows each photo ONCE No names shown Intended for visual browsing

  • Name search (e.g. Richardson) Shows matching photos Caption shows FULL NAMES only No duplicate photo tiles

  • Empty search Shows all photos Caption shows filename (no extension)


READ-ONLY DESIGN

The public gallery is intentionally read-only. All editing and correction happens offline via the spreadsheet and scripts. This protects historical accuracy and consistency.


WAR MEMORIAL – EPITAPHS SYSTEM

The War Memorial pages link individual names to a shared epitaph display page (epitaph.html). Each name link includes a unique identifier which is used to load the correct epitaph content.

Epitaph text and related information are stored in:

js/epitaphs-data.js

This file is maintained manually. New epitaphs, corrections, or additions must be edited directly in the JavaScript file; there is no automated generation step for this part of the site.

This approach reflects the small, sensitive nature of the material and allows careful control over wording and presentation.


MAINTENANCE RULES

  • Always fix filename or name errors in the spreadsheet first
  • Regenerate downstream files after every change
  • Never manually edit:
    • people-data.js
    • people-index.json

IMAGE WORKING FILES

High-resolution GIMP (.xcf) files are retained locally as authoritative working masters. These preserve editable text layers (names) and annotations so that identifications and information can be corrected or expanded over time.

Only exported JPEG derivatives are included in this repository.


Maintained by
Alan Richardson
Kinghorn Information Sources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published