Saravanan666/pypi-org huggingface dataset:
Package: pptshape
pptshapePptshape extracts shapes from ppt file and embeds to the sphinx document as png file.pptshape adds new directive as follow... ppt-shape:: abc.png
   :pptfilename: testppt.pptx
   :shapename: shape-titleFirst line of the directive specifies filename of image file to be generated.:pptfilename:specifies
name of PowerPoint presentaion.:shapename:specifies name of shape you specified(see Usage).When you build sphinx project on Windows box with PowerPoint installed, pptshape opens ppt file
and create png file if ppt file is newer than image files.If the project is build on PC PowerPoint is not installed or non-Windows box, ppt-shape directive
behave just like as standard image directive.The ppt-shape directive is derived from standard image directive, so you can use directives such as:height:or:alt:image directive has.UsageInstallpywin32package to your Windows box.Create new presentation(.ppt) and draw shape.Select the shape you wrote and display format tab. Specify shape of name the shape at ‘title’ field.Save presentation file.Inconf.pyfile of your Sphinx project, add following configuration.extensions=['pptshape.directive']Add following lines in your .rst files... ppt-shape:: abc.png
   :pptfilename: testppt.pptx
   :shapename: shape-titleabc.pngis a name of png file to be created.:pptfilename:specifies name of PowerPoint presentaion.:shapename:specifies name of shape you specified at step 3.Build sphinx project.Special shape nameShapename in the pptshape directive starts with#specifies
position in the PowerPoint presentation rather than title of the shape.#m.nrepesentsnth shape in themth slide.#nrepresentsnth shape through entire the ppt presentation.Bothnandmshould be digit indexes pages and shapes from 1 and up.
For example,#1is for first shape of the document,
and#2.1is for first shape in the second slide.This way is usefull for the document which cannot be modified to add
shape title, or for old power point (2007 or before) which does not
support shape title.RequirementsPython 2.7/3.3 or laterpywin32 to generate png file.CopyrightCopyright (c) 2013, 2014 Atsuo IshimotoPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Package: pptx2video
pptx2videoTransform PowerPoint presentations to videos with voiceovers.The voiceover text is generated from the "Notes" section of each PowerPoint slide.Requirements[!IMPORTANT]
You must have anOpenAI API key.Install LibreOffice and FFmpeg:LibreOffice: Download and install fromLibreOffice Download.FFmpeg: Download and install fromFFmpeg Download.Clone the repository:git clone https://github.com/drengskapur/pptx2video.gitInstall requirements with pip:pip install -r requirements.txtConfigurationPut the PowerPoint in the repository folder and set theparams.yml:params.yml# INPUT POWERPOINT
POWERPOINT: "your_presentation.pptx"
# OUTPUT VIDEO
VIDEO_NAME: "your_video_output.mp4"UsageTo start the pipeline, enter the command:dvc repro
Package: pptx-builder-from-yaml
pptx-builder-from-yamlCLI to generate powerpoint slides from simple yaml file[s]pptx-builder-from-yamlDependencies to run the CLIHow to install?How does a yaml file look like for generating pptx?How to use the CLI?How to generate pptx[s]?How to validate a yaml and then generate the PPTX?FAQsHow can I add same footer to all pptx[s] built using the CLI?How to get different backgrounds for the generated pptx files using the CLI?How to setup development environment?How to run tests?Dependencies to run the CLI>= python3.4python modulesclick==7.0.0python-pptx==0.6.16PyYAML==3.13How to install?https://pypi.org/project/pptx-builder-from-yaml/pipinstallpptx-builder-from-yamlHow does a yaml file look like for generating pptx?Here is a sample yaml file -Dummy.ymlHow to use the CLI?$pptx-builder--help
Usage:pptx-builder[OPTIONS]YAML_PATHS...Apowerpointbuilderhttps://github.com/sukujgrg/pptx-builder-from-yaml

