Offic自动化工具-自用,在原有包的基础上二次开发, PPT部分暂时告一段落
Project description
PPT
空slide
-
创建空PPT, 支持inches和cm
from automate_office.automate_ppt.MyPPTCreator import PPTCreator my_ppt = PPTCreator(size_params={"unit_type": "inches", "width": 10, "height": 5.625})
-
存储PPT,默认存储在Downloads目录下
my_ppt.save_pptx(filename=None, save_path=None)
-
创建slide
my_slide = my_ppt.create_slide(slide_idx=6)
-
创建文本框
my_ppt.add_textbox( self, cur_slide: slide.Slide, # left top width height, 相对于长宽的比例,0-1之间 rel_coordinate=(0, 0, 1, 1), paragraph_infos=None )
- paragraph_infos: 字体、字号、加粗、斜体、RGB颜色,类似于:("微软雅黑", 12, False, False, (0, 255, 0))
-
创建矩形
my_ppt.add_rectangle_shape
-
创建图片
my_ppt.add_picture
-
创建柱状图
my_ppt.add_bar_chart
-
创建折线图
my_ppt.add_line_chart
-
创建饼图
my_ppt.add_pie_chart
-
创建表格
my_ppt.add_table
-
修改已有PPT的文字
from automate_office.automate_ppt.modify_ppt import set_textframe set_textframe(text_frame, paragraph_infos=None, vertical_anchor = MSO_ANCHOR.MIDDLE)
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
automate_office-0.2.2.tar.gz
(9.5 kB
view hashes)
Built Distribution
Close
Hashes for automate_office-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7523900610f7c0cb349c9ad68ca78d0a53d827df294efb197df25eab02bcdfba |
|
MD5 | 442a5804fc22d11c9691acb479c8b5ee |
|
BLAKE2b-256 | 024785ca5e81cbed7bcb1fd2979a84059fbb8ec64d8dc3782f9eeb2ad269946c |