commit 39d362988b31049c1205e7a481792d60e4fe4359
parent 25925bc26210935228d4df82458a8c23f1345f33
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Thu, 26 Nov 2026 06:44:07 +0300
chore: add POSIX Makefile and README
Diffstat:
| A | Makefile | | | 52 | ++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | README.md | | | 65 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
2 files changed, 117 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
@@ -0,0 +1,52 @@
+.POSIX:
+
+NAME = manus
+PREFIX = /usr/local
+
+GO = go
+GOFMT = gofmt
+GOFLAGS =
+
+SRC = \
+ bib/bib.go bib/export.go bib/fetch.go bib/shared.go \
+ cmd/manus/main.go cmd/manus/manuscripts.go cmd/manus/ref.go \
+ cmd/manus/revise.go cmd/manus/serve.go cmd/manus/tasks.go \
+ scan/report.go scan/scan.go scan/tex.go \
+ store/model.go store/rec.go store/store.go \
+ web/web.go
+ASSETS = \
+ web/static/app.js web/static/style.css \
+ web/templates/index.html web/templates/layout.html \
+ web/templates/manuscript.html web/templates/refs.html \
+ web/templates/tasks.html
+
+all: ${NAME}
+
+${NAME}: go.mod ${SRC} ${ASSETS}
+ ${GO} build ${GOFLAGS} -o $@ ./cmd/manus
+
+check:
+ ${GO} test ${GOFLAGS} ./...
+
+lint:
+ ${GO} vet ./...
+ test -z "$$(${GOFMT} -l .)"
+
+fmt:
+ ${GOFMT} -w .
+
+serve: ${NAME}
+ ./${NAME} serve
+
+install: ${NAME}
+ mkdir -p "${DESTDIR}${PREFIX}/bin"
+ cp -f ${NAME} "${DESTDIR}${PREFIX}/bin"
+ chmod 755 "${DESTDIR}${PREFIX}/bin/${NAME}"
+
+uninstall:
+ rm -f "${DESTDIR}${PREFIX}/bin/${NAME}"
+
+clean:
+ rm -f ${NAME}
+
+.PHONY: all check lint fmt serve install uninstall clean
diff --git a/README.md b/README.md
@@ -0,0 +1,65 @@
+# manus
+
+A tracker for journal manuscripts, with a command line and a local web
+interface. It keeps tasks per manuscript, previews each manuscript's sources,
+handles revisions, and manages a shared BibTeX bibliography.
+
+Written in Go using only the standard library. Data is plain text in GNU
+recutils format, so it can be edited by hand and diffs cleanly in git.
+
+## Layout on disk
+- `$MANUS_ROOT` (default `~/manus`) holds one directory per manuscript.
+- `$MANUS_ROOT/.tracker/<id>.rec` holds a manuscript's fields, tasks and comments.
+- `$MANUS_ROOT/BIBnew.bib` is the shared bibliography.
+- If `$MANUS_ROOT` is a git repository, every change commits the files it
+ touched, and only those files. Set `MANUS_NOGIT=1` to turn this off.
+
+## Install
+```
+make && make install # PREFIX=/usr/local
+```
+Optional tools: `git`, `pandoc` (docx/odt previews), `pdftoppm` (PDF
+thumbnails), `pdfinfo`/`pdftotext` (DOI from a PDF).
+
+## Use
+```
+manus discover # unregistered directories
+manus init growana-model jung-canals # detects kind, source dir, main file, repo
+manus ls # overview with task counts and health flags
+cd ~/manus/growana-model
+manus add "Redraw Fig. 3" -d 2026-12-15
+manus mv '#1' doing
+manus rel '#1' blocks '#2'
+manus note '#1' "colour scale too dark"
+manus set stage=submitted journal="J. Glaciol."
+manus todos -a # import TODO/FIXME/\todo as tasks
+manus revise -c reviews.txt # tag, worktree, carry over tasks, one task per comment
+manus ref add 10.1017/jog.2016.1 # or a title query, or a PDF
+manus ref check # missing/unused keys, no-DOI entries
+manus ref export -f csl -o refs.json # cited entries for Word/Zotero coauthors
+manus serve # http://127.0.0.1:8090/
+```
+Run `manus help` for every command.
+
+## Concepts
+- **Task status** is `todo`, `doing`, `blocked` or `done`. Use `blocked` for
+ outside waits (coauthor, editor). A task is also shown as blocked (marked `*`)
+ while a task that `blocks` it is still open.
+- **Relations** are `blocks`, `relates`, `duplicates` and `parent`. They can
+ cross manuscripts (`other-ms#4`), and the inverse direction is derived.
+- **Revisions** are new entries (`<id>-r1`) with `parent` set. For git sources,
+ the submitted state is tagged `submitted-r0` and the revision is checked out
+ as a `git worktree` on branch `revision-r1`. Other sources are copied. Open
+ tasks move to the revision.
+- **Reviewer comments** (`revise -c`) are split into one task per paragraph.
+ Lines such as `Reviewer 2` or `Editor` start a new reviewer.
+- **References** are fetched from Crossref and doi.org with scholarref's
+ conventions (key `Name2010`, abbreviated journal and given names, no
+ `url`/`month`). A DOI that is already present is never added twice.
+ Existing entries are never rewritten; new ones are appended.
+
+## Development
+```
+make check # tests
+make lint # go vet, gofmt
+```