1 | # Contributing to Logarion
|
---|
2 |
|
---|
3 | Logarions primary aim is to create a note system, which doesn't waste resources.
|
---|
4 | The secondary aim is to provide an exemplary OCaml project to demonstrate and promote the language (as it happens with many other "Blogging" systems written in other languages).
|
---|
5 |
|
---|
6 | As part of the secondary aim, the source code needs to written in a way that encourages the language's adoption and the participation to the OCaml developer community.
|
---|
7 |
|
---|
8 | ## Starting with OCaml
|
---|
9 |
|
---|
10 | _"OCaml is an industrial strength programming language supporting functional, imperative and object-oriented styles"_ -- https://ocaml.org/
|
---|
11 |
|
---|
12 | OCaml simply rocks.
|
---|
13 |
|
---|
14 | If you are unfamiliar with OCaml, consider starting with these resources:
|
---|
15 |
|
---|
16 | - Install OCaml: https://ocaml.org/docs/install.html
|
---|
17 | - Read about OCaml: https://ocaml.org/learn/books.html
|
---|
18 | - Ask questions & join the community:
|
---|
19 | - Mailing lists: https://ocaml.org/community/
|
---|
20 | - IRC: irc://irc.freenode.net/#ocaml (Web client: https://riot.im/app/#/room/#freenode_#ocaml:matrix.org )
|
---|
21 | - Reddit: http://www.reddit.com/r/ocaml/
|
---|
22 | - Discourse: https://discuss.ocaml.org/
|
---|
23 | - .. other: https://ocaml.org/community/
|
---|
24 |
|
---|
25 | ## Design principles
|
---|
26 |
|
---|
27 | [Unix philosophy](https://en.wikipedia.org/wiki/Unix_philosophy#Do_One_Thing_and_Do_It_Well)
|
---|
28 |
|
---|
29 | 1. System simplicity & interoperability.
|
---|
30 | 2. Output quality.
|
---|
31 | 3. Distributed interactivity, like sharing with friends.
|
---|
32 |
|
---|
33 | ## Developing & contributing
|
---|
34 |
|
---|
35 | ### Clone
|
---|
36 |
|
---|
37 | ```
|
---|
38 | git clone https://cgit.orbitalfox.eu/logarion/
|
---|
39 | ```
|
---|
40 |
|
---|
41 | Install dependencies:
|
---|
42 |
|
---|
43 | ```
|
---|
44 | cd logarion
|
---|
45 | pin add logarion . -n
|
---|
46 | opam depext --install logarion
|
---|
47 | ```
|
---|
48 |
|
---|
49 | Build the project:
|
---|
50 |
|
---|
51 | ```
|
---|
52 | dune build src/logarion.exe
|
---|
53 | ```
|
---|
54 |
|
---|
55 | This will create `_build/default/src/logarion.exe` (the command line interface).
|
---|
56 |
|
---|
57 | ### Project structure
|
---|
58 |
|
---|
59 | There are three layers:
|
---|
60 |
|
---|
61 | - notes
|
---|
62 | - archive
|
---|
63 | - interfaces & intermediate formats
|
---|
64 |
|
---|
65 | ### Core
|
---|
66 |
|
---|
67 | - `logarion.ml`: repository related functions (listing, adding/removing, etc). ([src/logarion.ml](https://gitlab.com/orbifx/logarion/blob/master/src/logarion.ml))
|
---|
68 | - `note.ml`: parsing from and to note files. ([src/note.ml](https://gitlab.com/orbifx/logarion/blob/master/src/note.ml))
|
---|
69 |
|
---|
70 | ### Intermediate formats
|
---|
71 |
|
---|
72 | Converters:
|
---|
73 |
|
---|
74 | - `html.ml`: archive to HTML pages.
|
---|
75 | - `atom.ml`: archive to Atom feeds.
|
---|
76 |
|
---|
77 | ### Servers & utilities
|
---|
78 |
|
---|
79 | Logarion's archives can be served over various protocols using servers.
|
---|
80 | Find related software here:
|
---|
81 |
|
---|
82 | - https://logarion.orbitalfox.eu/
|
---|
83 | - https://cgit.orbitalfox.eu/
|
---|