diff --git a/README.md b/README.md index 378729a..6653d68 100644 --- a/README.md +++ b/README.md @@ -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. \ No newline at end of file +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 () + +## 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: + +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. diff --git a/README_END_USER.md b/README_END_USER.md new file mode 100644 index 0000000..07e1425 --- /dev/null +++ b/README_END_USER.md @@ -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" + diff --git a/asssets/icon.png b/asssets/icon.png new file mode 100644 index 0000000..a8fb51d Binary files /dev/null and b/asssets/icon.png differ diff --git a/asssets/image.png b/asssets/image.png new file mode 100644 index 0000000..2f170fb Binary files /dev/null and b/asssets/image.png differ diff --git a/index.js b/index.js new file mode 100644 index 0000000..d02e224 --- /dev/null +++ b/index.js @@ -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"); + + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..f598319 --- /dev/null +++ b/package.json @@ -0,0 +1,106 @@ +{ + "name": "daskeyboard-applet--imap", + "publisher": "Jali ", + "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" + } +}