Skip to main content

A short description of your project

Project description


jupyter: kernelspec: display_name: base language: python name: python3 language_info: codemirror_mode: name: ipython version: 3 file_extension: .py mimetype: text/x-python name: python nbconvert_exporter: python pygments_lexer: ipython3 version: 3.10.9 nbformat: 4 nbformat_minor: 2

Pilothub

to install pilothub use

pip install pilothub

PPT Notes Maker

from pilothub.withopenai import ContentClient
from pilothub.pptnotes import PPTx2Notes

model = "gpt-4-0125-preview"
api_key = "xxxxxxxxxxxxxxxxx"
source_path = r"sample_data.pptx"
dest_path = r"output_file.pptx"
openai_client = ContentClient(openai_api_key=api_key,
                              open_ai_model=model,
                              max_tokens=2500,
                              temperature=0.7)
ppt_client = PPTx2Notes(file_path=source_path)
n = len(ppt_client.slides)
print("Total Number of slides ",n)
Total Number of slides  103
skip_slides_index = [0,n-3,n-2,n-1,n]
skip_slides_layout = ["1_Custom Layout","Quote Slide","Contemporary_Title v1","Section Header","Last_Slide v1","Quiz","Summary"]
skip_slide_titles = ["quiz","summary"]
ppt_client.set_skip_slides(skip_slides_index=skip_slides_index,
                           skip_slides_layout=skip_slides_layout,
                           skip_slide_titles=skip_slide_titles)
ai_prompt_dict = {
    "CoverPage":"Explain the Module Name in 2 lines",
    "Agenda":"This slide contains the agenda for whole module, provide one line summary for each topic.",
    "Section Header":"This is Section Header, Provide a 5 lines summary on what this section is about.",
    "Quote Slide":"This is a quote slide, provide a 10 lines summary with Key points to remember on what this quote is about.",
    "RunningMan-Infographic":"This is an summary slide, provide a 10 lines summary with Key points to remember on what this infographic is about.",
}

ai_prompt_for_skip_slides = """
You are an expert in course creation, below is text on the slide, provide short notes for this slide in less than 2 lines:

"""
default_prompt = """
            Role: You are an expert in course creation and articulation.
            Task: You need to provide detailed notes, summary & key points.
            Contraints: Keep the notes provided precise and concise.
            Use bullet points to explain the key concepts.
            Do not use any decoration such as bold text (prefer using bullet text)
            Add a section "For Students: " where provide expalanation is
                short format in layman language.(only if necessary/suitable)
            Provide notes for the following information:

            """
ppt_client.write_notes_to_pptx(output_path=dest_path,
                               content_client=openai_client,
                               SET_AI_TEXT_FOR_SKIP_SLIDES=True,
                               AI_PROPMT_SKIP_SLIDES=ai_prompt_for_skip_slides,
                               AI_PROMPT_DICT_SKIP_SLIDES=ai_prompt_dict,
                               DEFAULT_PROMPT_FOR_OTHER_SLIDES=default_prompt,
                               SKIP_NOTES_FOR_SLIDES_WITH_NOTES=True)

PPT to Handbook Maker

from pilothub.ppt2hb import HandbookMaker



# Set the path of the PowerPoint presentation
ppt_path = r"pilothub.pptx"

# Set the output path for the generated handbook
output_path = "handbook.docx"

# Create an instance of HandbookMaker
handbook_maker = HandbookMaker(ppt_path)


skip_slides = ['Quiz', 'CoverPage', 'RunningMan-Infographic','Last_Slide v1','1_Custom Layout','Contemporary_Title v1']
content_layout_name = "Title and Content"
skip_text_from_slides = ['sample_text1','sample_text2']

# Generate the handbook from the PowerPoint presentation
handbook_maker.convert_ppt_to_handbook(output_file_path=output_path,
                                       skip_slides=skip_slides,
                                       content_layout_name=content_layout_name,
                                       skip_text_from_slides=skip_text_from_slides)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pilothub-0.1.8.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pilothub-0.1.8-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file pilothub-0.1.8.tar.gz.

File metadata

  • Download URL: pilothub-0.1.8.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/6.11.0 pkginfo/1.9.6 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.66.1 CPython/3.10.9

File hashes

Hashes for pilothub-0.1.8.tar.gz
Algorithm Hash digest
SHA256 9c9b045cb105d5caf423d3dbc301cf457595b573d220362ec484087aa02a0c81
MD5 8163230912580d5f03b6344039faa275
BLAKE2b-256 37b611f64ad410c9471fe6dec7978badcd052b8fd229eaca12f431c76cfd9765

See more details on using hashes here.

File details

Details for the file pilothub-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: pilothub-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/6.11.0 pkginfo/1.9.6 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.66.1 CPython/3.10.9

File hashes

Hashes for pilothub-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f1b2bac29f030cdbd1b0c6aa012199e31b084e21abaf2d3db5d98bc3919fc558
MD5 c93f568737241c726314493873aca891
BLAKE2b-256 07d8cf2719760b0b88de41dd9d467e257c39408ef4a1319da8226412608fc4a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page