structure, layout and automation

This commit is contained in:
Tancre
2020-09-16 14:23:28 +02:00
commit 0efda7fffe
15549 changed files with 1280031 additions and 0 deletions

3
node_modules/openurl/.npmignore generated vendored Normal file
View File

@ -0,0 +1,3 @@
.DS_Store
.idea

29
node_modules/openurl/README.md generated vendored Normal file
View File

@ -0,0 +1,29 @@
openurl Node.js module for opening URLs
=========================================
openurl is a Node.js module for opening a URL via the operating system. This will usually trigger actions such as:
- http URLs: open the default browser
- mailto URLs: open the default email client
- file URLs: open a window showing the directory (on OS X)
Example interaction on the Node.js REPL:
> require("openurl").open("http://rauschma.de")
> require("openurl").open("mailto:john@example.com")
You can generate emails as follows:
require("openurl").mailto(["john@example.com", "jane@example.com"],
{ subject: "Hello!", body: "This is\nan automatically sent email!\n" });
Install via npm:
npm install openurl
Im not yet terribly familiar with implementing npm packages, so any feedback is welcome
(especially experience reports on Windows and Linux, which I cant test on).
Related reading:
- [Write your shell scripts in JavaScript, via Node.js](http://www.2ality.com/2011/12/nodejs-shell-scripting.html)

68
node_modules/openurl/openurl.js generated vendored Normal file
View File

@ -0,0 +1,68 @@
var spawn = require('child_process').spawn;
var command;
switch(process.platform) {
case 'darwin':
command = 'open';
break;
case 'win32':
command = 'explorer.exe';
break;
case 'linux':
command = 'xdg-open';
break;
default:
throw new Error('Unsupported platform: ' + process.platform);
}
/**
* Error handling is deliberately minimal, as this function is to be easy to use for shell scripting
*
* @param url The URL to open
* @param callback A function with a single error argument. Optional.
*/
function open(url, callback) {
var child = spawn(command, [url]);
var errorText = "";
child.stderr.setEncoding('utf8');
child.stderr.on('data', function (data) {
errorText += data;
});
child.stderr.on('end', function () {
if (errorText.length > 0) {
var error = new Error(errorText);
if (callback) {
callback(error);
} else {
throw error;
}
} else if (callback) {
callback(error);
}
});
}
/**
* @param fields Common fields are: "subject", "body".
* Some email apps let you specify arbitrary headers here.
* @param recipientsSeparator Default is ",". Use ";" for Outlook.
*/
function mailto(recipients, fields, recipientsSeparator, callback) {
recipientsSeparator = recipientsSeparator || ",";
var url = "mailto:"+recipients.join(recipientsSeparator);
Object.keys(fields).forEach(function (key, index) {
if (index === 0) {
url += "?";
} else {
url += "&";
}
url += key + "=" + encodeURIComponent(fields[key]);
});
open(url, callback);
}
exports.open = open;
exports.mailto = mailto;

48
node_modules/openurl/package.json generated vendored Normal file
View File

@ -0,0 +1,48 @@
{
"_from": "openurl@1.1.1",
"_id": "openurl@1.1.1",
"_inBundle": false,
"_integrity": "sha1-OHW0sO96UsFW8NtB1GCduw+Us4c=",
"_location": "/openurl",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "openurl@1.1.1",
"name": "openurl",
"escapedName": "openurl",
"rawSpec": "1.1.1",
"saveSpec": null,
"fetchSpec": "1.1.1"
},
"_requiredBy": [
"/localtunnel"
],
"_resolved": "https://registry.npmjs.org/openurl/-/openurl-1.1.1.tgz",
"_shasum": "3875b4b0ef7a52c156f0db41d4609dbb0f94b387",
"_spec": "openurl@1.1.1",
"_where": "/home/outis/Documents/Sites/BBB/node_modules/localtunnel",
"author": {
"name": "Axel Rauschmayer",
"email": "axe@rauschma.de"
},
"bugs": {
"url": "https://github.com/rauschma/openurl/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Open a URL via the operating system (http: in default browser, mailto: in mail client etc.",
"homepage": "https://github.com/rauschma/openurl#readme",
"keywords": [
"desktop",
"browser"
],
"license": "MIT",
"main": "./openurl.js",
"name": "openurl",
"repository": {
"type": "git",
"url": "git+https://github.com/rauschma/openurl.git"
},
"version": "1.1.1"
}