Package: dotpyle
dotPyleManage all your configuration files with different profiles remotely.Made with ❤️  byJorge BodegaandPerseo GutierrezdotPyle is a Python implementation of a dotfile system manager, allowing users
to keep a secure copy of all program configurations remotely, create different
profiles, etc.CommandsInitThis will request a git url and a git token If it is the first time you use
Dotpyle, you will need to create an empty repo on GitHub, GitLab, etc.If you want to manage an existing repo you just need to input url and tokendotpyle init [--url <git url>]  [--protocol (git/https)] [--token (if repo is private)]AddCopy file to repo locationDelete file of pathGenerate symbolic link to pathExamples:Create program_name keyCreate profile (default by default)Set root and paths (optionally pre and post hooks)dotpyleadddotfile<program_name>[--profile<profile_name>][--root<root_path>][--path<dotfile_path1>[--pathdotfile_path2>]...][--pre<pre_config_install_command>[--pre<...>]][--post<post_config_install_command>[--post<...>]]Listdotpyle list [--name <program_name>] [--profile <profile_name>]Linkdotpyle install <program_name> [--profile <profile_name>]Interacting with Git repositoryUser may avoid interacting directly with Dotpyle git repositoryTODO: Considering only one dotpyle sync command for pulling && pussingPulling changesThis command will fetch new changes from the remote repository and check nothing will breakTODOdotpyle pullPushing changes (TODO)dotpyle pushCommiting changesCommiting should be as granular and personal as possible so Dotpyle offers the
granularity you may need.dotpyle commit [-n <program_name> [--path=<path1> --path=<path2> ...]] [-p <profile_name>] -m <commit_message>Examples:General commit for all changes on all programs and profiles installed and managed by Dotpyle:dotpyle commit -m 'fix typo on vimrc'Commit for all dotfiles of specific program (e.g. nvim):dotpyle commit -n nvim -m 'commit message'Commit for all programs (and all configuration files) of a concrete profile (e.g. work):dotpyle commit -p work -m 'commit message'Commit for specific program and specific dotfiles of that program for all profiles:
(e.g. alacritty base configuration for all profiles which have alacritty)dotpyle commit -n alacritty --path=alacritty.yml -m 'commit message'Commit for specific program and specific dotfiles of that program on specific profile:
(e.g. i3 configuration for i3-resurrect and status bar on home profile)dotpyle commit -n i3 --path=i3-resurrect/config.json --path=i3status.conf -p home -m 'commit message'Profilesprofile createdotpyle profile create <profile_name>Creates a new profile named<profile_name>, if it does not exist.profile listdotpyle profile list [<profile_name>]profile changedotpyle profile change <profile_name> [<program_name> ...]This option will change the configuration file to the<profile_name>passed for:all dotfiles if no<program_name>is passedall<program_name>'s passedExample:dotpyle profile change work nvim gitNeovim work profile and Git work profile will be symlinked to its corresponding path.dotpyle profile change homeAll dotfiles which have a 'home' profile will be symlinked to its corresponding paths.
Dotfiles which does not have a configuration for given profile will not be altered.TBDConfigurationcheckdotpyle config check [<dotpyle_config_path>]This command will analize Dotpyle configuration file, by default
(XDG_CONFIG_HOME}/dotpyle/dotpyle.yml) (or<dotpyle_config_path>),
returning descriptive errors.Info: any other command will anayle the configuration file before
executing.  This command is useful and recomended whenever any manual change is
made ondotpyle.yml.dotpyle.yml exampleStructure of yml (every thing inside [] are examples)# General settings for dotpylesettings:# Defined profilesprofiles:-default-[home]-[work]# TODOTBDdotfiles:# Top level key, the name of the program for which store config files[program_name]:# Name of the profile (default profile: default)[profile_name]:# Bash commands to be executed before configuring 'profile_name'before:-[bash script 1]-[bash script 2]# Bash commands to be executed after configuring 'profile_name'after:-[bash script 1]-[bash script 2]# Base path for start storing 'paths' for 'program_name' (default $HOME)root:~# Configuration files for 'program_name'. Subroutes will be created if they dont existpaths:-[.configuration]# will symlink dotfiles/program_name/profile_name/.configuration => $HOME/.configuration-[subroute/.filerc]# will symlink dotfiles/program_name/profile_name/subroute/.filerc => $HOME/subroute/.filerc-[subroute0/subroute1/filerc]# will symlink dotfiles/program_name/profile_name/subroute0/subroute1/filerc => $HOME/subroute0/subroute1/filercExample of dotpyle.yml config file:settings:profiles:-default-windowsdotfiles:git:default:before:-sudo pacman -S gitpaths:-.gitconfigwindows:before:-choco install git.installroot:C:\Users\usrpaths:-.gitconfignvim:default:before:-sudo pacman -S neovim noderoot:~/.config/nvimpaths:-init.vim-after/ftplugin/ada.vimwindows:before:-choco install neovim --preroot:C:\AppData\Local\nvimpaths:-init.vim-after/ftplugin/ada.vimThis will be the generated file structure on the repository:dotfiles
|
|-> git
|   |-> default
|   |   |-> .gitconfig
|   |-> windows
|       |-> .gitconfig
|
|-> nvim
    |-> default
    |   |-> init.vim
    |   |-> after
    |       |-> ftplugin
    |           |-> ada.vim
    |
    |-> windows
        |-> init.vim
        |-> after
            |-> ftplugin
                |-> ada.vimdotpyle.local.yml structureDotpyle needs to create a local configuration file in order to keep track of
your configuration on the current machine.This file will not be tracked by
git so non conflicts will be derived when using Dotpyle on multiple computers.Also, this file will be generated automatically by Dotpyle on 'init' command or
whenever Dotpyle can't find it.Structure of yml (every thing inside [] are examples)installed:[program_name]:profile:[profile_name]# modified: [True|False]TBDTBDTODODecorator / global variable to instance parser and handlersPrint centralized service with colorful error / warning / correct outputChange uninstall name for on more intuitiveRun command to execute alone hooksCreate commit on uninstall dotfileForce option on link command