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.2.tar.gz
(25.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pilothub-0.1.8.2.tar.gz.
File metadata
- Download URL: pilothub-0.1.8.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3687ddd02315b36923059e0a094cf7b0d6f86a6dd2df2d77fba906e337c5f07d
|
|
| MD5 |
98564a00c6ffbd0c0a905b47dbc7ee6b
|
|
| BLAKE2b-256 |
b44a56f052b359bfbdfe7221d4e3bdc73e49ae60254529c888239256e005ddca
|
File details
Details for the file pilothub-0.1.8.2-py3-none-any.whl.
File metadata
- Download URL: pilothub-0.1.8.2-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7c289ef56a8aaf8d5f7c27ff68e72eaa323a2db34332e7d7bf8a83d9f0319cf
|
|
| MD5 |
39a4a99f356477b511145f7ee5927818
|
|
| BLAKE2b-256 |
b2413da56d9a6feee66ca3aaef326368224d1319f51f5df3eae3297f8aae28bf
|