Git Product home page Git Product logo

dt's Introduction

DT

release tests docs crates.io

DT allows you to sync/populate configuration files at will. It currently provides a CLI tool dt-cli.

Usage

The command line interface dt-cli accepts a path to the configuration file as an argument and performs the syncing process specified in the file.

Configuration guides and detailed usages can be found in the documentations.

Example

A simple working configuration file to sync all files from ~/dt/nvim to ~/.config/nvim that matches *init.vim can be written as:

[[local]]
name = "Neovim Configs"
base = "~/dt/nvim"
sources = ["*init.vim"]
target = "~/.config/nvim"

โš ๏ธ STOP HERE if you don't know what you are doing, or have not backed up existing files under ~/.config/nvim.

Save above config to ~/.config/dt/cli.toml and run

$ dt-cli -c ~/.config/dt/cli.toml

to start syncing. Note the path in this example (~/.config/dt/cli.toml) is also the default path, so the below command (calling dt-cli with no argument) does the same thing as above:

$ dt-cli

Other command line flags & options

Flags Description
-d|--dry-run Shows changes to be made without actually syncing files.
-h|--help Prints help information.
-q|--quiet Decreases logging verbosity.
-v|--verbose Increases logging verbosity.
-V|--version Prints version information.
Options Description
-c|--config-path <path> Specifies path to config file.
Args Description
<group-name>... Specifies name(s) of the group(s) to be processed

Install

AUR

dt-cli is in the AUR, you can install it with your favorite package manager:

$ paru -S dt-cli

Alternative ways

Alternatively, you can:

  • Download latest release from GitHub

  • Install from crates.io:

    $ cargo install dt-cli
  • Build from source:

    $ git clone [email protected]:blurgyy/dt.git
    $ cd dt
    $ cargo test --release
    $ cargo install --path=dt-cli

Contributing

There are numerous ways to help with this project. Let's get started!

License

Licensed under the the MIT license http://opensource.org/licenses/MIT or Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0, at your option. This file may not be copied, modified, or distributed except according to those terms.

dt's People

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

Watchers

 avatar  avatar

dt's Issues

Config via environment variable(s)?

I would like to have my config in a different directory but also not have to specify my config location every time. Right now I am thinking I can just

alias dt='dt-cli -c ~/.path/to/file'

but would you be open to reading from a DT_CONFIG_PATH variable or something along those lines?

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.