Options:-pt,--pptx-template-pathPATH[required]-ms,--master-slide-idxINTEGER[default:0]-sl,--slide-layout-idxINTEGER[default:6]-fs,--font-sizeINTEGER[default:32]-fn,--font-nameTEXT[default:Calibri]-ns,--dst-dirTEXT[default:./generated-pptx]-ta,--slide-txt-alignment[left|middle|right][default:left]--validateRunyamlvalidationagainstschema--versionShowtheversionandexit.--helpShowthismessageandexit.How to generate pptx[s]?pptx-builderslide_yamls/-ptpptx-templates/default.pptxNotes:slide_yamls/is the directory that holdsyamlfiles for slides. Theyaml[s] must
follow the schema defined in the code.Hereis an
exampleyamlfile.slide_yamlsare positional arguments and can accept files and
directories. If a positional argument is a directory, it will try to build individualpptxwith eachyamlfiles in the same directory.--pptx-template-path | -ptis expecting either a directory or a pptx file. If it is a
directory,pptx-builderwill chose one among all the pptx files found in the same directory.
The pptx template file should be without any change to master slide index or in slide
layout index. If there are any changes to master slide index or slide layout, you need to
pass correspondinginttype to-msand-sloptions.
A sample pptx template file can seen herepptx-templates.The default--new-slide-pathistmpdirectory and hence it depends on the operating
system you run thepptx-builderon.How to validate a yaml and then generate the PPTX?pptx-builderslide_yamls/dummy.yml-dmmaster_slides/default.pptx--validateFAQsHow can I add same footer to all pptx[s] built using the CLI?Add footer to pptx template file to pass with--pptx-template-pathoptionHow to get different backgrounds for the generated pptx files using the CLI?Create different pptx template files with different backgrounds and pass it on to--pptx-template-pathoption. Seethisvideo on
creating pptx template file.How to setup development environment?gitclonehttps://github.com/sukujgrg/pptx-builder-from-yaml.gitcdpptx-builder-from-yaml

pipenvinstall--dev

pipenvshell

pipenvgraphHow to run tests?cdpptx-builder-from-yaml/

tox.
Package: pptxer
PPTXER: A fast high-level Presentations Scraper for Python and Command LineThis project is made to make it as easy as possible to scrape presentations (pptx files) from the internet and extract their text (body and notes). It can be used in Python or command line.InstallationpipinstallpptxerVerify installation by runningpptxer--versionDownloaderThis mode scrapes presentations  that contains a specific keywords from search engines, and downloads them to a directory. The texts within these files will be extracted automatically unless otherwise specified.To download pptx files that contain "COVID-19 Safety" and "Contagious diseases" to directorytest_dirPythonfrom pptxer.presentations_downloader import scrape_presentations_to_dir

search_keywords = ["COVID-19 Safety", "Contagious diseases"]
# If download_dir_path is skipped, then a directory with search keywords splitted by "_" will be created
paths_to_files = scrape_presentations_to_dir(search_keywords, download_dir_path="test_dir")
# For this example, a directory with name "test_dir" will be created, and files will be written to itCommand line# This will download presentations to test_dir and extract their texts to a json filepptxerdownload"COVID-19 Safety""Contagious diseases"--dsttest_dir# To only downloadpptxerdownload"COVID-19 Safety""Contagious diseases"--dsttest_dir--no-extract-textExtractorThis mode extracts texts from pptx files and outputs a dict with each slide body and note texts. If command line is used then a json file will be outputted.To extract text from presentation files (pptx) or loop through presentation files within a directoryPython# Single filetexts=extract_presentations_texts(["directory/test.pptx"])# Directory. Will scan the directory for pptx file, extract their texts and return themtexts=extract_presentations_texts(["directory/"])# Combined file and directorytexts=extract_presentations_texts(["directory/","directory2/test.pptx"])Command line# Single filepptxerextractdirectory/test.pptx# Directorypptxerextractdirectory/# File and directorypptxerextractdirectory1directory2/test.pptxThe output will be similar to the following:[{
'path': 'test.pptx', 
'slides': [
            {'noteText': 'Note Line 1\nNote Line 2', 'bodyText': 'Label Test 1Body Line 1\nBody Line 2'}, 
            {'noteText': 'Note Line 1\nNote Line2', 'bodyText': ''}], 
            'bodyTextLengthStats': {'totalLength': 35, 'avgLength': 17.5, 'minLength': 0, 'maxLength': 35, 'medianLength': 17.5}, 
            'noteTextLengthStats': {'totalLength': 45, 'avgLength': 22.5, 'minLength': 22, 'maxLength': 23, 'medianLength': 22.5}
}]Rate LimitAs of now, we're using third-party search engines to look up files, and almost all search engines throttle or soft ban if they detected automated queries coming from your IP. The soft ban usually lasts about a day, and you will not be able to usepptxerin meanwhile, but you can use any search engines on your browser normally.IssuesFeel free to open an issue if you have any problems.
Package: pptx-renderer
PPTX RendererThis package let's you run your powerpoint presentations like a jupyter-notebook.
You can insert placeholders in the ppt and also write python code in the ppt's
notes and use either a python function or an equivalent commandline tool to
convert it into an output rendered presentation.Installationpip install pptx-rendererUsageBelow is a simple example.frompptx_rendererimportPPTXRendererp=PPTXRenderer("template.pptx")someval="hello"defmymethod(abc):returnf"{abc}"*5myimage=r"is_it_worth_the_time.png"mytable=[["a","b","c","d","e"]]*10p.render("output.pptx",{"someval":someval,"mymethod":mymethod,"myimage":myimage,"mytable":mytable,})This will convert thisto this.You can define some functions within the ppt itself by writing python code in
the notes section of slides. And the variables and functions in this code
can be used in the main ppt.For example: write the following in one of the slide's notes.```python
def myfunc(input):
    return input * 42
