NextWiki brings back features that haven’t been seen on the Web since WorldWideWeb.app for NeXTSTEP 3.2.
Tell all your friends!
Federated components and the unix way. Style for inline notes.
Format:
<<< user page unixtime
Entry
Example:
<<< sbp example.html 1360625989 <!doctype html><title>Example</title><h1>Example</h1>
»changelog: usage: changelog logfile [file]
$ changelog changes.log | tail -n 1 163: by sbp to octavo-notes.html on Thu Feb 14 21:44:23 2013
»changeview: usage: changeview logfile revid
$ changeview changes.log 163 | head -n 1 octavo-notes.html as modified by sbp, Thu Feb 14 21:44:23 2013: <!doctype html>
The first line there, "as modified", is printed to stderr.
»reindex: usage: reindex logfile
»validate: usage: validate logfile
Issues: validate
actually does not emit any usage information. Both reindex
and validate
are broken with the same error message:
$ validate changes.log Traceback (most recent call last): File "validate", line 5, in <module> log = changes.changelog(sys.argv[1]) File "changes.py", line 21, in __init__ self.reindex() File "changes.py", line 42, in reindex tempfile = [...]+(".%d.temp" % datetime.datetime.now().timestamp()) AttributeError: 'datetime.datetime' object has no attribute 'timestamp'
This was discovered to be due to requiring python 3.3.
tail -c 1048576 changes.log | grep '<<<' | tail -n 72 | tac
Additions to emit nicely formed HTML are trivial, though group by date requires:
WHEN=$(date -d "@$TIMESTAMP") if [[ "${WHEN%% *}" != "${OLD_WHEN%% *}" ]] then echo "</ul><h2>${WHEN%% *}</h2><ul>" fi
See also Globspace for extra NextWiki ideas.