pptxtojson 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,15 +3,15 @@
3
3
 
4
4
  > 与其他的pptx文件解析工具的最大区别在于:
5
5
  > 1. 直接运行在浏览器端;
6
- > 2. 解析结果是**可读**的 JSON 数据,而不仅仅是把 XML 文件内容原样翻译成 JSON。
6
+ > 2. 解析结果是**可读**的 JSON 数据,而不仅仅是把 XML 文件内容原样翻译成难以理解的 JSON。
7
7
 
8
8
  在线DEMO:https://pipipi-pikachu.github.io/pptxtojson/
9
9
 
10
10
  # 🪧 注意事项
11
11
  ### ⚒️ 使用场景
12
- 本仓库诞生于项目 [PPTist](https://github.com/pipipi-pikachu/PPTist) ,希望为其“导入 .pptx 文件功能”提供一个参考示例。不过就目前来说,解析出来的PPT信息与源文件**在样式上**还是存在不少差距,还不足以直接运用到生产环境中。
12
+ 本仓库诞生于项目 [PPTist](https://github.com/pipipi-pikachu/PPTist) ,希望为其“导入 .pptx 文件功能”提供一个参考示例。不过就目前来说,解析出来的PPT信息与源文件在样式上还是存在不少差距,还不足以直接运用到生产环境中。
13
13
 
14
- 不过,如果你只是需要提取PPT文件的文本内容和媒体资源,对排版/样式信息没有特别高的要求,那么 pptxtojson 可能会对你有一些帮助。
14
+ 但如果你只是需要提取PPT文件的文本内容和媒体资源信息,对排版精准度/样式信息没有特别高的要求,那么 pptxtojson 可能会对你有一些帮助。
15
15
 
16
16
  ### 📏 长度值单位
17
17
  输出的JSON中,所有数值长度值单位都为`pt`(point)
@@ -158,7 +158,10 @@ document.querySelector('input').addEventListener('change', evt => {
158
158
  | left | number | 水平坐标
159
159
  | top | number | 垂直坐标
160
160
  | width | number | 宽度
161
- | height | number | 高度
161
+ | height | number | 高度
162
+ | borderColor | string | 边框颜色
163
+ | borderWidth | number | 边框宽度
164
+ | borderType | 'solid' 丨 'dashed' 丨 'dotted' | 边框类型
162
165
  | data | TableCell[][] | 表格数据
163
166
 
164
167
  #### 图表
@@ -222,7 +225,8 @@ document.querySelector('input').addEventListener('change', evt => {
222
225
  [https://github.com/pipipi-pikachu/pptxtojson/blob/master/dist/index.d.ts](https://github.com/pipipi-pikachu/pptxtojson/blob/master/dist/index.d.ts)
223
226
 
224
227
  # 🙏 感谢
225
- > 本仓库主要参考了 [PPTX2HTML](https://github.com/g21589/PPTX2HTML) [PPTXjs](https://github.com/meshesha/PPTXjs) 的实现
228
+ 本仓库大量参考了 [PPTX2HTML](https://github.com/g21589/PPTX2HTML) [PPTXjs](https://github.com/meshesha/PPTXjs) 的实现。
229
+ > 与它们不同的是,PPTX2HTML 和 PPTXjs 是将PPT文件转换为能够运行的 HTML 页面,而 pptxtojson 做的是将PPT文件转换为干净的 JSON 数据
226
230
 
227
231
  # 📄 开源协议
228
232
  MIT License | Copyright © 2020-PRESENT [pipipi-pikachu](https://github.com/pipipi-pikachu)
package/dist/index.d.ts CHANGED
@@ -64,8 +64,8 @@ export interface TableCell {
64
64
  text: string
65
65
  rowSpan?: number
66
66
  colSpan?: number
67
- vMerge?: boolean
68
- hMerge?: boolean
67
+ vMerge?: number
68
+ hMerge?: number
69
69
  fillColor?: string
70
70
  fontColor?: string
71
71
  fontBold?: boolean
@@ -77,6 +77,9 @@ export interface Table {
77
77
  width: number
78
78
  height: number
79
79
  data: TableCell[][]
80
+ borderColor: string
81
+ borderWidth: number
82
+ borderType: 'solid' | 'dashed' | 'dotted'
80
83
  }
81
84
 
82
85
  export type ChartType = 'lineChart' |