Skip to content
This repository has been archived by the owner on Nov 21, 2021. It is now read-only.

Commit

Permalink
Merged release/v1.4 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
wellwind committed Dec 12, 2016
2 parents d3fc745 + 0d6640f commit 2c0eb24
Show file tree
Hide file tree
Showing 1,622 changed files with 108 additions and 381,659 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ jspm_packages
# User should use their own settings file
settings.conf

# Skip pack file
app.asar
app.asar.unpacked
# Skip pack files
8comic-downloader-electron*
app.asar
12 changes: 0 additions & 12 deletions Gruntfile.js

This file was deleted.

11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

使用方式
================
1. 下載8comicdownloader-electron-latest.zip
2. 解壓縮並執行8Comicdownloader.exe
1. https://github.com/wellwind/8ComicDownloaderElectron/releases 下載最新版的程式
2. 解壓縮並執行8comic-downloader-elextron.exe
3.[漫畫目錄]設定漫畫存放的目錄
4. 8Comicdownloader.exe畫面可以選擇分析最後N集漫畫網址,或目前所有集數的網址
5.http://www.comicbus.com/ 找到想要下載的漫畫
Expand All @@ -20,6 +20,10 @@
8. 重複步驟4-7產生所有想下載漫畫的圖片網址
9. 按下[開始下載]按鈕,即可將漫畫下載到電腦中

更新方式
================
目前不支援自動更新,若有新版請下載該版本的app.asar檔案,先關掉下載程式後,將app.asar覆蓋掉原執行程式下的resources\app.asar即可完成更新。

進階功能
================
- 設定檔放在執行檔目錄下的settings.conf,未來改版可備份此設定檔直接使用
Expand All @@ -34,6 +38,9 @@

版本紀錄
================
v1.4 - 2016/12/12
- 改以user的家目錄為設定檔及漫畫預設存放目錄

v1.3.1 - 2016/09/14
- 修正打包檔案時不小心把不必要的log檔打包進去導致檔案龐大的問題

Expand Down
50 changes: 50 additions & 0 deletions archive-packages.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
var package = require("./package.json");
var fs = require('fs');
var archiver = require('archiver');
var async = require('async');

function zipFolder(srcFolder, zipFilePath, callback) {
var output = fs.createWriteStream(zipFilePath);
var zipArchive = archiver('zip');

output.on('close', function() {
callback();
});

zipArchive.pipe(output);

zipArchive.bulk([{
cwd: srcFolder,
src: ['**/*'],
dest: "8ComicDownloader-Electron",
expand: true
}]);

zipArchive.finalize(function(err, bytes) {
if (err) {
callback(err);
}
});
}

var parallelFuncs = {};
var files = fs.readdirSync(".");
files.forEach(function(file) {
if (file.indexOf("8comic-downloader-electron-") === 0 && fs.statSync(file).isDirectory()) {
var zipFile = file + "-v" + package.version + ".zip";
parallelFuncs[zipFile] = function(callback) {
zipFolder("./" + file, zipFile, function(err) {
if (err) {
callback(err, false);
} else {
callback(err, true);
}
});
}
}
}, this);

async.parallel(parallelFuncs, function(err, results) {
console.log("Error: ", err);
console.log("Results: ", results)
});
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ <h3 class="col-xs-12 text-info"><i class="fa fa-fw fa-list"></i> 下載清單</h
</footer>
</div>
<script src="scripts/jquery.scrollintoview.min.js"></script>
<script src="8comicparser.js"></script>
<script src="parsers/8comicparser.js"></script>
<script src="index.js"></script>
</body>

Expand Down
11 changes: 7 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const {remote} = require('electron');
const {Menu, MenuItem, dialog} = remote
const {Menu, MenuItem, app, dialog} = remote
const {
shell,
clipboard
Expand All @@ -9,13 +9,14 @@ var async = require('async');
var http = require('http');
var request = require('request');
var url = require('url');
var os = require('os');
var fs = require('fs');
var path = require('path');
var mkdirp = require('mkdirp');

var appSettings;
var configFilePath = './settings.conf';

var configFilePath = os.homedir() + '/8ComicDownloader/settings.conf';
console.log(configFilePath);
function initPage() {
$("#oneKeyDownload").tooltip();
readAppSettings();
Expand All @@ -26,8 +27,10 @@ function readAppSettings() {
fs.readFile(configFilePath, function(err, data) {
if (err) {
if (err.toString().indexOf('no such file or directory')) {
mkdirp(path.dirname(configFilePath));

var settings = {
'comicFolder': __dirname,
'comicFolder': path.dirname(configFilePath),
'comicList': []
};
data = JSON.stringify(settings);
Expand Down
15 changes: 0 additions & 15 deletions node_modules/.bin/mkdirp

This file was deleted.

7 changes: 0 additions & 7 deletions node_modules/.bin/mkdirp.cmd

This file was deleted.

81 changes: 0 additions & 81 deletions node_modules/async/CHANGELOG.md

This file was deleted.

19 changes: 0 additions & 19 deletions node_modules/async/LICENSE

This file was deleted.

Loading

0 comments on commit 2c0eb24

Please sign in to comment.