Skip to content

Commit 041b671

Browse files
committed
更新talk程序
1 parent fe71cdf commit 041b671

10 files changed

Lines changed: 1445 additions & 0 deletions

File tree

WechatAutoReply/.DS_Store

2 KB
Binary file not shown.

WechatAutoReply/talk2me/.DS_Store

6 KB
Binary file not shown.

WechatAutoReply/talk2me/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

WechatAutoReply/talk2me/LICENSE.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
CC0 1.0 Universal
2+
==================
3+
4+
Statement of Purpose
5+
---------------------
6+
7+
The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").
8+
9+
Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
10+
11+
For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
12+
13+
1. Copyright and Related Rights.
14+
--------------------------------
15+
A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:
16+
17+
i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
18+
ii. moral rights retained by the original author(s) and/or performer(s);
19+
iii. publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
20+
iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;
21+
v. rights protecting the extraction, dissemination, use and reuse of data in a Work;
22+
vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
23+
vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
24+
25+
2. Waiver.
26+
-----------
27+
To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
28+
29+
3. Public License Fallback.
30+
----------------------------
31+
Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.
32+
33+
4. Limitations and Disclaimers.
34+
--------------------------------
35+
36+
a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
37+
b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
38+
c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
39+
d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.

WechatAutoReply/talk2me/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# electron-quick-start
2+
3+
**Clone and run for a quick way to see Electron in action.**
4+
5+
This is a minimal Electron application based on the [Quick Start Guide](https://electronjs.org/docs/tutorial/quick-start) within the Electron documentation.
6+
7+
**Use this app along with the [Electron API Demos](https://electronjs.org/#get-started) app for API code examples to help you get started.**
8+
9+
A basic Electron application needs just these files:
10+
11+
- `package.json` - Points to the app's main file and lists its details and dependencies.
12+
- `main.js` - Starts the app and creates a browser window to render HTML. This is the app's **main process**.
13+
- `index.html` - A web page to render. This is the app's **renderer process**.
14+
15+
You can learn more about each of these components within the [Quick Start Guide](https://electronjs.org/docs/tutorial/quick-start).
16+
17+
## To Use
18+
19+
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:
20+
21+
```bash
22+
# Clone this repository
23+
git clone https://github.com/electron/electron-quick-start
24+
# Go into the repository
25+
cd electron-quick-start
26+
# Install dependencies
27+
npm install
28+
# Run the app
29+
npm start
30+
```
31+
32+
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.
33+
34+
## Resources for Learning Electron
35+
36+
- [electronjs.org/docs](https://electronjs.org/docs) - all of Electron's documentation
37+
- [electronjs.org/community#boilerplates](https://electronjs.org/community#boilerplates) - sample starter apps created by the community
38+
- [electron/electron-quick-start](https://github.com/electron/electron-quick-start) - a very basic starter Electron app
39+
- [electron/simple-samples](https://github.com/electron/simple-samples) - small applications with ideas for taking them further
40+
- [electron/electron-api-demos](https://github.com/electron/electron-api-demos) - an Electron app that teaches you how to use Electron
41+
- [hokein/electron-sample-apps](https://github.com/hokein/electron-sample-apps) - small demo apps for the various Electron APIs
42+
43+
## License
44+
45+
[CC0 1.0 (Public Domain)](LICENSE.md)

WechatAutoReply/talk2me/index.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Hello World!</title>
6+
</head>
7+
<body>
8+
<select id="port">
9+
<option value="6666">6666</option>
10+
<option value="8888">8888</option>
11+
<option value="12345">12345</option>
12+
</select>
13+
<textarea id="textarea"></textarea>
14+
<button id="send">发送</button>
15+
<ul id="messageList"></ul>
16+
<script>
17+
// You can also require other files to run in this process
18+
require('./renderer.js')
19+
</script>
20+
</body>
21+
</html>

WechatAutoReply/talk2me/main.js

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// Modules to control application life and create native browser window
2+
const {app, BrowserWindow} = require('electron')
3+
4+
// Keep a global reference of the window object, if you don't, the window will
5+
// be closed automatically when the JavaScript object is garbage collected.
6+
let mainWindow
7+
8+
function createWindow () {
9+
// Create the browser window.
10+
mainWindow = new BrowserWindow({
11+
width: 800,
12+
height: 600,
13+
webPreferences: {
14+
nodeIntegration: true
15+
}
16+
})
17+
18+
// and load the index.html of the app.
19+
mainWindow.loadFile('index.html')
20+
mainWindow.webContents.openDevTools()
21+
22+
// Open the DevTools.
23+
// mainWindow.webContents.openDevTools()
24+
25+
// Emitted when the window is closed.
26+
mainWindow.on('closed', function () {
27+
// Dereference the window object, usually you would store windows
28+
// in an array if your app supports multi windows, this is the time
29+
// when you should delete the corresponding element.
30+
mainWindow = null
31+
})
32+
}
33+
34+
// This method will be called when Electron has finished
35+
// initialization and is ready to create browser windows.
36+
// Some APIs can only be used after this event occurs.
37+
app.on('ready', createWindow)
38+
39+
// Quit when all windows are closed.
40+
app.on('window-all-closed', function () {
41+
// On macOS it is common for applications and their menu bar
42+
// to stay active until the user quits explicitly with Cmd + Q
43+
if (process.platform !== 'darwin') {
44+
app.quit()
45+
}
46+
})
47+
48+
app.on('activate', function () {
49+
// On macOS it's common to re-create a window in the app when the
50+
// dock icon is clicked and there are no other windows open.
51+
if (mainWindow === null) {
52+
createWindow()
53+
}
54+
})
55+
56+
// In this file you can include the rest of your app's specific main process
57+
// code. You can also put them in separate files and require them here.

0 commit comments

Comments
 (0)