Skip to content

Commit

Permalink
style: Format markdown documentation files (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsanima authored Jun 16, 2024
1 parent 89c9945 commit 96c4402
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 31 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
# dotfiles

These dotfiles include configuration settings for various tools for terminal customization, custom libraries, and many more. Additionally, this repository contains template files that can be used for other repositories, such as _GitHub Actions Workflow_, _Dependabot_, _Labeler_, or other commonly used dotfiles.
These dotfiles include configuration settings for various tools for terminal customization, custom
libraries, and many more. Additionally, this repository contains template files that can be used for
other repositories, such as _GitHub Actions Workflow_, _Dependabot_, _Labeler_, or other commonly
used dotfiles.

> [!NOTE]
> Ensure that you have [Nerd Fonts](https://github.com/ryanoasis/nerd-fonts/) installed on your operating system.
>
> Ensure that you have [Nerd Fonts](https://github.com/ryanoasis/nerd-fonts/) installed on your
> operating system.
## Installing

Instructions for installing the dotfiles configuration. First, clone this repository, then run the installation script for your operating system.
Instructions for installing the dotfiles configuration. First, clone this repository, then run the
installation script for your operating system. The installation script is still work in progress.

### Linux

Run the `./install.sh` script in the _Shell_ terminal to install the configuration on **GNU/Linux** systems like _Debian_ or _Ubuntu_. This script include the [ohmyzsh](https://github.com/ohmyzsh/ohmyzsh/) installation and many more.
Run the `./install.sh` script in the _Shell_ terminal to install the dotfiles configuration for
**GNU/Linux** systems like _Debian_ or _Ubuntu_. This script include the configuration for
[ohmyzsh](https://github.com/ohmyzsh/ohmyzsh/) installation and many more.

### Windows

Run the `.\install.ps1` script in the _PowerShell_ to install the configuration on **Windows** system. This script include the [oh-my-posh](https://github.com/JanDeDobbeleer/oh-my-posh/) installation and many more.
Run the `.\install.ps1` script in the _PowerShell_ to install the dotfiles configuration for
**Windows** system. This script include the configuration for
[oh-my-posh](https://github.com/JanDeDobbeleer/oh-my-posh/) installation and many more.
65 changes: 42 additions & 23 deletions lib/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# Libraries

Below is documentation for the libraries included in this project, which you can utilize in your own projects.

> [!NOTE]
> Currently, the libraries are only available within this project and cannot be installed as a package using `apt install` command.
> However, there are plans to make it available as a standalone package in the future.
Below is documentation for the libraries included in this project, which you can utilize in your own
projects. The installation script is still work in progress.

<details>
<summary><strong>Table of Contents</strong> (click to expand)</summary>
Expand All @@ -19,28 +16,46 @@ Below is documentation for the libraries included in this project, which you can

## mdsanima-shell

This package contains libraries for functions that help execute _Shell Scripts_ on **GNU/Linux**, such as _Debian_ or _Ubuntu_.
This package contains libraries for functions that help execute _Shell Scripts_ on **GNU/Linux**
systems like _Debian_ or _Ubuntu_.

> [!NOTE]
>
> Currently, the libraries are only available within this project and cannot be installed as a
> package using `apt install` command. However, there are plans to make it available as a standalone
> package in the future.
The package might be deleted in the future.

### Available libraries

- [`libcolor.sh`](./mdsanima-shell/libcolor.sh): Color palette definition that will be used throughout a project for consistent styling.
- [`libconvert.sh`](./mdsanima-shell/libconvert.sh): Converting data or values from one format or type to another.
- [`libevent.sh`](./mdsanima-shell/libevent.sh): Logging events or actions within a program for debugging or monitoring purposes.
- [`libprint.sh`](./mdsanima-shell/libprint.sh): Printing formatted text or data to the shell console or another output stream.
- [`libutil.sh`](./mdsanima-shell/libutil.sh): Utility that perform common tasks or operations needed across different parts of a project.
This package contains the following libraries:

- [`libcolor.sh`](./mdsanima-shell/libcolor.sh): Color palette definition that will be used
throughout a project for consistent styling.
- [`libconvert.sh`](./mdsanima-shell/libconvert.sh): Converting data or values from one format or
type to another.
- [`libevent.sh`](./mdsanima-shell/libevent.sh): Logging events or actions within a program for
debugging or monitoring purposes.
- [`libprint.sh`](./mdsanima-shell/libprint.sh): Printing formatted text or data to the shell
console or another output stream.
- [`libutil.sh`](./mdsanima-shell/libutil.sh): Utility that perform common tasks or operations
needed across different parts of a project.

Each file above contains appropriate documentation for each available function and how to use it.

### Available functions

- [`convert::hex_to_rgb`](./mdsanima-shell/libconert.sh#L18)
- [`event::debug`](./mdsanima-shell/libevent.sh#L7)
- [`event::dev`](./mdsanima-shell/libevent.sh#L11)
- [`event::error`](./mdsanima-shell/libevent.sh#L15)
- [`event::info`](./mdsanima-shell/libevent.sh#L19)
- [`event::success`](./mdsanima-shell/libevent.sh#L23)
- [`event::warning`](./mdsanima-shell/libevent.sh#L27)
- [`print::color`](./mdsanima-shell/libprint.sh#L25)
Here is a list of available functions:

- [`convert::hex_to_rgb`](./mdsanima-shell/libconvert.sh#L17)
- [`event::debug`](./mdsanima-shell/libevent.sh#L6)
- [`event::dev`](./mdsanima-shell/libevent.sh#L10)
- [`event::error`](./mdsanima-shell/libevent.sh#L14)
- [`event::info`](./mdsanima-shell/libevent.sh#L18)
- [`event::success`](./mdsanima-shell/libevent.sh#L22)
- [`event::warning`](./mdsanima-shell/libevent.sh#L26)
- [`print::color`](./mdsanima-shell/libprint.sh#L26)
- [`util::is_package_installed`](./mdsanima-shell/libutil.sh#L8)
- [`util::is_installed`](./mdsanima-shell/libutil.sh#L20)
- [`util::is_integer`](./mdsanima-shell/libutil.sh#L25)
Expand All @@ -50,18 +65,22 @@ Each file above contains appropriate documentation for each available function a
- [`util::is_special_char`](./mdsanima-shell/libutil.sh#L69)
- [`util::is_first_char_special`](./mdsanima-shell/libutil.sh#L81)
- [`util::is_hex`](./mdsanima-shell/libutil.sh#L93)
- [`util::contains_special_char`](./mdsanima-shell/libutil.sh#L105)
- [`util::one_line_progress`](./mdsanima-shell/libutil.sh#L116)
- [`util::contains_special_char`](./mdsanima-shell/libutil.sh#L104)
- [`util::one_line_progress`](./mdsanima-shell/libutil.sh#L115)

### Example usages

If you want to use this library files you can simple sourced this file on your bash script like this example:
If you want to use this library files you can simple sourced this file on your bash script like this
example:

```shell
source "$PWD/lib/mdsanima-shell/libcolor.sh"
```

In the above example, I used `$PWD` to get the path to the file directory. This example is executed in the directory where our libraries must be located, for example `/home/mdsanima/workspace/dotfiles/` the current repository and the script file in which we want to use our libraries is in the root of this directory like `install.sh` script.
In the above example, I used `$PWD` to get the path to the file directory. This example is executed
in the directory where our libraries must be located, for example `$HOME/workspace/dotfiles/` the
current repository and the script file in which we want to use our libraries is in the root of this
directory like `install.sh` script.

Example script file `test.sh` must be located on the root of this repository:

Expand Down
9 changes: 6 additions & 3 deletions mod/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Modules

Below is documentation for the modules included in this project, which you can utilize in your own projects.
Below is documentation for the modules included in this project, which you can utilize in your own
projects. The installation script is still work in progress.

Currently, the modules are only available within this project and cannot be imported as a modules using commands such as `Import-Module -Name` in PowerShell terminal. However, there are plans to make it available as a standalone package in the future.
Currently, the modules are only available within this project and cannot be imported as a modules
using commands such as `Import-Module -Name` in PowerShell terminal. However, there are plans to
make it available as a standalone package in the future.

## mdsanima-power

This module contains functions thats help to execute _PowerShell_ scripts on **Windows**.
This module contains functions thats help to execute _PowerShell_ scripts on **Windows** system.

0 comments on commit 96c4402

Please sign in to comment.