Skip to content

Commit

Permalink
make peony document more detailed
Browse files Browse the repository at this point in the history
  • Loading branch information
brsvh committed Apr 28, 2021
1 parent 8e3fe0c commit b5d1e4f
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 2 deletions.
38 changes: 38 additions & 0 deletions en_US/Implementation of the Peony File Manager preview feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,21 @@ The purpose of this project is to provide support and implementation of file pr
**Optional**

* Qt5, basic
* ECMAScript, basic

## Technical Keywords

**Text Data Parser**, **Audio/Video frame process**, **XML Parser**, **ffmpeg**

## Technical Details

The technical focus of the File Manager preview feature is on the breadth of file type support and preview performance.

The breadth of file type support requires special parsing and processing of some of them due to the large number of file types and different data formats in modern operating systems. For performance issues, since large text and long audio and video are common in file manager scenarios, memory consumption and asynchronous issues need to be taken into account when designing their data parsing.

### Complex format document parsing

For documents like PDF, doc/docx, rtf, we want to implement their preview not as images, but as text data so that their content can be quickly selected and copied. In Peony today, PDFs are previewed by generating images via poppler, and there are many libraries like pdf.js in web browsing services that provide text parsing support for such files. Further, you can consider using the node.js ecosystem combined with Qt WebEngine to further do these tasks.

## Features CheckList

Expand Down Expand Up @@ -90,6 +105,29 @@ The purpose of this project is to provide support and implementation of file pr

## Development Plan

The current implementation of the plugin is divided into several phases.

### Phase 1

One to two weeks, the implementation of the plugin structure, including graphical windows, abstraction of parsing services, etc.

### Phase 2

Parsing and display of basic text files, such as txt, source code, etc.

### Phase 3

Display preview of images, audio.

### Phase 4

Playback of video frames, quick editing of image size and orientation.

### Phase 5

Text parsing of complex documents.


## Contact

* Mentor: [Yue Lan], [Mail to him]
Expand Down
40 changes: 38 additions & 2 deletions zh_CN/Peony 文件管理器预览特性的实现.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,23 @@

**可选**

- Qt5,基础
- Qt5,基础
- ECMAScript,基础

## 技术关键词

**文本数据解析****音视频抽帧****XML 解析****ffmpeg**

## 技术细节

文件管理器预览特性的技术关注点在于文件类型支持广度与预览性能。

对于文件类型支持的广度,由于现代操作系统中文件类型繁多,而且数据格式大相迳庭,需要对其中的一部分作出特殊的解析与处理。对于性能问题,由于文件管理器的使用场景中常见大文本、长时长音视频,在设计它们的数据解析时,需要考虑到内存占用以及异步问题。

### 复杂格式文档解析

对于 PDF、doc/docx、rtf 这类文件,我们希望在实现其预览时并非以解析成图片的形式来进行预览内容的展示,而是将其转成文本数据以便可以快速对它们的内容进行选择和复制。在现在的 Peony 中,预览 PDF 便是通过 poppler 生成图片来进行,在网页浏览服务中,有许多类似 pdf.js 这样的库是提供了这类文件文本解析支持的。进一步的,可以考虑使用 node.js 的现成生态结合 Qt WebEngine 来进一步的做这些工作。


## 特性检查表

Expand Down Expand Up @@ -89,7 +105,27 @@

## 开发计划

待定
目前将该插件的实现划分为了多个阶段:

### 第一阶段

一至两周,插件结构的实现,包含图形窗体、解析服务的抽象等。

### 第二阶段

基础文本文件的解析显示,诸如 txt、源代码等。

### 第三阶段

图片、音频的显示预览。

### 第四阶段

视频的抽帧播放,图片的大小、方向快速编辑实现。

### 第五阶段

复杂文档的文本解析。

## 联系

Expand Down

0 comments on commit b5d1e4f

Please sign in to comment.