add notes
This commit is contained in:
79
Makefile
Normal file
79
Makefile
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
######################################################################
|
||||||
|
# A simple makefile to generate notes as epub/pdf/html/plaintext
|
||||||
|
# it requires gnumakefile, a shell, grep and pandoc (with pdf support)
|
||||||
|
######################################################################
|
||||||
|
BUILD_DIR ?= _build/notes
|
||||||
|
NOTES_DIR ?= notes
|
||||||
|
NOTES = $(shell ls $(NOTES_DIR) | grep -E "^[0-9]+-")
|
||||||
|
PANDOC_OPTS = -C
|
||||||
|
PANDOC = pandoc $(PANDOC_OPTS)
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# template to generate the targets
|
||||||
|
######################################################################
|
||||||
|
define pandoc_template =
|
||||||
|
NOTES_TARGETS += $$(BUILD_DIR)/$(1).pdf
|
||||||
|
$$(BUILD_DIR)/$(1).pdf:
|
||||||
|
$(PANDOC) -f markdown -t pdf -o $$@ \
|
||||||
|
--resource-path="$$(NOTES_DIR)/$(1)" \
|
||||||
|
"$$(NOTES_DIR)/$(1)/README.md"
|
||||||
|
|
||||||
|
NOTES_TARGETS += $$(BUILD_DIR)/$(1).epub
|
||||||
|
$$(BUILD_DIR)/$(1).epub:
|
||||||
|
$(PANDOC) -f markdown -t epub -o $$@ \
|
||||||
|
--resource-path="$$(NOTES_DIR)/$(1)" \
|
||||||
|
"$$(NOTES_DIR)/$(1)/README.md"
|
||||||
|
|
||||||
|
NOTES_TARGETS += $$(BUILD_DIR)/$(1).txt
|
||||||
|
$$(BUILD_DIR)/$(1).txt:
|
||||||
|
$(PANDOC) -f markdown -t plain -o $$@ \
|
||||||
|
--resource-path="$$(NOTES_DIR)/$(1)" \
|
||||||
|
"$$(NOTES_DIR)/$(1)/README.md"
|
||||||
|
|
||||||
|
NOTES_TARGETS += $$(BUILD_DIR)/$(1).html
|
||||||
|
$$(BUILD_DIR)/$(1).html:
|
||||||
|
$(PANDOC) -f markdown -t html -o $$@ \
|
||||||
|
--resource-path="$$(NOTES_DIR)/$(1)" \
|
||||||
|
"$$(NOTES_DIR)/$(1)/README.md"
|
||||||
|
endef
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# default target, used to build automatically the notes
|
||||||
|
######################################################################
|
||||||
|
.PHONY += all
|
||||||
|
all: notes
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# create the build directory
|
||||||
|
######################################################################
|
||||||
|
$(BUILD_DIR):
|
||||||
|
mkdir -p $@
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# generate all templates based on notes directory name
|
||||||
|
######################################################################
|
||||||
|
$(foreach note,$(NOTES),$(eval $(call pandoc_template,$(note))))
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# generate all notes
|
||||||
|
######################################################################
|
||||||
|
.PHONY += notes
|
||||||
|
notes: $(BUILD_DIR) $(NOTES_TARGETS)
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# remove all generated articles and notes
|
||||||
|
######################################################################
|
||||||
|
.PHONY += clean
|
||||||
|
clean:
|
||||||
|
rm $(NOTES_TARGETS)
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# usage
|
||||||
|
######################################################################
|
||||||
|
help:
|
||||||
|
@echo "Usage: make [help|all|notes|clean]"
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# .PHONY target
|
||||||
|
######################################################################
|
||||||
|
.PHONY: $(.PHONY)
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
date: 2023-11-04
|
||||||
|
title: Mnesia Backends
|
||||||
|
subtitle: The Missing Documentation and Procedures to Create Custom Mnesia Backends
|
||||||
|
author: Mathieu Kerjouan
|
||||||
|
keywords: [erlang,otp,mnesia,backends,backend,database]
|
||||||
|
license: CC BY-NC-ND
|
||||||
|
abstract:
|
||||||
|
---
|
||||||
|
|
||||||
|
# Mnesia Backends
|
||||||
|
|
||||||
|
## The Missing Documentation and Procedures to Create Custom Mnesia Backends
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
## Using Mnesia
|
||||||
|
|
||||||
|
## Custom Backends
|
||||||
|
|
||||||
|
### Unix Filesystem Backend
|
||||||
|
|
||||||
|
# References and Resources
|
||||||
21
notes/README.md
Normal file
21
notes/README.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
title: Notes and Comments
|
||||||
|
---
|
||||||
|
|
||||||
|
This part of the repository is dedicated for the notes and comments
|
||||||
|
from the developers, to explain the "why" they created something and
|
||||||
|
what was their ideas.
|
||||||
|
|
||||||
|
**All articles MUST be licensed under [CC
|
||||||
|
BY-NC-ND](https://creativecommons.org/licenses/by-nc-nd/4.0/)**.
|
||||||
|
|
||||||
|
| Date | Title | Author | Notes |
|
||||||
|
|------------|-----------------------------|--------|-------|
|
||||||
|
|
|
||||||
|
|
||||||
|
The codes presented in these articles are usually tested under OpenBSD
|
||||||
|
and ParrotLinux (Debian-like distribution) with the latest major
|
||||||
|
release of Erlang (R25 or R26).
|
||||||
|
|
||||||
|
These articles are also available in EPUB, PDF and HTML files. A
|
||||||
|
template is available in [`_template`](_template) directory.
|
||||||
11
notes/_template/README.md
Normal file
11
notes/_template/README.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
date: 2023-02-25
|
||||||
|
title:
|
||||||
|
subtitle:
|
||||||
|
author:
|
||||||
|
keywords:
|
||||||
|
license: CC BY-NC-ND
|
||||||
|
abstract:
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user