Skip to content

Latest commit

 

History

History
127 lines (89 loc) · 3.81 KB

README.md

File metadata and controls

127 lines (89 loc) · 3.81 KB

DinVishesh

Build Status Coverage Status

A Node.js package that provides "On This Day in History" (dinvishesh) information in Marathi. Get historical events, births, and deaths for any date to enhance your knowledge of Indian history and culture.

Features

  • Get historical data for any specific date
  • Three categories of information:
    • Janm (Births) - Notable personalities born on a date
    • Mrutyu (Deaths) - Notable personalities who passed away on a date
    • Ghatana (Events) - Significant historical events that occurred on a date
  • Flexible API with multiple ways to query data
  • Data available in Marathi language
  • Zero dependencies

Installation

npm install dinvishesh

API Reference

1. dinVisheshToday()

Returns historical information for the current date.

const dinvishesh = require('dinvishesh');
const today = dinvishesh.dinVisheshToday();

Example response:

{
  "janm": [
    "१८८१: स्पॅनिश चित्रकार आणि शिल्पकार पाब्लो पिकासो यांचा जन्म.",
    "१९३७: संगीत समीक्षक डॉ. अशोक रानडे यांचा जन्म."
  ],
  "mrutyu": [...],
  "ghatana": [...]
}

2. dinVishesh(category, month, day)

Retrieve historical information for a specific date and category.

Parameters:

  • category (optional): 'janm', 'mrutyu', or 'ghatana' (default: 'janm')
  • month (optional): Month name in lowercase English (e.g., 'january')
  • day (optional): Day of month as string (e.g., '25')
const births = dinvishesh.dinVishesh('janm', 'january', '11');

3. dinVisheshByCategory(category)

Get all entries for a specific category organized by month.

Parameters:

  • category: 'janm', 'mrutyu', or 'ghatana'
const allBirths = dinvishesh.dinVisheshByCategory('janm');

4. dinVisheshAll()

Retrieve the complete database of historical information.

const completeData = dinvishesh.dinVisheshAll();

Usage Examples

const dinvishesh = require('dinvishesh');

// Get today's historical events
const today = dinvishesh.dinVisheshToday();
console.log('Today in history:', today.ghatana);

// Get births on a specific date
const births = dinvishesh.dinVishesh('janm', 'january', '11');
console.log('Born on January 11:', births);

// Get all deaths by month
const deaths = dinvishesh.dinVisheshByCategory('mrutyu');
console.log('Deaths in January:', deaths.january);

For more examples, check the examples directory in the repository:

git clone https://github.com/vinodnimbalkar/dinvishesh.git
cd dinvishesh/example
npm install
node demo.js

Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please ensure your PR includes appropriate tests and documentation updates.

Support the Project

If you find this package useful, consider supporting the development:

Buy Me A Coffee

License

MIT © Vinod Nimbalkar