```Now you can, for example, add the placeholder{{{myfunc(42)}}}in your slides.If the template ppt is a self contained python script ie: if it does not require
variable values and function definition to be passed from outside, you can
generate the output ppt directly from the commandline using the following
command.pptx-renderer input_template.pptx output_file.pptxPlaceholdersYou can have placeholders for text, image or a table. Placeholders can be added
inside text boxes and shapes. All placeholders should be enclosed within a pair
of triple braces ({{{and}}}).TextAny placeholder which can be evaluated into a string can act as a text placeholder.For example:{{{"hello " * 10/2}}}or{{{abs(-2)}}}Imageif you have added:image()as a suffix to the python statement, the renderer will
try to convert the value of python statement to a file location and insert an
image from that file location.For example:{{{"c:\temp\myimage.png":image()}}}TableTables are similar to images, but only that instead of a string, the python
statement should evaluate to a list of lists. Then you can add:table()as a
suffix and it will be convert to a table inside the ppt.For example:{{{[["col1", "col2", "col3"],[1, 2, 3]]:table()}}}will render tocol1col2col3123Code in slide notesYou can write regular python code in the slide notes but enclosed between```pythonand```.For example: Create a new pptx and write the following in the first slide's notes```python
import numpy as np
myarr = np.array([[1, 2], [3, 4]])
```And in the slide, create a rectangluar shape and add the text{{{myarr:table()}}}and a text box with the textThe determinant of the array is {{{np.linalg.det(myarr)}}}
Package: pptx-replace
pptx-replaceA python package for replaceing text, images and tables in pptx filesimportpptximportpptx_replaceprs=Presentation("tests/templates/test_template.pptx")replace_text(prs,"{Main title}","this is main report title")slide=prs.slides[1]replace_text(slide,"{title}","This is a title")replace_picture(prs.slides[0],"image.png",auto_reshape=True)installationpipinstallpptx-replaceIf you want to putaltairpicture into pptx file, you need install some extra packages.pipinstall"pptx-replace[alt]"see:https://github.com/altair-viz/altair_saverextra dependencyDepends on your usage, if you want to export table and keep style in jupyter,selemiumand browser driver is required.see:https://github.com/dexplo/dataframe_image/usageFirst open your pptx file.importpptximportpptx_replaceprs=Presentation("tests/templates/test_template.pptx")replace textReplace any text in your ppt# repalce all occurances of {Main title} in pptxreplace_text(prs,"{Main title}","this is main report title")slide=prs.slides[1]# replace in just one slidereplace_text(slide,"{title}","This is a title")replace_text(slide,"{content}","a quick brown fox jumps over the lazy dog\n"*5)replace pictureReplace picture just by matplotlib figuer!importmatplotlib.pyplotaspltplt.plot([1,2,3,4])fig=plt.gcf()replace_picture(prs.slides[1],fig,auto_reshape=False,order="l2r")replace tablereplace table by pandas dataframeimportpandasaspdimportnumpyasnpdf=pd.DataFrame(np.random.rand(6,10))replace_table(slide,df)
Package: pptx-template
pptx-template .. image::https://travis-ci.org/m3dev/pptx-template.svg?branch=mastertarget:https://travis-ci.org/m3dev/pptx-templatepptx-template is a PowerPoint presentation builder.This helps your routine reporting work that have many manual copy-paste from excel chart to powerpoint, or so.Building a new powerpoint presentation file from a “template” pptx file which contains “id”Import some strings and CSV data which is defined in a JSON config file or a Python dict“id” in pptx template is expressed as a tiny DSL, like “{sales.0.june.us}”requires python envirionment (2 or 3), pandas, python-pptxfor now, only UTF-8 encoding is supported for json, csvFor further information, please visit GitHub:https://github.com/m3dev/pptx-templatechangelogs2017.07.18Added “xlsx-mode”Fixed many small bugs
Package: pptx-template-fork
pptx-templatepptx-template is a PowerPoint presentation builder.This helps your routine reporting work that have many manual copy-paste from excel chart to powerpoint, or so.Building a new powerpoint presentation file from a “template” pptx file which contains “id”Import some strings and CSV data which is defined in a JSON config file or a Python dict“id” in pptx template is expressed as a tiny DSL, like “{sales.0.june.us}”requires python envirionment (2 or 3), pandas, python-pptxfor now, only UTF-8 encoding is supported for json, csvFor further information, please visit GitHub:https://github.com/skar404/pptx-templatechangelogs2017.07.18Added “xlsx-mode”Fixed many small bugs
Package: pptx-template-simple
pptx-templateGetting startedThe goal of this fork is to provide a PyPI package that you can use in your
python project by calling thepptx_template.render.render_pptxfunction.Some features provided by the originals projects
(https://github.com/skar404/pptx-templateandhttps://github.com/m3dev/pptx-template)
may not work properly.Installpip3 install pptx_template_simpleIn this fork, you can render a template like this:frompptx_templateimportrenderinput_path='test/data5/in.pptx'model={"greeting":"Hello!","client_name":"M. Melpanque"}output_path='test/data5/out.pptx'render.render_pptx(input_path,model,output_path)DevelopmentTest manualy the package:python3 main.pyInstall dependencies:sudo apt-get -y install python3-setuptools
pip3 install wheel
pip3 install twineBuild the package:python3 setup.py bdist_wheelInstall the local build package:pip3 install dist/pptx_template_simple-0.2.8-py3-none-any.whlUpload to test pypi:twine upload --repository testpypi dist/*Then test your package by installing the test pypi package:pip3 install --index-url https://test.pypi.org/simple/ --no-deps pptx_template_simpleWhen you are ready, upload the package in the main pypi repository:twine upload dist/*TestsInstall dependencies:pip3 install pytestRun tests:pytestTODOSubstitute imagesUse Jinja template syntaxOverviewpptx-template is a PowerPoint presentation builder.This helps your routine reporting work that have many manual copy-paste from excel chart to powerpoint, or so.Building a new powerpoint presentation file from a "template" pptx file which contains "id"Import some strings and CSV data which is defined in a JSON config file or a Python dict"id" in pptx template is expressed as a tiny DSL, like "{sales.0.june.us}"requires python envirionment (2 or 3), pandas, python-pptxfor now, only UTF-8 encoding is supported for json, csvText substitution!CSV Import!Japanese translationpptx-template は pptx のテンプレートを元に、別途用意した JSON 中の文字列や CSV データを差し込んだ pptx を生成するツールです。定型レポートなどで大量のグラフ付きスライドを作成する際の作業を代行してくれます。テンプレートには "{sales.0.june.us}" のような形で JSON内の値を指す id を記入できますpython 2 または 3, pandas, pptx に依存しています扱う json や csv の 文字コードは utf-8 前提です
Package: pptx-tools
pptx-toolsInstallSuport only python3.pip install pptx-toolsQuick ExampleCreate Google Application Credentials files and setexport GOOGLE_APPLICATION_CREDENTIALS=/PATH/TO/JSONAfter that,slide-add-voice <PATH-TO-YOUR-AWESOME-SLIDE>You can change the synthesized voice by specifying the--voice-nameas shown below.slide-add-voice pptx_tools/data/hello.pptx --voice-name en-US-Wavenet-CIn addition, you can listen to the voice samples available for use with Google Text-to-Speech at the following URL:https://cloud.google.com/text-to-speech/docs/voicesSlide Video Formatter CommandTheslide-video-formattercommand is a utility program allowing users to format videos within PowerPoint presentations by specifying thevcodecandcrf.slide-video-formatter <YOUR-AWESOME-SLIDE> --out /tmp/tmp.pptx --vcodec libx264 --crf 28Q & AQ: What happens to the slide transition time when both a video file and a synthesized voice are present on the slide?A: The transition time for the slide will be based on whichever is longer between the duration of the synthesized voice and the duration of the video.
Package: pptxtopdf
PowerPoint to PDF ConverterThis is a Python script that converts PowerPoint files (.ppt, .pptx) to PDF format. It uses the comtypes library to interact with Microsoft PowerPoint.PrerequisitesPython 3.6 or aboveDependanciescomtypes libraryUsageRun the script with the following arguments i.e pptxtopdf --input_dir "C:\Users\Example\Downloads\input":--input_file: Path to the folder containing the PowerPoint files to convert.--input_dir: Path to the folder containing the PowerPoint files to convert.--output_dir: [Optional] Path to the folder where the converted PDF files will be saved. If not provided, it defaults to the same directory as the input file or directory.Example from command linepptxtopdf--input_dir./input--output_dir./outputThis command will convert all the PowerPoint files in the./inputfolder and save the converted PDF files in the./outputfolder.Example in scriptfrompptxtopdfimportconvertinput_dir=r"C:\Users\Example\ExampleDirectory"output_dir=r"C:\Users\Example\ExampleDirectory"convert(input_dir,output_dir)FunctionalityThe script performs the following steps:Validates the input folder path and checks if it exists.Creates the output folder if it does not already exist.Lists all the files in the input folder.Iterates over each file and checks if it has a PowerPoint extension.Creates a PowerPoint application object using comtypes.Opens the PowerPoint slides.Retrieves the base file name.Constructs the output file path with the PDF extension.Checks if the output file already exists and skips the conversion if it does.Saves the slides as a PDF file.Closes the slide deck.Quits PowerPoint.Keeps track of the successful conversions and errors.Prints a summary of the conversion process at the end.Note: The script runs without a user interface (WithWindow=False) to perform the conversions silently.Error HandlingIf any error occurs during the conversion process, the script will catch the exception and print an error message specifying the file that caused the error.LicenseThis script is released under the MIT License. Feel free to modify and use it according to your needs.
Package: ppu
Portable Python Utilities.Author: Oleg Broytman <phd@phdru.name>.Copyright (C) 2017-2021 PhiloSoft Design.License: GPL.cmp.py - compare two files.remove-old-files.py - remove old files. It’s a portable replacement forfind start_dir -type f -mtime +31 -delete.rm.py - remove files and directories.which.py - find a program in PATH and print full path to it.Home Page:https://phdru.name/Software/Python/ppu/Documentation:https://phdru.name/Software/Python/ppu/docs/Git repo:https://git.phdru.name/ppu.git/GitHub repo:https://github.com/phdru/ppuIssue tracker:https://github.com/phdru/ppu/issuesPyPI:https://pypi.org/project/ppu/pip install ppu
Package: ppulp
ppulpP(retty)PuLP is an extension of PuLP, linear programming problem modeling tool.You can use the basic features of pulp plus the following useful extensions to make modeling simpler.InstallPyPIpip install ppulpGitHubgit clone https://github.com/nariaki3551/ppulp.gitFeaturesVariable productIf-then constraintsAbsolute valuesPiecewise linear approximation of nonlinear functionsLogical operations (And, Or, Xor)Reduction (Sum, Prod)ExamplesVariables productions# from pulp import *fromppulpimport*# create variablesx=LpVariable("x",cat="Binary")y=LpVariable("y",cat="Binary")# create variable productionz=x*yIf-then constriantfromppulpimport*x=LpVariable("x",lowBound=-1)y=LpVariable("y",lowBound=-1)prob=LpProblem(sense="Minimize")# add if-then constraintsprob+=(x<=0)>>(y>=0)# if (x <= 0) then (y >= 0)prob+=(y<=0)>>(x>=0)# if (y <= 0) then (x >= 0)Absolution valuex=LpVariable("x")y=LpVariable("y")Abs(x+y)Approximation of nonlinear functionsfromppulpimport*importmathx=LpVariable("x",lowBound=3)y=LpVariable("y",lowBound=4)# create non-linear functionf=PiecewiseLinear(math.log,xl=7,xu=100,num=3)prob=LpProblem()prob+=f(x+y)prob+=f(x)>=10Reductionfromppulpimport*x=[LpVariable(name=f"x{i}",ini_value=2)foriinrange(5)]# summationlpSum(x)# productionlpProd(x)
Package: pp-up
pp-upOverviewScript to update your dependencies by checking if there are new versions
available on pypi.This script parses your requirements.txt and setup.py files, and updates any
pinned version you may have to the latest version available on pypi.When you have a version pinned for a specific reason add# pp_up: pinto the line you want
to pin, this only works on requirements files example:pp_up==0.0.1 # pp_up: pinThe files are backupped before modification.Usagecd$YOUR_PROJECT_DIRpython-mpp_up