Skip to content

Commit

Permalink
Merge pull request #4 from uupers/master
Browse files Browse the repository at this point in the history
pull back from uupers
  • Loading branch information
emptymalei authored Feb 23, 2018
2 parents b46b775 + d9032df commit 7576ef7
Show file tree
Hide file tree
Showing 7 changed files with 1,557 additions and 84 deletions.
47 changes: 12 additions & 35 deletions app/README.md
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
```
69 changes: 69 additions & 0 deletions app/about.html
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>
6 changes: 6 additions & 0 deletions app/assets/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.title {
text-align: center;
}
.text-centered {
text-align: center;
}
41 changes: 33 additions & 8 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,49 @@
<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">
<div class="hero-body">
<section class="hero has-text-centered">
<div class="hero-body has-text-centered">
<div class="container">
<h1 class="title is-1 is-centered">
Bilibili 大蜘蛛
<h1 class="title is-1">
BiliSpider
</h1>
<h2 class="subtitle is-centered">
<!-- BY UUPERS -->
</h2>

<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 is-centered>

<div class="content">

<div class="text-centered">
<button class = "button is-dark is-centered" id = "btn-run">贡献你的计算力</button>
</div>
</div>
</div>
</section>

<section>
Expand All @@ -35,6 +59,7 @@ <h2 class="subtitle is-centered">
</section>



<script src = "./bilicrawler.js" ></script>
<script>
// You can also require other files to run in this process
Expand Down
Loading

0 comments on commit 7576ef7

Please sign in to comment.