Git Product home page Git Product logo

dtool's Introduction

dtool

Build Status Crates.io

dtool is a command-line tool collection to assist development

Table of Contents

Description

Now dtool supports:

Usage

dtool does different works by different sub commands:

Sub command Desc Example
h2s Convert hex to UTF-8 string
v0.1.0
$ dtool h2s 0x61626364
abcd
s2h Convert UTF-8 string to hex
v0.1.0
$ dtool s2h abcd
0x61626364
h2b Convert hex to binary
v0.1.0
$ dtool h2b 0x61626364
abcd
b2h Convert binary to hex
v0.1.0
$ dtool b2h abcd
0x61626364
...

View full usage document

  • Besides the sub command help, dtool provides a sub command usage to show examples:
$ dtool usage
Usage
----------------------------------------------------------
 h2s  Convert hex to UTF-8 string  $ dtool h2s 0x61626364 
      v0.1.0                       abcd 
----------------------------------------------------------
...
  • You can search usage with a keyword:
$ dtool usage -s md5
Usage
-------------------------------------------------------
 hash  Hex to hash  $ dtool hash -a md5 0x616263 
       MD5          0x900150983cd24fb0d6963f7d28e17f72 
       v0.2.0        
-------------------------------------------------------

Tips

pipe

convert a string to base64

$ echo -n abc | dtool s2h | dtool h2b64
YWJj

convert a encoded timestamp to date

$ echo -n 2c28e75d | dtool nd -tu32 | dtool ts2d
2019-12-04 11:29:48

convert a jpeg to base64

$ cat pic.jpg | dtool b2h | dtool h2b64
/9j/4AAQSkZJR...

calculate file md5

$ cat pic.jpg | dtool b2h | dtool hash -a md5
0x1884b72e23b0c93320bac6b050478ff4

Installation

Homebrew

$ brew install guoxbin/guoxbin/dtool

Recommend! Homebrew will install shell completion for bash, fish, and zsh along with dtool

Arch Linux

There is an AUR package for dtool that includes shell completion for bash, fish, and zsh.

git clone https://aur.archlinux.org/dtool.git
cd dtool
makepkg -si

Cargo

$ cargo install dtool

dtool's People

Contributors

guoxbin avatar wezm avatar atul9 avatar dylan-dpc avatar fmckeogh avatar dependabot[bot] avatar

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.