Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Upload folder using huggingface_hub
Browse files- modules/config/bhagavat_gita.py +4 -0
- modules/config/bhagavata_purana.py +4 -0
- modules/config/brahma_sutra.py +4 -0
- modules/config/chathusloki.py +4 -0
- modules/config/divya_prabandham.py +4 -0
- modules/config/divya_prabandham_taniyans.py +4 -0
- modules/config/kamba_ramayanam.py +4 -0
- modules/config/kamba_ramayanam_en.py +4 -0
- modules/config/katakam.py +4 -0
- modules/config/pancha_sooktham.py +4 -0
- modules/config/shanthi_panchakam.py +4 -0
- modules/config/sri_stavam.py +4 -0
- modules/config/taitriya_aranyakam.py +4 -0
- modules/config/taitriya_brahmanam.py +4 -0
- modules/config/taitriya_samhitha.py +4 -0
- modules/config/taitriya_upanishad.py +4 -0
- modules/config/valmiki_ramayanam.py +4 -0
- modules/config/vishnu_sahasranamam.py +4 -0
- modules/google_drive/google_drive_utils.py +26 -0
- server.py +1 -0
modules/config/bhagavat_gita.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
|
|
|
| 2 |
from modules.scripture_helpers.bhagavat_gita_helper import (
|
| 3 |
get_bhagavat_gita_chapters,
|
| 4 |
get_chapter_order_from_bhagavat_gita,
|
|
@@ -7,6 +8,9 @@ from modules.scripture_helpers.bhagavat_gita_helper import (
|
|
| 7 |
bhagavat_gita_config = {
|
| 8 |
"name": "bhagavat_gita",
|
| 9 |
"title": "Bhagavat Gita",
|
|
|
|
|
|
|
|
|
|
| 10 |
"category": ScriptureCategoryConstants.VEDANTA,
|
| 11 |
"output_dir": "./output/bhagavat_gita",
|
| 12 |
"collection_name": "bhagavat_gita_openai",
|
|
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
from modules.scripture_helpers.bhagavat_gita_helper import (
|
| 4 |
get_bhagavat_gita_chapters,
|
| 5 |
get_chapter_order_from_bhagavat_gita,
|
|
|
|
| 8 |
bhagavat_gita_config = {
|
| 9 |
"name": "bhagavat_gita",
|
| 10 |
"title": "Bhagavat Gita",
|
| 11 |
+
"banner_url": convert_drive_url_to_direct(
|
| 12 |
+
"https://drive.google.com/file/d/1HTDB5VdQ1azGvkdeAuKK6MC09Pklh9Og/view?usp=drive_link"
|
| 13 |
+
),
|
| 14 |
"category": ScriptureCategoryConstants.VEDANTA,
|
| 15 |
"output_dir": "./output/bhagavat_gita",
|
| 16 |
"collection_name": "bhagavat_gita_openai",
|
modules/config/bhagavata_purana.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
|
|
|
| 2 |
|
| 3 |
|
| 4 |
bhagavata_purana_config = {
|
| 5 |
"name": "bhagavata_purana",
|
| 6 |
"title": "Bhagavatha Puranam",
|
|
|
|
|
|
|
|
|
|
| 7 |
"category" : ScriptureCategoryConstants.PURANAM,
|
| 8 |
"output_dir": "./output/bhagavata_purana",
|
| 9 |
"collection_name": "bhagavata_purana",
|
|
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
|
| 4 |
|
| 5 |
bhagavata_purana_config = {
|
| 6 |
"name": "bhagavata_purana",
|
| 7 |
"title": "Bhagavatha Puranam",
|
| 8 |
+
"banner_url": convert_drive_url_to_direct(
|
| 9 |
+
"https://drive.google.com/file/d/1APDzjcF-G4tn6qHHn0QFmA-odcrQS2-e/view?usp=drive_link"
|
| 10 |
+
),
|
| 11 |
"category" : ScriptureCategoryConstants.PURANAM,
|
| 12 |
"output_dir": "./output/bhagavata_purana",
|
| 13 |
"collection_name": "bhagavata_purana",
|
modules/config/brahma_sutra.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
|
|
|
| 2 |
|
| 3 |
|
| 4 |
brahma_sutra_config = {
|
| 5 |
"name": "brahma_sutra",
|
| 6 |
"title": "Brahma Sutra",
|
|
|
|
|
|
|
|
|
|
| 7 |
"category": ScriptureCategoryConstants.VEDANTA,
|
| 8 |
"output_dir": "./output/brahma_sutra",
|
| 9 |
"collection_name": "brahma_sutra",
|
|
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
|
| 4 |
|
| 5 |
brahma_sutra_config = {
|
| 6 |
"name": "brahma_sutra",
|
| 7 |
"title": "Brahma Sutra",
|
| 8 |
+
"banner_url": convert_drive_url_to_direct(
|
| 9 |
+
"https://drive.google.com/file/d/1YXSKuzFYjYQCS-8IsQl0eYMIiQu7UFzW/view?usp=drive_link"
|
| 10 |
+
),
|
| 11 |
"category": ScriptureCategoryConstants.VEDANTA,
|
| 12 |
"output_dir": "./output/brahma_sutra",
|
| 13 |
"collection_name": "brahma_sutra",
|
modules/config/chathusloki.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
|
|
|
| 2 |
|
| 3 |
|
| 4 |
chathusloki_config = {
|
| 5 |
"name": "chathusloki",
|
| 6 |
"title": "Chathusloki",
|
|
|
|
|
|
|
|
|
|
| 7 |
"category": ScriptureCategoryConstants.STOTRAM,
|
| 8 |
"output_dir": "./output/chathusloki",
|
| 9 |
"collection_name": "chathusloki",
|
|
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
|
| 4 |
|
| 5 |
chathusloki_config = {
|
| 6 |
"name": "chathusloki",
|
| 7 |
"title": "Chathusloki",
|
| 8 |
+
"banner_url": convert_drive_url_to_direct(
|
| 9 |
+
"https://drive.google.com/file/d/1QXyNyhw7-y25T9z9wY0Vm0KxOLfxBM71/view?usp=drive_link"
|
| 10 |
+
),
|
| 11 |
"category": ScriptureCategoryConstants.STOTRAM,
|
| 12 |
"output_dir": "./output/chathusloki",
|
| 13 |
"collection_name": "chathusloki",
|
modules/config/divya_prabandham.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
|
|
|
| 2 |
import nalayiram_helper
|
| 3 |
|
| 4 |
divya_prabandham_config = {
|
| 5 |
"name": "divya_prabandham",
|
| 6 |
"title": "4000 Divya Prabandham",
|
|
|
|
|
|
|
|
|
|
| 7 |
"category": ScriptureCategoryConstants.LITERATURE,
|
| 8 |
"output_dir": "./output/divya_prabandham",
|
| 9 |
"collection_name": "divya_prabandham",
|
|
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
import nalayiram_helper
|
| 4 |
|
| 5 |
divya_prabandham_config = {
|
| 6 |
"name": "divya_prabandham",
|
| 7 |
"title": "4000 Divya Prabandham",
|
| 8 |
+
"banner_url": convert_drive_url_to_direct(
|
| 9 |
+
"https://drive.google.com/file/d/1bGdlERDvBiO7wbOOo3cO8vYclyFYbGdk/view?usp=drive_link"
|
| 10 |
+
),
|
| 11 |
"category": ScriptureCategoryConstants.LITERATURE,
|
| 12 |
"output_dir": "./output/divya_prabandham",
|
| 13 |
"collection_name": "divya_prabandham",
|
modules/config/divya_prabandham_taniyans.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
|
|
|
| 2 |
import nalayiram_helper
|
| 3 |
|
| 4 |
divya_prabandham_taniyans_config = {
|
| 5 |
"name": "divya_prabandham_taniyans",
|
| 6 |
"title": "Divya Prabandha Taniyans",
|
|
|
|
|
|
|
|
|
|
| 7 |
"category": ScriptureCategoryConstants.LITERATURE,
|
| 8 |
"output_dir": "./output/divya_prabandham_taniyans",
|
| 9 |
"collection_name": "divya_prabandham_taniyans",
|
|
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
import nalayiram_helper
|
| 4 |
|
| 5 |
divya_prabandham_taniyans_config = {
|
| 6 |
"name": "divya_prabandham_taniyans",
|
| 7 |
"title": "Divya Prabandha Taniyans",
|
| 8 |
+
"banner_url": convert_drive_url_to_direct(
|
| 9 |
+
"https://drive.google.com/file/d/1jYdgIXbM3siBOIo3YnQ7JMLv087tRiqL/view?usp=drive_link"
|
| 10 |
+
),
|
| 11 |
"category": ScriptureCategoryConstants.LITERATURE,
|
| 12 |
"output_dir": "./output/divya_prabandham_taniyans",
|
| 13 |
"collection_name": "divya_prabandham_taniyans",
|
modules/config/kamba_ramayanam.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
|
|
|
| 2 |
|
| 3 |
|
| 4 |
kamba_ramayanam_config = {
|
| 5 |
"name": "kamba_ramayanam",
|
| 6 |
"title": "Kamba Ramayanam (Tamil)",
|
|
|
|
|
|
|
|
|
|
| 7 |
"category" : ScriptureCategoryConstants.ITHIHASAM,
|
| 8 |
"output_dir": "./output/kamba_ramayanam",
|
| 9 |
"collection_name": "kamba_ramayanam",
|
|
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
|
| 4 |
|
| 5 |
kamba_ramayanam_config = {
|
| 6 |
"name": "kamba_ramayanam",
|
| 7 |
"title": "Kamba Ramayanam (Tamil)",
|
| 8 |
+
"banner_url": convert_drive_url_to_direct(
|
| 9 |
+
"https://drive.google.com/file/d/1_e4AKWZUP5eBuob0yWIZfnERnSWVdcJl/view?usp=drive_link"
|
| 10 |
+
),
|
| 11 |
"category" : ScriptureCategoryConstants.ITHIHASAM,
|
| 12 |
"output_dir": "./output/kamba_ramayanam",
|
| 13 |
"collection_name": "kamba_ramayanam",
|
modules/config/kamba_ramayanam_en.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
|
|
|
| 2 |
from modules.scripture_helpers.kamba_ramayanam_helper import (
|
| 3 |
get_list_of_kandams,
|
| 4 |
get_list_of_padalams,
|
|
@@ -8,6 +9,9 @@ from modules.scripture_helpers.kamba_ramayanam_helper import (
|
|
| 8 |
kamba_ramayanam_en_config = {
|
| 9 |
"name": "kamba_ramayanam_en",
|
| 10 |
"title": "Kamba Ramayanam (English)",
|
|
|
|
|
|
|
|
|
|
| 11 |
"category" : ScriptureCategoryConstants.ITHIHASAM,
|
| 12 |
"output_dir": "./output/kamba_ramayanam",
|
| 13 |
"collection_name": "kamba_ramayanam_en",
|
|
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
from modules.scripture_helpers.kamba_ramayanam_helper import (
|
| 4 |
get_list_of_kandams,
|
| 5 |
get_list_of_padalams,
|
|
|
|
| 9 |
kamba_ramayanam_en_config = {
|
| 10 |
"name": "kamba_ramayanam_en",
|
| 11 |
"title": "Kamba Ramayanam (English)",
|
| 12 |
+
"banner_url": convert_drive_url_to_direct(
|
| 13 |
+
"https://drive.google.com/file/d/1s0M9e2NCF1Gm8GyeGQPdNqR_bxr8mR9j/view?usp=drive_link"
|
| 14 |
+
),
|
| 15 |
"category" : ScriptureCategoryConstants.ITHIHASAM,
|
| 16 |
"output_dir": "./output/kamba_ramayanam",
|
| 17 |
"collection_name": "kamba_ramayanam_en",
|
modules/config/katakam.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
|
|
|
| 2 |
|
| 3 |
|
| 4 |
katakam_config = {
|
| 5 |
"name": "katakam",
|
| 6 |
"title": "Katakam",
|
|
|
|
|
|
|
|
|
|
| 7 |
"category" : ScriptureCategoryConstants.VEDAM,
|
| 8 |
"output_dir": "./output/katakam",
|
| 9 |
"collection_name": "katakam",
|
|
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
|
| 4 |
|
| 5 |
katakam_config = {
|
| 6 |
"name": "katakam",
|
| 7 |
"title": "Katakam",
|
| 8 |
+
"banner_url": convert_drive_url_to_direct(
|
| 9 |
+
"https://drive.google.com/file/d/1bGH6JRzt3-BSW5t7J77mcyA9W4T5DeGu/view?usp=drive_link"
|
| 10 |
+
),
|
| 11 |
"category" : ScriptureCategoryConstants.VEDAM,
|
| 12 |
"output_dir": "./output/katakam",
|
| 13 |
"collection_name": "katakam",
|
modules/config/pancha_sooktham.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
|
|
|
| 2 |
from modules.scripture_helpers.pancha_sooktham_helper import (
|
| 3 |
get_chapter_order_from_pancha_sooktham,
|
| 4 |
get_pancha_sooktham_chapters,
|
|
@@ -7,6 +8,9 @@ from modules.scripture_helpers.pancha_sooktham_helper import (
|
|
| 7 |
pancha_sooktham_config = {
|
| 8 |
"name": "pancha_sooktham",
|
| 9 |
"title": "Pancha Sooktham",
|
|
|
|
|
|
|
|
|
|
| 10 |
"category": ScriptureCategoryConstants.VEDAM,
|
| 11 |
"output_dir": "./output/pancha_sooktham",
|
| 12 |
"collection_name": "pancha_sooktham",
|
|
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
from modules.scripture_helpers.pancha_sooktham_helper import (
|
| 4 |
get_chapter_order_from_pancha_sooktham,
|
| 5 |
get_pancha_sooktham_chapters,
|
|
|
|
| 8 |
pancha_sooktham_config = {
|
| 9 |
"name": "pancha_sooktham",
|
| 10 |
"title": "Pancha Sooktham",
|
| 11 |
+
"banner_url": convert_drive_url_to_direct(
|
| 12 |
+
"https://drive.google.com/file/d/1EPxyciI9WaVRH6oIrW7D-w4PkYs3SQmy/view?usp=drive_link"
|
| 13 |
+
),
|
| 14 |
"category": ScriptureCategoryConstants.VEDAM,
|
| 15 |
"output_dir": "./output/pancha_sooktham",
|
| 16 |
"collection_name": "pancha_sooktham",
|
modules/config/shanthi_panchakam.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
|
|
|
| 2 |
from modules.scripture_helpers.shanthi_panchakam_helper import (
|
| 3 |
get_chapter_order_from_shanthi_panchakam,
|
| 4 |
get_shanthi_panchakam_chapters,
|
|
@@ -7,6 +8,9 @@ from modules.scripture_helpers.shanthi_panchakam_helper import (
|
|
| 7 |
shanthi_panchakam_config = {
|
| 8 |
"name": "shanthi_panchakam",
|
| 9 |
"title": "Shanthi Panchakam",
|
|
|
|
|
|
|
|
|
|
| 10 |
"category": ScriptureCategoryConstants.VEDAM,
|
| 11 |
"output_dir": "./output/shanthi_panchakam",
|
| 12 |
"collection_name": "shanthi_panchakam",
|
|
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
from modules.scripture_helpers.shanthi_panchakam_helper import (
|
| 4 |
get_chapter_order_from_shanthi_panchakam,
|
| 5 |
get_shanthi_panchakam_chapters,
|
|
|
|
| 8 |
shanthi_panchakam_config = {
|
| 9 |
"name": "shanthi_panchakam",
|
| 10 |
"title": "Shanthi Panchakam",
|
| 11 |
+
"banner_url": convert_drive_url_to_direct(
|
| 12 |
+
"https://drive.google.com/file/d/1iFF-Q2fJbM6THwJIDk5Uy1NMonInQCS4/view?usp=drive_link"
|
| 13 |
+
),
|
| 14 |
"category": ScriptureCategoryConstants.VEDAM,
|
| 15 |
"output_dir": "./output/shanthi_panchakam",
|
| 16 |
"collection_name": "shanthi_panchakam",
|
modules/config/sri_stavam.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
|
|
|
| 2 |
|
| 3 |
|
| 4 |
sri_stavam_config = {
|
| 5 |
"name": "sri_stavam",
|
| 6 |
"title": "Sri Stavam",
|
|
|
|
|
|
|
|
|
|
| 7 |
"category": ScriptureCategoryConstants.STOTRAM,
|
| 8 |
"output_dir": "./output/sri_stavam",
|
| 9 |
"collection_name": "sri_stavam",
|
|
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
|
| 4 |
|
| 5 |
sri_stavam_config = {
|
| 6 |
"name": "sri_stavam",
|
| 7 |
"title": "Sri Stavam",
|
| 8 |
+
"banner_url": convert_drive_url_to_direct(
|
| 9 |
+
"https://drive.google.com/file/d/1kWJBekDBijMqXFXLkgjMp3hS19gH5PFT/view?usp=drive_link"
|
| 10 |
+
),
|
| 11 |
"category": ScriptureCategoryConstants.STOTRAM,
|
| 12 |
"output_dir": "./output/sri_stavam",
|
| 13 |
"collection_name": "sri_stavam",
|
modules/config/taitriya_aranyakam.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
|
|
|
| 2 |
|
| 3 |
|
| 4 |
taitriya_aranyakam_config = {
|
| 5 |
"name": "taitriya_aranyakam",
|
| 6 |
"title": "Taitriya Aranyakam",
|
|
|
|
|
|
|
|
|
|
| 7 |
"category": ScriptureCategoryConstants.VEDAM,
|
| 8 |
"output_dir": "./output/taitriya_aranyakam",
|
| 9 |
"collection_name": "taitriya_aranyakam",
|
|
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
|
| 4 |
|
| 5 |
taitriya_aranyakam_config = {
|
| 6 |
"name": "taitriya_aranyakam",
|
| 7 |
"title": "Taitriya Aranyakam",
|
| 8 |
+
"banner_url": convert_drive_url_to_direct(
|
| 9 |
+
"https://drive.google.com/file/d/1-8weVFe58DWPef2fuVyu5It3r1pCXgc2/view?usp=drive_link"
|
| 10 |
+
),
|
| 11 |
"category": ScriptureCategoryConstants.VEDAM,
|
| 12 |
"output_dir": "./output/taitriya_aranyakam",
|
| 13 |
"collection_name": "taitriya_aranyakam",
|
modules/config/taitriya_brahmanam.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
|
|
|
| 2 |
|
| 3 |
|
| 4 |
taitriya_brahmanam_config = {
|
| 5 |
"name": "taitriya_brahmanam",
|
| 6 |
"title": "Taitriya Brahmanam",
|
|
|
|
|
|
|
|
|
|
| 7 |
"category": ScriptureCategoryConstants.VEDAM,
|
| 8 |
"output_dir": "./output/taitriya_brahmanam",
|
| 9 |
"collection_name": "taitriya_brahmanam",
|
|
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
|
| 4 |
|
| 5 |
taitriya_brahmanam_config = {
|
| 6 |
"name": "taitriya_brahmanam",
|
| 7 |
"title": "Taitriya Brahmanam",
|
| 8 |
+
"banner_url": convert_drive_url_to_direct(
|
| 9 |
+
"https://drive.google.com/file/d/1PVoza1oMWYBdwqDX1PC5CvJu5r6nsl3e/view?usp=drive_link"
|
| 10 |
+
),
|
| 11 |
"category": ScriptureCategoryConstants.VEDAM,
|
| 12 |
"output_dir": "./output/taitriya_brahmanam",
|
| 13 |
"collection_name": "taitriya_brahmanam",
|
modules/config/taitriya_samhitha.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
|
|
|
| 2 |
|
| 3 |
|
| 4 |
taitriya_samhitha_config = {
|
| 5 |
"name": "taitriya_samhitha",
|
| 6 |
"title": "Taitriya Samhitha",
|
|
|
|
|
|
|
|
|
|
| 7 |
"category": ScriptureCategoryConstants.VEDAM,
|
| 8 |
"output_dir": "./output/taitriya_samhitha",
|
| 9 |
"collection_name": "taitriya_samhitha",
|
|
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
|
| 4 |
|
| 5 |
taitriya_samhitha_config = {
|
| 6 |
"name": "taitriya_samhitha",
|
| 7 |
"title": "Taitriya Samhitha",
|
| 8 |
+
"banner_url": convert_drive_url_to_direct(
|
| 9 |
+
"https://drive.google.com/file/d/1xxjMzPfqm9Vx95tdmGfSFkzJtqKLuxal/view?usp=drive_link"
|
| 10 |
+
),
|
| 11 |
"category": ScriptureCategoryConstants.VEDAM,
|
| 12 |
"output_dir": "./output/taitriya_samhitha",
|
| 13 |
"collection_name": "taitriya_samhitha",
|
modules/config/taitriya_upanishad.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
|
|
|
| 2 |
from modules.scripture_helpers.taitriya_upanishad_helper import (
|
| 3 |
get_chapter_order_from_taitriya_upanishad,
|
| 4 |
get_taitriya_upanishad_chapters,
|
|
@@ -7,6 +8,9 @@ from modules.scripture_helpers.taitriya_upanishad_helper import (
|
|
| 7 |
taitriya_upanishad_config = {
|
| 8 |
"name": "taitriya_upanishad",
|
| 9 |
"title": "Taitriya Upanishad",
|
|
|
|
|
|
|
|
|
|
| 10 |
"category": ScriptureCategoryConstants.VEDAM,
|
| 11 |
"output_dir": "./output/taitriya_upanishad",
|
| 12 |
"collection_name": "taitriya_upanishad",
|
|
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
from modules.scripture_helpers.taitriya_upanishad_helper import (
|
| 4 |
get_chapter_order_from_taitriya_upanishad,
|
| 5 |
get_taitriya_upanishad_chapters,
|
|
|
|
| 8 |
taitriya_upanishad_config = {
|
| 9 |
"name": "taitriya_upanishad",
|
| 10 |
"title": "Taitriya Upanishad",
|
| 11 |
+
"banner_url": convert_drive_url_to_direct(
|
| 12 |
+
"https://drive.google.com/file/d/1etSEGmzl06XgO2VFhBVSQK5u_1zbkqvb/view?usp=drive_link"
|
| 13 |
+
),
|
| 14 |
"category": ScriptureCategoryConstants.VEDAM,
|
| 15 |
"output_dir": "./output/taitriya_upanishad",
|
| 16 |
"collection_name": "taitriya_upanishad",
|
modules/config/valmiki_ramayanam.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
|
|
|
| 2 |
|
| 3 |
|
| 4 |
valmiki_ramayanam_config = {
|
| 5 |
"name": "valmiki_ramayanam",
|
| 6 |
"title": "Valmiki Ramayanam",
|
|
|
|
|
|
|
|
|
|
| 7 |
"category" : ScriptureCategoryConstants.ITHIHASAM,
|
| 8 |
"output_dir": "./output/valmiki_ramayanam",
|
| 9 |
"collection_name": "valmiki_ramayanam_openai",
|
|
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
|
| 4 |
|
| 5 |
valmiki_ramayanam_config = {
|
| 6 |
"name": "valmiki_ramayanam",
|
| 7 |
"title": "Valmiki Ramayanam",
|
| 8 |
+
"banner_url": convert_drive_url_to_direct(
|
| 9 |
+
"https://drive.google.com/file/d/1tr6uwDYw3kec4WeqRS9IrXzZfja1vmci/view?usp=drive_link"
|
| 10 |
+
),
|
| 11 |
"category" : ScriptureCategoryConstants.ITHIHASAM,
|
| 12 |
"output_dir": "./output/valmiki_ramayanam",
|
| 13 |
"collection_name": "valmiki_ramayanam_openai",
|
modules/config/vishnu_sahasranamam.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
|
|
|
| 2 |
from modules.scripture_helpers.vishnu_sahasranamam_helper import (
|
| 3 |
get_chapter_order_from_sahasranamam,
|
| 4 |
get_chapters_from_sahasranamam,
|
|
@@ -7,6 +8,9 @@ from modules.scripture_helpers.vishnu_sahasranamam_helper import (
|
|
| 7 |
vishnu_sahasranamam_config = {
|
| 8 |
"name": "vishnu_sahasranamam",
|
| 9 |
"title": "Vishnu Sahasranamam",
|
|
|
|
|
|
|
|
|
|
| 10 |
"category" : ScriptureCategoryConstants.STOTRAM,
|
| 11 |
"output_dir": "./output/vishnu_sahasranamam",
|
| 12 |
"collection_name": "vishnu_sahasranamam_openai",
|
|
|
|
| 1 |
from modules.config.categories import ScriptureCategoryConstants
|
| 2 |
+
from modules.google_drive.google_drive_utils import convert_drive_url_to_direct
|
| 3 |
from modules.scripture_helpers.vishnu_sahasranamam_helper import (
|
| 4 |
get_chapter_order_from_sahasranamam,
|
| 5 |
get_chapters_from_sahasranamam,
|
|
|
|
| 8 |
vishnu_sahasranamam_config = {
|
| 9 |
"name": "vishnu_sahasranamam",
|
| 10 |
"title": "Vishnu Sahasranamam",
|
| 11 |
+
"banner_url": convert_drive_url_to_direct(
|
| 12 |
+
"https://drive.google.com/file/d/1JBfQT9cA4HZZk2niUx96U67ZyoebVJHa/view?usp=drive_link"
|
| 13 |
+
),
|
| 14 |
"category" : ScriptureCategoryConstants.STOTRAM,
|
| 15 |
"output_dir": "./output/vishnu_sahasranamam",
|
| 16 |
"collection_name": "vishnu_sahasranamam_openai",
|
modules/google_drive/google_drive_utils.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import re
|
| 2 |
+
|
| 3 |
+
def convert_drive_url_to_direct(url: str) -> str:
|
| 4 |
+
"""
|
| 5 |
+
Converts a Google Drive 'view' or 'open?id=' URL
|
| 6 |
+
into a direct image/download URL usable in apps.
|
| 7 |
+
"""
|
| 8 |
+
# Try to extract the file ID from either form
|
| 9 |
+
patterns = [
|
| 10 |
+
r'd/([a-zA-Z0-9_-]+)', # e.g. .../file/d/<ID>/view
|
| 11 |
+
r'id=([a-zA-Z0-9_-]+)' # e.g. ...open?id=<ID>
|
| 12 |
+
]
|
| 13 |
+
|
| 14 |
+
for pattern in patterns:
|
| 15 |
+
match = re.search(pattern, url)
|
| 16 |
+
if match:
|
| 17 |
+
file_id = match.group(1)
|
| 18 |
+
return f"https://drive.google.com/uc?export=view&id={file_id}"
|
| 19 |
+
|
| 20 |
+
raise ValueError("Invalid Google Drive URL format")
|
| 21 |
+
|
| 22 |
+
# Example usage
|
| 23 |
+
if __name__ == "__main__":
|
| 24 |
+
url = "https://drive.google.com/file/d/1HTDB5VdQ1azGvkdeAuKK6MC09Pklh9Og/view?usp=drive_link"
|
| 25 |
+
print(convert_drive_url_to_direct(url))
|
| 26 |
+
# Output: https://drive.google.com/uc?export=view&id=1HTDB5VdQ1azGvkdeAuKK6MC09Pklh9Og
|
server.py
CHANGED
|
@@ -277,6 +277,7 @@ async def get_scripture_configs():
|
|
| 277 |
{
|
| 278 |
"name": s["name"], # e.g. "bhagavad_gita"
|
| 279 |
"title": s["title"], # e.g. "Bhagavad Gita"
|
|
|
|
| 280 |
"category": s["category"], # e.g. "Philosophy"
|
| 281 |
"unit": s["unit"], # e.g. "verse" or "page"
|
| 282 |
"unit_field": s.get("unit_field", s.get("unit")),
|
|
|
|
| 277 |
{
|
| 278 |
"name": s["name"], # e.g. "bhagavad_gita"
|
| 279 |
"title": s["title"], # e.g. "Bhagavad Gita"
|
| 280 |
+
"banner_url": s.get("banner_url",None),
|
| 281 |
"category": s["category"], # e.g. "Philosophy"
|
| 282 |
"unit": s["unit"], # e.g. "verse" or "page"
|
| 283 |
"unit_field": s.get("unit_field", s.get("unit")),
|