Metadata-Version: 2.1
Name: general-conference-extractor
Version: 0.0.1
Summary: This library allows you to extract all the speeches given for the general conferences of the Church of Jesus Christ of Latter-Day Saints from April 1971 to the most recent month and year.
Home-page: https://github.com/c-a-s-t-l-e/general-conference-extractor
Author: c-a-s-t-l-e
Author-email: castle676767@gmail.com
License: Apache Software License 2.0
Keywords: nbdev jupyter notebook python
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Provides-Extra: dev
License-File: LICENSE

# general-conference-extractor


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Install

``` sh
pip install general_conference_extractor
```

## How to Use

#### Example 1 - Just One Talk URL

Here’s what you could do with just one talk URL:

``` python
from general_conference_extractor.GeneralConferenceTalk import GeneralConferenceTalk

url = "https://www.churchofjesuschrist.org/study/general-conference/2024/04/15dushku?lang=eng"

talk = GeneralConferenceTalk(url, title=True, author=True, calling=True)

# Print the extracted text
print("**** Metadata ****  \n")
print(talk.metadata)
print("\n")

print("**** Extracted Text **** \n")
print(talk.text[0:300])
```

    **** Metadata ****  

    {'title': 'Pillars and Rays', 'author': 'Alexander Dushku', 'calling': 'Of the Seventy', 'year': 2024, 'month': 4, 'url': 'https://www.churchofjesuschrist.org/study/general-conference/2024/04/15dushku?lang=eng'}


    **** Extracted Text **** 

    Pillars and Rays

    By Elder Alexander Dushku

    Of the Seventy

    My message is for those who worry about their testimony because they haven’t had overwhelming spiritual experiences. I pray that I can provide some peace and assurance.

    The Restoration of the gospel of Jesus Christ began with an explosion

#### Example 2 - Get All the Talks for One General Conference

Or, here’s an example of extracting every talk from a specific General
Conference (i.e. April 2017 in this instance):

``` python
from general_conference_extractor.extract_URLs import generate_conference_url, extract_talk_urls
from general_conference_extractor.data_output import extract_conference_talks

# Step 1 - Get the URLs for the talks

# get the page URL that shows all the talks for that specific General Conference
gen_conf_page_url = generate_conference_url(2017, '04')

# get all the URLs for the talks that were given for that conference
talk_urls = extract_talk_urls(gen_conf_page_url)

# Step 2 - Save the talks as txt docs in folders and then their respective metadata in a seperate csv file
output_folder = './conference_talks'
metadata_csv_path = './metadata.csv'

# to produce the respective folders and documents
# extract_conference_talks(talk_urls, output_folder, metadata_csv_path)
```

#### Example 3 - Get All the Talks for a Specific Year

``` python
from general_conference_extractor.extract_URLs import extract_multiconference_talk_urls
from general_conference_extractor.data_output import extract_conference_talks

# As an example
multiconference_talk_urls = extract_multiconference_talk_urls(2017,2017)

# Step 2 - Save the talks as txt docs and their metadata in a csv file
output_folder = './conference_talks'
metadata_csv_path = './metadata.csv'

# to produce the respective folders and documents
# extract_conference_talks(multiconference_talk_urls, output_folder, metadata_csv_path)
```

#### Example 4 - Get All the Talks for a Specific Decade

``` python
from general_conference_extractor.extract_URLs import extract_multiconference_talk_urls
from general_conference_extractor.data_output import extract_conference_talks

# As an example
multiconference_talk_urls = extract_multiconference_talk_urls(2010,2019)

# Step 2 - Save the talks as txt docs and their metadata in a csv file
output_folder = './conference_talks'
metadata_csv_path = './metadata.csv'

# to produce the respective folders and documents
# extract_conference_talks(multiconference_talk_urls, output_folder, metadata_csv_path)
```


