From 2906807f4341eef0e23f91356675595c89715490 Mon Sep 17 00:00:00 2001 From: n-peugnet Date: Fri, 22 Oct 2021 12:19:46 +0200 Subject: first add of latex doc --- .gitignore | 7 ++++--- TODO.md | 10 ++++++++++ exp/exp.sh | 4 ++-- pdf/.gitignore | 9 +++++++++ pdf/Makefile | 23 ++++++++++++++++++++++ pdf/doc.tex | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 110 insertions(+), 5 deletions(-) create mode 100644 pdf/.gitignore create mode 100644 pdf/Makefile create mode 100644 pdf/doc.tex diff --git a/.gitignore b/.gitignore index 6f0a1cb..2d90430 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,9 @@ ## Project generated files +# binaries dna-backup - -## Test directories -test_* +*.test +# profiling +*.prof ## IDE files .vscode diff --git a/TODO.md b/TODO.md index 4639a53..6369fa3 100644 --- a/TODO.md +++ b/TODO.md @@ -30,6 +30,9 @@ priority 1 - the sketch parameters - ...and almost every value of the `NewRepo` constructor - [ ] these parameters would be loaded in the `*Repo.Init()` function +- [ ] stop using `gob` everywhere. As this encoder, despite its simplicity and + overall good performance, is not cross compatible between languages and its + specification might be subject to changes. priority 2 ---------- @@ -125,3 +128,10 @@ second run of `dna-backup`, around 20 blocks in of the beginning of the recipe have been replaced by newer ones. These should not have been modified. I could however not reproduce it... + +mystical bug number 3 21/10 +--------------------------- + +When running `dna-backup commit` a second time after nothing has changed in the +source folder, there are still some differences with the previous version. I +don't know where these come from. diff --git a/exp/exp.sh b/exp/exp.sh index 6071a46..10d6cc8 100755 --- a/exp/exp.sh +++ b/exp/exp.sh @@ -126,7 +126,7 @@ do if [ -n "$DNA_PARAMS" ] then # Create dna backups for this version - cat $DNA_PARAMS | while read name flags + while read name flags do log "create $name backup for this version" $DNA_BACKUP commit -v 2 $flags $REPO_PATH $name @@ -140,7 +140,7 @@ do | paste -sd+ \ | bc \ > $(printf "%s_export.versions/%05d" $name $i) - done + done < $DNA_PARAMS fi if [[ $(( $i % $SKIP_CHECK )) == 0 ]] diff --git a/pdf/.gitignore b/pdf/.gitignore new file mode 100644 index 0000000..ea850a7 --- /dev/null +++ b/pdf/.gitignore @@ -0,0 +1,9 @@ +# Latex files +*.aux +*.fdb_latexmk +*.fls +*.out +*.log +*.pdf +*.synctex.gz +*.toc diff --git a/pdf/Makefile b/pdf/Makefile new file mode 100644 index 0000000..8df3d66 --- /dev/null +++ b/pdf/Makefile @@ -0,0 +1,23 @@ +FILES = doc +TEX = $(FILES:%=%.tex) +PDF = $(FILES:%=%.pdf) + +# Debug flags +ifdef DEBUG +LATEXMK_FLAGS += -verbose +else +LATEXMK_FLAGS += -quiet +endif + +all pdf: $(PDF) + +%.pdf: %.tex + latexmk $(LATEXMK_FLAGS) -pdf -f $< + +mostlyclean: + latexmk $(LATEXMK_FLAGS) -c + +clean: + latexmk $(LATEXMK_FLAGS) -C + +.PHONY: all pdf mostlyclean clean diff --git a/pdf/doc.tex b/pdf/doc.tex new file mode 100644 index 0000000..33d691c --- /dev/null +++ b/pdf/doc.tex @@ -0,0 +1,62 @@ +\documentclass[a4paper,twocolumn,french]{article} + +% Set page dimentions +\usepackage[margin=22mm]{geometry} + +% Packages for french documents +\usepackage[french]{babel} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} + +% Define some colors +\usepackage{color} +\definecolor{string}{RGB}{100, 200, 0} +\definecolor{comment}{RGB}{150, 150, 150} +\definecolor{identifier}{RGB}{100, 100, 200} + +% Source code style +\usepackage{listings} +\lstset{ + basicstyle=\footnotesize\ttfamily, % sets font style for the code + frame=single, % adds a frame around the code + showstringspaces=false, % underline spaces within strings + tabsize=4, % sets default tabsize to 2 spaces + breaklines=true, % sets automatic line breaking + breakatwhitespace=true, % sets if automatic breaks should only happen at whitespace + keywordstyle=\color{magenta}, % sets color for keywords + stringstyle=\color{string}, % sets color for strings + commentstyle=\color{comment}, % sets color for comments + emphstyle=\color{identifier}, % sets color for comments +} + +% Hyperlinks +\usepackage[hyphens]{url} +\usepackage[hidelinks]{hyperref} + +% Graphics +\usepackage{graphicx} +\graphicspath{ {img} } + +\title{DNA-Backup} + +\date{Octobre 2021} + +\author{Nicolas Peugnet} + +\begin{document} + +\maketitle + +\tableofcontents + + +% \begin{figure}[h] +% \centering +% \includegraphics[width=0.4\linewidth]{wtf.png} % changer ici l'image +% \caption{WTF ??\protect\footnotemark} +% \label{fig:wtf} +% \end{figure} +% \footnotetext{Cette image n'a été ajouté que pour avoir un modèle et pouvoir tester l'inclusion d'images} + + +\end{document} -- cgit v1.2.3