- Go to web editor
-
The database/originals folder have different translations that were used as an input to apiscript.js, please refer those files to check whether your translation file will work fine or not. You may want to preprocess the file, if it is in other than text format(pdf, Images, docx, etc). Also make sure the correct hadith numbers are used in your file, the hadith numbers should be the same as is used in this api, so that proper hadith grades will be mapped
-
Add JSON data at end of the file in following format:
{ "book":"Name of the book", "author":"Name of the translator", "language":"Name of the language", "source":"Specify source here if any", "comments":"Add any comments here" }
Please see database/originals , all the files have the json data at end of file. When specifying the language, please use proper iso name of language. Also the book name should be same as given in info.
-
Drag & drop the translations to the start directory, you can paste any number of translations.
-
And then, edit command.txt file with the following line:
create
-
Now commit the changes and create pull request.
If you got stuck somewhere, Let me Know
Let say there is a spelling mistake in the edition and you would like to correct:
-
Copy the file to be edited, from database/linebyline directory and paste it into start directory
-
Update the text, Please do not modify the JSON values which are stored at the end of file,specifically the name and language json values
-
And then, edit command.txt file with the following line:
update
-
Now commit the changes and create pull request.
Lets say you what to know whether a translation exists in the database or not, or you want to find the edition which have a specific verse
-
Edit command.txt file with the following line:
search
And next line with text to be searched:
"text to be searched1" "text to be searched2"
-
Now commit the changes and create pull request.
-
Translations should not be deleted, otherwise it will break the api, but if there is a need, it can be done by editing command.txt file with the following line:
delete
And next line with editions to be deleted
editionNameToDelete editionName2ToDelete
-
Now commit the changes and create pull request.
-
You will have to add book metadata in info, and have to follow same structure, as how other books details are structured in json.
-
Run the infofixer script, which will sort the json, and fix any anamolies and generate minimized json.
-
Now commit the changes and create pull request.
-
Follow the steps given here.
Facing any issue? Let me Know
The above given details are enough to contribute to this repo, incase you want to know how the underlying things work or want to add new features to the repo then see Development details