doekman / config-man Goto Github PK
View Code? Open in Web Editor NEWHelping manager for your configuration files
License: MIT License
Helping manager for your configuration files
License: MIT License
Well actually, there is always some kind of configuration. But in this case, the backed up files itself is the configuration. For example, you want to backup the following files:
/Users/me/.ssh/config
/Users/me/.gitconfig
/Users/me/.gitignore_global
and assume the backup location to be /Users/me/config-man/vault
. So if you want to keep backups of the three files above, create the following files:
/Users/me/config-man/vault/Users/me/.ssh/config
/Users/me/config-man/vault/Users/me/.gitconfig
/Users/me/config-man/vault/Users/me/.gitignore_global
Above files is the configuration. The files may be empty, or just be a copy of the original. When the file exists, it will be included in the backup. When a file doesn't exist, it will be made empty (and generate a warning), but the file itself won't be removed.
Looks pretty crazy, right? But bear with me; it does have a lot of advantages to organise the backup vault like this:
cm backup
command to update the files when some have changedcm restore
or cm compare
commands. And you would mix data and program. Config-man is about separating these.There also are some limitations about above proposition. I think most of them can and will be addressed in the future. However, two thing come to mind that would be needed for creating a Minimal Viable Usable Product.
Creating the vault-files is cumbersome. The touch
-command would create an empty file, but doesn't create the folder-structure. And mkdir -p ...
will create the folder-structure, but doesn't create the actual file. So the sensible thing to do is to have the cm add FILE
command initially, and make that do the work.
Running the cm backup
command from the "wrong" folder most times would result into a no-operation. In some situations it could have undesireable results. On the other hand: specifying the path to the vault on the command line is also cumbersome. Placing a "marker" on the root of the backup vault (or backup base) would solve this problem. Using a file with the name .config-man
would act like a marker. The cm
commands need to be ran from within this folder. For now, the file itself can be empty. It will be specified in json
format. Also: this file will be excluded from the backed up files (it also makes no sense to have a file called .config-man
in the root of your file system, let alone to have it backed up).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.