Skip to content

khumnath/nepdate-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nepdate-cli: Bikram Sambat Date Converter

nepdate-cli is a command-line tool for displaying and converting dates between the Bikram Sambat (Vikram Samvat) and Gregorian calendars. It's a simple utility designed for easy interaction with these two calendar systems.

Note

Rust port is available at rust branch of this repository. if you want to install just binary using cargo use cargo install nepdate-cli or use as dependency on Cargo.toml file. nepdate-cli = "0.1.3" check https://github.com/khumnath/nepdate-cli/blob/rust/src/bikram.rs for available functions or https://github.com/khumnath/nepdate-cli/blob/rust/src/main.rs for example uses. read readme file for rust https://github.com/khumnath/nepdate-cli/blob/rust/README.md

Features

  • Display the current Bikram Sambat date.
  • Convert dates between Bikram Sambat and Gregorian calendars.
  • Supports very long date range.

Installation

There are two installation methods available: using a Debian package or compiling from source.

From Debian Package

  1. Download the latest .deb file from the releases page.
  2. Install the package using dpkg:

Bash

sudo dpkg -i nepdate-cli_1.0.0_amd64.deb

Replace nepdate-cli_1.0.0_amd64.deb with the filename of the downloaded package.

From Source

  1. Clone the repository:

Bash

git clone https://github.com/khumnath/nepdate-cli.git
cd nepdate-cli
  1. Install dependencies:

Bash

sudo apt-get update
sudo apt-get install -y cmake build-essential debhelper devscripts

  • packages debhelper and devscripts are for building debian installer package.
  1. Build and install:

Bash

mkdir build
cd build
cmake ..
make
sudo make install

  • if need to build deb package, run dpkg-buildpackage -b after make

Usage

Once installed, you can use nepdate-cli from the command line. Here are some basic commands:

  • Display the current Bikram Sambat date:

Bash

nepdate-cli

output: Screenshot_select-area_20240810182013

  • Convert to Bikram Sambat
 nepdate-cli --conv --tobs 2024 8 10

output: Screenshot_select-area_20240810182157

  • Convert a Bikram Sambat date to Gregorian:
nepdate-cli --conv --toad 2081 4 26  

output: Screenshot_select-area_20240810182318

** Replace the date strings with the date you want to convert.

Contributing

Contributions are welcome! If you have any bug reports or feature requests, please open an issue on the GitHub repository.

Here's a quick guide to contributing code:

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Commit your changes and push them to your fork.
  4. Open a pull request against the main branch of the original repository.

License

nepdate-cli is released under the GNU General Public License v3.0. See the LICENSE file for more details.

Contact

For any inquiries, you can reach out to khumnath cg.