Giter VIP home page Giter VIP logo

f-dotfiles's Introduction

F-dotfiles banner

F-dotfiles

/ɛfdɒtfaɪlz/ :

n. stands for Full-fledged-Über-Clean-Kraymer dotfiles., an opiniated dotfiles organization scheme based on stow. Great effort is put on self-documentation and ease of maintenance.

Features

  • stow powered: symlink dotfiles and thus keep them always up-to-date in your repository
  • topical organization: organize dotfiles by application packages facilitating reuse across different machines
  • discoverability: self-documented packages making the architecture easy to browse while staying compatible with stow symlinking mechanism

Install

  1. clone the repository : git clone https://github.com/F-dotfiles/F-dotfiles.git ~/ ; cd ~/F-dotfiles
  2. setup stow, inception style : stow -t ~ _stow 
  3. install desired package via stow <directory> 1

When needed, special install instructions are present in package README.md file

Rules

Walter - That rules really tie the repo together, do they not?
The Dude - Fuckin A ! 2

Documentation f-dotfiles.py

Dotfiles repositories are too often grimoire-like collection of ancient formulas, only usable by their original author.

F-dotfiles avoid this pitfall by paying special attention to packages documentation : run pre-commit install to enable f-dotfiles.py hook that ensures that packages README.md tree listings are automatically updated when commiting.
Files descriptions that match the format # <filename>: description are extracted too and enrich the tree listing.

Others instructions like install notes and requirements should be manually entered by editing the README.md files directly, and can live peacefully alongside auto-generated tree view content.

Ignore files [cf example]

Quoting stow documentation :

if Stow can create a single symlink that points to an entire subtree within the package tree, it will choose to do that rather than create a directory in the target tree and populate it with symlinks.

.gitignore can be present in packages because of this behaviour, in order to avoid having your repository cluttered with unknown files.

Secret files [cf example]

Files that contain sensitive information and should not be published are kept secret using package specific .gitignore files. Because the secret file itself is not tracked, a template is commited instead having same name but with the .example suffix appended. This template is intended to serve as a base for edition and can be renamed (removing the suffix) after its content is edited.


1 it's because we installed stow package at step 2 that the flag -t ~ can be omitted here, see .stowrc
2 https://www.youtube.com/watch?v=ezQLP1dj_t8

f-dotfiles's People

Contributors

kraymer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

f-dotfiles's Issues

Script to keep README.md files up-to-date

Context

Each README.md package file lists content of the package as a tree view (generated by the tree unix tool), for example https://github.com/Kraymer/F-dotfiles/blob/master/git/README.md

Selection_020

Problem: this self referencing documentation must be updated manually when a file is added/deleted but this task is not always done hence the README.md becomes obsolete regarding the package state.

Description

create a script docgen in python or shell script at the root of the repository.
For each package docgen will call tree <package> (https://manpages.ubuntu.com/manpages/trusty/man1/tree.1.html) and replace the block in the <package>/README.md file by the output produced.

This way the procedure to keep the documentation trees up-to-date will consist in :

F-dotfiles $ ./docgen.sh
F-dotfiles $ git commit -am "update docs"

git functions

Search for a string in file history :

git grep -A 1 "system" $(git rev-list --all -- /home/flap/settings.py) -- /home/flap//settings.py

Package install script

F-dotfiles$ install.sh git
See https://github.com/Kraymer/F-dotfiles/git/README#requirements for requirements to install
Executing stow git
Press <Enter> to edit credentials.local 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.