Skip to content

rguiscard/fossil-notebook-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fossil Notebook

This is a note-keeping web app on top of Fossil SCM. It combines several tools and concepts:

  1. Fossil SCM: version control, synchronization, web server with JSON api.
  2. Johnny Decimal: file organization method
  3. Front Matter: for meta information
  4. Mithril.js: Javascript framework for front end

Download

Download repository notebook-demo.fossil from github

Installation

Install fossil

JSON API support is necessary. Some binary packages have JSON API built-in. To check, start the fossil server with this demo repository or any other fossil repository, and connect to <fossil server ip>:8080/json/stat with browser. You should see some information if JSON api works. Or compile with --enable-json.

It is also better to compile with --with-th1-docs just in case, especially for multiple repositories support (see below).

Run

fossil server notebook-demo.fossil and use browser to connect to <fossil server ip>:8080

Login

use demo:demo as user:password. Not necessary for reading.

Write notes

Use fossil open to create a local copy of repository. Add notes in markdown format inside local repository. Use fossil addremove if new files are added. fossil commit to commit.

Read notes at 00-09.System/02.Documentation/ for more details.

How does it work

Fossil supports project documentation. It basically serves as a web server for static files. A web app can be created as project documentation and served by fossil. Fossil also support JSON api to read files inside repository. Therefore, this web app can access content in the fossil repository. The drawback is that web app cannot create files inside repository. But fossil also support wiki which is readable and writable through its JSON api.

In some sense, this can be seen as a highly customized skin of Fossil SCM.

workflow

Multiple Repositories

Fossil SCM supports serving multiple repositories through the same ip address with --repolist. For example, if there are work.fossil and budget.fossil under directory /home/user/repositories, starting fossil server --repolist /home/user/repositories allows browser connecting to <fossil server ip>:8080/work to work.fossil, and <fossil server ip>:8080/budget to budget.fossil. It makes separating notes into different repositories easier. But to make web app work in this way, th1 support is necessary. So remember to compile Fossil with --with-th1-docs. Otherwise, web app do not know the base url.

Future Plan

This way of keeping notes is very opinioned. Different people will have different kinds of document and notes to keep, and want to have different kind of web app, for example, image viewer for collection of photos, or PDF viewer for office document. Therefore, the main web app will be kept small and minimal for the purpose of demo. Peopoe will probably fork this repository for their needed.

Extension / Plug-in

If you want to add more web app, a work is in progress that any html file ended with .app.html will be open straight instead of displayed as text file. In such case, you can have your own web app opened easier from the main web app. But again, this web app is quite opinioned. You probably should consider to fork it.

Development

Please note that you can use /doc/ckout instead of /doc/trunk during development. It will serves files in local copy instead of repository. Therefore, you do not need to keep committing changes into repositories. It is mentioned in Project Documentation of Fossil SCM.