AhmedBaset / hadith-json

Database of Prophet hadiths include 50,884 hadiths from 17 book, among of them the nine books
61 stars 9 forks source link

Deviding hadiths by book #1

Closed AhmedBaset closed 1 year ago

AhmedBaset commented 1 year ago

This PR adds new folder to db folder, which is db/by_book. This folder contains all the hadiths in the database, but sorted by book name. Also includes the functionality to create the folder.

Types:

Every file in the by_book folder is typed as BookFile.

interface BookFile {
    id: number;
    metadata: Prettify<Metadata>;
    chapters: Chapter[];
    hadiths: Hadith[];
}