Skip to content
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.

Commit

Permalink
支持分享导出初版(MD)
Browse files Browse the repository at this point in the history
Signed-off-by: lvshuncai <lvshuncai@gmail.com>
  • Loading branch information
ShunCai committed Nov 19, 2020
1 parent ccd17e7 commit 07d3a4b
Show file tree
Hide file tree
Showing 14 changed files with 1,411 additions and 75 deletions.
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@
[![我是往事随风。你好,我是轻舞飞扬。](https://s1.ax1x.com/2020/05/16/YcekPP.gif)](https://v.qq.com/x/page/f08719wqfd0.html)

## 安装
#### 在线安装
- [Chrome浏览器](https://chrome.google.com/webstore/detail/aofadimegphfgllgjblddapiaojbglhf)

- [Microsoft Edge](https://microsoftedge.microsoft.com/addons/detail/djfalpkpjgpkfnkfmnegbalnicdoljcn)

- [360极速浏览器](https://ext.chrome.360.cn/webstore/detail/dboplopmhoafmbcbmcecapkmcodhcegh)

- [360安全浏览器](https://ext.se.360.cn/webstore/detail/dboplopmhoafmbcbmcecapkmcodhcegh)

- 其他Chromium内核浏览器请移步->[离线安装](#离线安装)

#### 在线安装
- [Chrome浏览器](https://chrome.google.com/webstore/detail/aofadimegphfgllgjblddapiaojbglhf)
Expand Down
4 changes: 4 additions & 0 deletions src/export/js/shares.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$(function () {
// 图片懒加载
lazyload();
});
6 changes: 6 additions & 0 deletions src/html/indicator.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ <h6 class="h6" id="backupStatus">正在导出备份,请不要<span style="colo
<p id="Favorites_Tips" style="font-size: medium;"></p>
<p id="Favorites_Export_Tips" style="font-size: medium;"></p>
<p id="Favorites_Export_Other_Tips" style="font-size: medium;"></p>
<p id="Shares_Tips" style="font-size: medium;"></p>
<p id="Shares_Comments_Tips" style="font-size: medium;"></p>
<p id="Shares_Like_Tips" style="font-size: medium;"></p>
<p id="Shares_Visitor_Tips" style="font-size: medium;"></p>
<p id="Shares_Export_Tips" style="font-size: medium;"></p>
<p id="Shares_Export_Other_Tips" style="font-size: medium;"></p>
<p id="Photos_Tips" style="font-size: medium;"></p>
<p id="Photos_Albums_Comments_Tips" style="font-size: medium;"></p>
<p id="Photos_Albums_Like_Tips" style="font-size: medium;"></p>
Expand Down
147 changes: 147 additions & 0 deletions src/html/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<a class="nav-item nav-link" id="nav-boards-tab" data-toggle="tab" href="#nav-boards" role="tab" aria-controls="nav-boards" aria-selected="false">留言板</a>
<a class="nav-item nav-link" id="nav-friends-tab" data-toggle="tab" href="#nav-friends" role="tab" aria-controls="nav-friends" aria-selected="false">好友</a>
<a class="nav-item nav-link" id="nav-favorites-tab" data-toggle="tab" href="#nav-favorites" role="tab" aria-controls="nav-favorites" aria-selected="false">收藏夹</a>
<a class="nav-item nav-link" id="nav-shares-tab" data-toggle="tab" href="#nav-shares" role="tab" aria-controls="nav-shares" aria-selected="false">分享</a>
<a class="nav-item nav-link " id="nav-common-tab" data-toggle="tab" href="#nav-common" role="tab" aria-controls="nav-common" aria-selected="false">公共</a>
</div>
</nav>
Expand Down Expand Up @@ -965,6 +966,152 @@ <h5 style="color:cadetblue">其他选项:</h5>
</div>
</form>
</div>
<div class="tab-pane fade" id="nav-shares" role="tabpanel" aria-labelledby="nav-shares-tab">
<br />
<form id="tb_shares" data-module="Shares">
<h5 style="color:cadetblue">公共选项:</h5>
<hr>
<div class="form-group row">
<label for="shares_exportFormat" class="col-sm-1 col-form-label">备份类型:</label>
<div class="col-sm-2">
<select id="shares_exportFormat" class="custom-select">
<option value="HTML" selected>HTML</option>
<!-- <option value="PDF">PDF</option> -->
<option value="MarkDown">MarkDown</option>
<option value="JSON">JSON</option>
</select>
</div>
<small class="text-muted mt-2">HTML可直接用浏览器打开查看,MD用Markdown编辑器打开,JSON适用于开发者数据迁移</small>
</div>
<div class="form-group row">
<label for="shares_increment_type" class="col-sm-1 col-form-label">增量备份:</label>
<div class="col-sm-2">
<select id="shares_increment_type" class="custom-select increment_type" data-module="Shares" data-time="#shares_increment_time" data-time-row="#shares_increment_time_row">
<option value="Full" selected>全量</option>
<option value="LastTime">上次备份</option>
<option value="Custom">自定义</option>
</select>
</div>
<div>
<button type="button" class="btn btn-outline-danger reset_increment" data-toggle="tooltip" title="清除已备份数据与重置上次备份时间" data-module="Shares">重置</button>
</div>
<small class="text-muted ml-2"><span class="text-danger">内容信息全量备份</span>,如HTML、Markdown、JSON的;<span class="text-danger">文件增量备份</span>,即分享的配图、表情<br><span class="text-danger">增量维度:</span>分享的发表时间,修改/删除分享、新增/删除评论、新增/删除评论回复均不识别!</small>
</div>
<div class="form-group row" id="shares_increment_time_row">
<label for="shares_increment_time_display" class="col-sm-1 col-form-label">增量时间:</label>
<div class="col-sm-2">
<div class="input-group date increment_time" id="shares_increment_time_display" data-target-input="nearest">
<input type="text" id="shares_increment_time" class="form-control datetimepicker-input" data-target="#shares_increment_time_display" />
<div class="input-group-append" data-target="#shares_increment_time_display" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
<small class="text-muted mt-2">备份<span class="text-danger">发表时间大于</span>该时间的分享的文件,<span class="text-danger">请保留上次备份文件内容</span></small>
</div>
<br>
<h5 style="color:cadetblue">分享选项:</h5>
<hr>
<div class="form-group row">
<label class="col-sm-1 col-form-label">列表查询间隔:</label>
<div class="col-sm-1">
<input type="number" min="1" class="form-control" id="shares_list_cost_min" placeholder="最小间隔">
</div>
<div class="col-sm-1">
<input type="number" min="1" class="form-control" id="shares_list_cost_max" placeholder="最大间隔">
</div>
<small class="text-muted mt-2">每页请求间隔秒数,一般保持默认即可,如遇获取失败,可做微调</small>
</div>
<div class="form-group row">
<label for="shares_list_limit" class="col-sm-1 col-form-label">列表每页条数:</label>
<div class="col-sm-2">
<input type="number" min="10" max="100" class="form-control" id="shares_list_limit" placeholder="查询每页条数">
</div>
<small class="text-muted mt-2">请求每页条目数,一般保持默认即可,如遇获取失败,可做微调</small>
</div>
<div class="form-group row">
<label class="col-sm-1 col-form-label">内容查询间隔:</label>
<div class="col-sm-1">
<input type="number" min="1" class="form-control" id="shares_info_cost_min" placeholder="最小间隔">
</div>
<div class="col-sm-1">
<input type="number" min="1" class="form-control" id="shares_info_cost_max" placeholder="最大间隔">
</div>
<small class="text-muted mt-2">分享全文请求间隔秒数,一般保持默认即可,如遇获取失败,可做微调</small>
</div>
<br>
<h5 style="color:cadetblue">评论选项:</h5>
<hr>
<div class="form-group row">
<div class="col-sm-1">获取评论:</div>
<div class="col-sm-2 custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="shares_download_full_comments" data-hidden="true" data-target-link="shares_comment_link">
<label style="margin-left: 14px;" class="custom-control-label" for="shares_download_full_comments" aria-describedby="shares_comments_help"></label>
</div>
<small id="shares_comments_help" class="text-muted">默认不获取评论,勾选获取评论</small>
</div>
<div class="form-group row" data-link="shares_comment_link">
<label class="col-sm-1 col-form-label">查询间隔:</label>
<div class="col-sm-1">
<input type="number" min="1" class="form-control" id="shares_comments_min" placeholder="最小间隔">
</div>
<div class="col-sm-1">
<input type="number" min="1" class="form-control" id="shares_comments_max" placeholder="最大间隔">
</div>
<small class="text-muted mt-2">每页请求间隔秒数,一般保持默认即可,如遇获取失败,可做微调</small>
</div>
<div class="form-group row" data-link="shares_comment_link">
<label for="shares_list_limit" class="col-sm-1 col-form-label">每页条数:</label>
<div class="col-sm-2">
<input type="number" min="10" max="20" class="form-control" id="shares_comments_limit" placeholder="查询每页条数">
</div>
<small class="text-muted mt-2">请求每页条目数,一般保持默认即可,如遇获取失败,可做微调</small>
</div>
<h5 style="color:cadetblue">其他选项:</h5>
<hr>
<div class="form-group row">
<div class="col-sm-1">点赞列表:</div>
<div class="col-sm-2 custom-control custom-checkbox">
<input type="checkbox" name="QZone_Config.Shares.Like.isGet" class="custom-control-input" id="shares_has_like" data-hidden="true" data-target-link="shares_like_link">
<label style="margin-left: 14px;" class="custom-control-label" for="shares_has_like" aria-describedby="shares_like_help"></label>
</div>
<small class="text-muted">默认不获取赞,勾选获取,仅在备份类型为HTML、JSON时备份赞</small>
</div>
<div class="form-group row" data-link="shares_like_link">
<label class="col-sm-1 col-form-label">查询间隔:</label>
<div class="col-sm-1">
<input type="number" min="1" class="form-control" id="shares_like_min" placeholder="最小间隔">
</div>
<div class="col-sm-1">
<input type="number" min="1" class="form-control" id="shares_like_max" placeholder="最大间隔">
</div>
<small class="text-muted mt-2">每页请求的间隔秒数,一般保持默认即可,如遇获取失败,可做微调</small>
</div>
<hr>
<div class="form-group row">
<div class="col-sm-1">最近访问:</div>
<div class="col-sm-2 custom-control custom-checkbox">
<input type="checkbox" name="QZone_Config.Shares.Visitor.isGet" class="custom-control-input" id="shares_has_visitor" data-hidden="true" data-target-link="shares_visitor_link">
<label style="margin-left: 14px;" class="custom-control-label" for="shares_has_visitor" aria-describedby="shares_visitor_help"></label>
</div>
<small class="text-muted">默认不获取最近访问,勾选获取,理论上仅支持获取最近1000条访问记录(开通黄钻情况下),仅在备份类型为HTML、JSON时备份</small>
</div>
<div class="form-group row" data-link="shares_visitor_link">
<label class="col-sm-1 col-form-label">查询间隔:</label>
<div class="col-sm-1">
<input type="number" min="1" class="form-control" id="shares_visitor_min" name="QZone_Config.Shares.Visitor.randomSeconds.min" placeholder="最小间隔">
</div>
<div class="col-sm-1">
<input type="number" min="1" class="form-control" id="shares_visitor_max" name="QZone_Config.Shares.Visitor.randomSeconds.max" placeholder="最大间隔">
</div>
<small class="text-muted mt-2">每页请求的间隔秒数,一般保持默认即可,如遇获取失败,可做微调</small>
</div>
<div class="text-center">
<button class="btn btn-primary submit" data-toggle="tooltip" title="保存所有模块设置项">保存</button>
<button type="button" class="btn btn-secondary reset" data-toggle="tooltip" title="重置当前配置模块设置项">重置</button>
</div>
</form>
</div>
<div class="tab-pane fade" id="nav-common" role="tabpanel" aria-labelledby="nav-common-tab">
<br />
<form id="tb_common" data-module="Common">
Expand Down
4 changes: 4 additions & 0 deletions src/html/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ <h5>QQ空间导出助手</h5>
<input type="checkbox" class="custom-control-input" id="Favorites" name="exportType" value="Favorites" checked>
<label class="custom-control-label" for="Favorites">收藏夹</label>
</div>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="Shares" name="exportType" value="Shares" checked>
<label class="custom-control-label" for="Shares">分享</label>
</div>
<div class="container" style="margin-top: 10px">
<p id="tips" class="text-muted" style="display: none;"></p>
<p id="album_tips" class="text-muted" style="display: none;"></p>
Expand Down
Loading

0 comments on commit 07d3a4b

Please sign in to comment.