-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from uupers/master
pull back from uupers
- Loading branch information
Showing
7 changed files
with
1,557 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,22 @@ | ||
# electron-quick-start | ||
# BiliSpider App | ||
|
||
**Clone and run for a quick way to see Electron in action.** | ||
|
||
This is a minimal Electron application based on the [Quick Start Guide](http://electron.atom.io/docs/tutorial/quick-start) within the Electron documentation. | ||
Install `npm` | ||
|
||
**Use this app along with the [Electron API Demos](http://electron.atom.io/#get-started) app for API code examples to help you get started.** | ||
Install dependencies | ||
|
||
A basic Electron application needs just these files: | ||
|
||
- `package.json` - Points to the app's main file and lists its details and dependencies. | ||
- `main.js` - Starts the app and creates a browser window to render HTML. This is the app's **main process**. | ||
- `index.html` - A web page to render. This is the app's **renderer process**. | ||
|
||
You can learn more about each of these components within the [Quick Start Guide](http://electron.atom.io/docs/tutorial/quick-start). | ||
|
||
## To Use | ||
|
||
To clone and run this repository you'll need [Git](https://git-scm.com) and [Node.js](https://nodejs.org/en/download/) (which comes with [npm](http://npmjs.com)) installed on your computer. From your command line: | ||
|
||
```bash | ||
# Clone this repository | ||
git clone https://github.com/electron/electron-quick-start | ||
# Go into the repository | ||
cd electron-quick-start | ||
# Install dependencies | ||
``` | ||
npm install | ||
# Run the app | ||
npm start | ||
``` | ||
|
||
Note: If you're using Linux Bash for Windows, [see this guide](https://www.howtogeek.com/261575/how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/) or use `node` from the command prompt. | ||
|
||
## Resources for Learning Electron | ||
Run test | ||
|
||
- [electron.atom.io/docs](http://electron.atom.io/docs) - all of Electron's documentation | ||
- [electron.atom.io/community/#boilerplates](http://electron.atom.io/community/#boilerplates) - sample starter apps created by the community | ||
- [electron/electron-quick-start](https://github.com/electron/electron-quick-start) - a very basic starter Electron app | ||
- [electron/simple-samples](https://github.com/electron/simple-samples) - small applications with ideas for taking them further | ||
- [electron/electron-api-demos](https://github.com/electron/electron-api-demos) - an Electron app that teaches you how to use Electron | ||
- [hokein/electron-sample-apps](https://github.com/hokein/electron-sample-apps) - small demo apps for the various Electron APIs | ||
``` | ||
npm start | ||
``` | ||
|
||
## License | ||
Build your own version of the app | ||
|
||
[CC0 1.0 (Public Domain)](LICENSE.md) | ||
``` | ||
npm run dist | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>BiliSpider</title> | ||
<link rel="stylesheet" href="assets/css/bulma.css"> | ||
<link rel="stylesheet" href="assets/css/style.css"> | ||
<script> | ||
var shell = require('electron').shell; | ||
//open links externally by default | ||
$(document).on('click', 'a[href^="http"]', function(event) { | ||
event.preventDefault(); | ||
shell.openExternal(this.href); | ||
}); | ||
</script> | ||
</head> | ||
|
||
<body> | ||
|
||
<section class="hero has-text-centered"> | ||
<div class="hero-body has-text-centered"> | ||
<div class="container"> | ||
<h1 class="title is-1"> | ||
BiliSpider | ||
</h1> | ||
|
||
<div class="notification text-centered" style="margin-bottom:2em;"> | ||
<p style="margin-bottom:2em;"> | ||
一个用来获取 Bilibili 用户数据的爬虫 | ||
</p> | ||
<pre style="min-height:1.25em;line-height: 1;" type="text" readonly>https://github.com/uupers/uupers.github.io</pre> | ||
|
||
|
||
|
||
</div> | ||
|
||
|
||
<!-- BY UUPERS --> | ||
|
||
|
||
</div> | ||
|
||
<div class="content"> | ||
|
||
<div class="text-centered"> | ||
<button class = "button is-dark is-centered" id = "btn-run">贡献你的计算力</button> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
<section> | ||
<div> | ||
<pre id="log-process"> | ||
LOG: <br> | ||
</pre> | ||
</div> | ||
</section> | ||
|
||
|
||
|
||
<script src = "./bilicrawler.js" ></script> | ||
<script> | ||
// You can also require other files to run in this process | ||
require('./renderer.js') | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.title { | ||
text-align: center; | ||
} | ||
.text-centered { | ||
text-align: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.