Skip to content
This repository has been archived by the owner on Oct 29, 2023. It is now read-only.
/ labnotebook Public archive

This repo contains the code to create a git-based lab notebook

Notifications You must be signed in to change notification settings

mmiots9/labnotebook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Labnotebook 📔🖥

⚠️ I have moved this repo to a python package.
Please refer to mmiots9/pylabnotebook for the most up to date version. This repo will not be updated anymore.

This project aims to help bioinformaticians in creating the so called "Laboratory notebook" automatically, thanks to git workflow manager.

IMPORTANT: this tool is based on git and its application. Based on git history, it will create an html notebook divided by date and commit.

Features

  • Automatically create a laboratory notebook
  • Customizable CSS file
  • Possibility to ignore the labnotebook folder in commits
  • Direct link to analysis files
  • Export to html

Installation

To install these functions, I strongly recommend to download the entire folder and add this to your .bash_profile or .zshrc:
for file in ~/path-to-folder/*.sh; do source "$file"; done

Notebook structure

The structure of the notebook is very simple. You can see an example here.

On top, you have the notebook name, the author and the notebook creation date. Then, for each day, you have a list of all the commits done, organized as follow:

  • Commit message (first line)
  • Commit body
  • sha
  • Analysis file
  • List of changed files

Create a notebook

To create a notebook, go to the folder in which is present the .git folder and type createnotebook name of the notebook (It could contain spaces). A .labnotebook folder is created, containing config file, a basic css file and three file containing head, body and footer of the html file.

IMPORTANT: never change the name of the created folder and its files.

Update a notebook

When you want to update the notebook, go to the folder in which is present the .git folder, type updatenotebook and follow the instructions.

IMPORTANT: If you have set to NOT ignore .labnotebook folder, after each notebook update a commit is made with labnotebook as author.

Link to analysis files

When updating the notebook, it automatically create a list of analysis files for each commit with direct links to them. By default, it takes all the .html files changed/added in that commit.
If you want to add different extensions, you can update the .labnotebook config file by adding/removing extensions in the ANALYSIS_EXT variable. As it is a bash array, each extension should be separated by space (eg. ANALYSIS_EXT=(".log" ".html")).
Moreover, by creating a ".labignore" file, you can exclude some files/folders to be recognized as analysis files (as for a standard .gitignore file).

Export html file

When you want to export the full html file containing the notebook, go to the folder in which is present the .git folder, type exportnotebook file_to_create.html