created configuration and base code

This commit is contained in:
2020-05-01 19:34:55 +02:00
parent 00ef3d83a3
commit 8084640f26
6 changed files with 168 additions and 2 deletions

View File

@@ -1,3 +1,34 @@
# daskeyboard-applet--imap # Q alerts for IMAP
A simple mail-checking applet for the daskeyboard Q-Applets. Unlike the applet that comes with dasKeyboard, this one is an app directed at any IMAP mail account and not limited to a single mail provider such as gmail. Notifies of new unread email messages on selected keys.
## Changelog
[CHANGELOG.MD](CHANGELOG.md)
## Istallation
Requires a Das Keyboard Q series: www.daskeyboard.com
Installation, configuration and uninstallation of applets is done within
the Q Desktop application (<https://www.daskeyboard.com/q>)
## Running tests
- `yarn test`
## Contributions
Pull requests welcome.
## Copyright / License
Licensed under the GNU General Public License 2.0 (or later);
you may not use this work except in compliance with the License.
You may obtain a copy of the License in the LICENSE file, or at:
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

7
README_END_USER.md Normal file
View File

@@ -0,0 +1,7 @@
# Q alerts for IMAP mail
Notifies of new Q alerts for IMAP mail messages on selected keys.
![Q alerts for IMAP applect on a Das Keyboard Q](assets/image.png "Das Keyboard Q alerts for IMAP
applet"

BIN
asssets/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
asssets/image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

22
index.js Normal file
View File

@@ -0,0 +1,22 @@
const q = require('daskeyboard-applet');
const Imap = require('imap');
const logger = q.logger;
function getTimestamp() {
return Math.round(new Date().getTime() / 1000);
}
class ImapAlerts extends q.DesktopApp {
constructor() {
super();
this.pollingInterval = 60000;
this.timestamp = getTimestamp();
logger.info("Waiting for new mail to arrive");
}
async run() {
logger.info("Imap running");
}
}

106
package.json Normal file
View File

@@ -0,0 +1,106 @@
{
"name": "daskeyboard-applet--imap",
"publisher": "Jali <jali@orca-central.de>",
"displayName": "Q alerts for IMAP mail",
"version": "0.1.20121.1",
"description": "Notifies when new unread mail arrives in the inbox",
"longDescription": "Get email alerts directly on a Das Keyboard Q device. Requires an IMAP capable email account.",
"icon": "assets/icon.png",
"developmentRepoUrl": "https://git.orca-central.de/jali/daskeyboard-applet--imap",
"officialProductName": "Q alerts for IMAP",
"image": "assets/image.png",
"authorName": "Jali",
"authorUrl": "https://twitter.com/ccc_jali",
"issuesUrl": "https://git.orca-central.de/jali/daskeyboard-applet--imap/issues",
"homePageUrl": "https://git.orca-central.de/jali/daskeyboard-applet--imap",
"licenseUrl": "http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt",
"readmeUrl": "README.md",
"readMeEndUserUrl": "README_END_USER.md",
"changelogUrl": "CHANGELOG.md",
"engines": {
"das-keyboard-q": "3.1.0"
},
"main": "index.js",
"scripts": {
"test": "mocha"
},
"author": "Jali",
"license": "MIT",
"dependencies": {
"daskeyboard-applet": "2.11.3",
"imap": ">=0.8.19"
},
"isSingleton": false,
"qconfig": {
"geometry": {
"width": 1,
"height": 1,
"defaults": {
"origin": {
"x": 0,
"y": 1
}
}
},
"authorization": {
"type": "oauth2"
},
"questions": [{
"key": "server",
"label": "Enter the servername",
"help": "Enter the name of your IMAP server",
"placeholder": "imap.server.com",
"required": true,
"order": 1,
"controlType": "textbox"
},
{
"key": "imaps",
"label": "Use encryption",
"help": "Check, if your server uses encryption",
"order": 2,
"controlType": "checkbox"
},
{
"key": "port",
"label": "Port number",
"help": "The TCP port to connect to",
"placeholder": "993",
"required": true,
"order": 3,
"controlType": "textbox"
},
{
"key": "username",
"label": "User name",
"help": "The name you login to you account with",
"placeholder": "Your name",
"required": true,
"order": 4,
"controlType": "textbox"
},
{
"key": "password",
"label": "Password",
"help": "Your account password",
"placeholder": "Password",
"required": true,
"order": 5,
"controlType": "textbox"
}]
},
"devDependencies": {
"mocha": "^5.2.0"
},
"directories": {
"test": "test"
},
"repository": {
"type": "git",
"url": "git+https://git.orca-central.de/jali/daskeyboard-applet--imap.git"
},
"keywords": [],
"bugs": {
"url": "https://git.orca-central.de/jali/daskeyboard-applet--imap/issues"
}
}