first commit

This commit is contained in:
s.golasch
2023-08-01 13:49:46 +02:00
commit 1fc239fd54
20238 changed files with 3112246 additions and 0 deletions

16
build/node_modules/rss/.editorconfig generated vendored Normal file
View File

@@ -0,0 +1,16 @@
# Get the plugin for your editor and your
# tab settings will be set automatically.
# http://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with no newline ending every file
[*]
end_of_line = lf
insert_final_newline = false
# Indentation override for all JS under lib directory
[*.js]
indent_style = space
indent_size = 4

13
build/node_modules/rss/.jshintrc generated vendored Normal file
View File

@@ -0,0 +1,13 @@
{
"curly": true,
"eqeqeq": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"sub": true,
"undef": true,
"boss": true,
"eqnull": true,
"node": true
}

4
build/node_modules/rss/.npmignore generated vendored Normal file
View File

@@ -0,0 +1,4 @@
/test/
/.idea/
/templates/
*.log

13
build/node_modules/rss/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,13 @@
language: node_js
sudo: false
matrix:
include:
- node_js: '0.10'
before_install: npm -g i npm@2
- node_js: '0.12'
before_install: npm -g i npm@2
- node_js: '4'
before_install: npm -g i npm@2
- node_js: '4'
before_install: npm -g i npm@3

51
build/node_modules/rss/Gruntfile.js generated vendored Normal file
View File

@@ -0,0 +1,51 @@
'use strict';
module.exports = function(grunt) {
/**
* grunt release or grunt release:patch increment the patch number
* grunt release:minor increments the minor version number
* grunt release:major increments the major version number
*
* grunt readme to generate the readme (you might need to do grunt repos first)
*/
require('time-grunt')(grunt);
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc'
},
all: [
'Gruntfile.js',
'lib/**/*.js',
'test/**/*.js'
]
},
release: {
github: {
repo: 'dylang/node-rss',
accessTokenVar: 'GITHUB_ACCESS_TOKEN'
}
}
});
require('load-grunt-tasks')(grunt);
grunt.registerTask('lint', [
'jshint'
]);
grunt.registerTask('default', [
'lint'
]);
grunt.registerTask('pre-publish', [
'lint',
'repos',
'readme'
]);
};

22
build/node_modules/rss/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
(The MIT License)
Copyright (c) 2011-2017 Dylan Greene <dylang@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

189
build/node_modules/rss/lib/index.js generated vendored Executable file
View File

@@ -0,0 +1,189 @@
'use strict';
var mime = require('mime-types');
var xml = require('xml');
var fs = require('fs');
function ifTruePush(bool, array, data) {
if (bool) {
array.push(data);
}
}
function ifTruePushArray(bool, array, dataArray) {
if(!bool) {
return;
}
dataArray.forEach(function(item) {
ifTruePush(item, array, item);
});
}
function getSize(filename) {
if (typeof fs === 'undefined') {
return 0;
}
return fs.statSync(filename).size;
}
function generateXML (data){
var channel = [];
channel.push({ title: { _cdata: data.title } });
channel.push({ description: { _cdata: data.description || data.title } });
channel.push({ link: data.site_url || 'http://github.com/dylang/node-rss' });
// image_url set?
if (data.image_url) {
channel.push({ image: [ {url: data.image_url}, {title: data.title}, {link: data.site_url} ] });
}
channel.push({ generator: data.generator });
channel.push({ lastBuildDate: new Date().toUTCString() });
ifTruePush(data.feed_url, channel, { 'atom:link': { _attr: { href: data.feed_url, rel: 'self', type: 'application/rss+xml' } } });
ifTruePush(data.author, channel, { 'author': { _cdata: data.author } });
ifTruePush(data.pubDate, channel, { 'pubDate': new Date(data.pubDate).toGMTString() });
ifTruePush(data.copyright, channel, { 'copyright': { _cdata: data.copyright } });
ifTruePush(data.language, channel, { 'language': { _cdata: data.language } });
ifTruePush(data.managingEditor, channel, { 'managingEditor': { _cdata: data.managingEditor } });
ifTruePush(data.webMaster, channel, { 'webMaster': { _cdata: data.webMaster } });
ifTruePush(data.docs, channel, { 'docs': data.docs });
ifTruePush(data.ttl, channel, { 'ttl': data.ttl });
ifTruePush(data.hub, channel, { 'atom:link': { _attr: { href: data.hub, rel: 'hub' } } });
if (data.categories) {
data.categories.forEach(function(category) {
ifTruePush(category, channel, { category: { _cdata: category } });
});
}
ifTruePushArray(data.custom_elements, channel, data.custom_elements);
data.items.forEach(function(item) {
var item_values = [
{ title: { _cdata: item.title } }
];
ifTruePush(item.description, item_values, { description: { _cdata: item.description } });
ifTruePush(item.url, item_values, { link: item.url });
ifTruePush(item.link || item.guid || item.title, item_values, { guid: [ { _attr: { isPermaLink: !item.guid && !!item.url } }, item.guid || item.url || item.title ] });
item.categories.forEach(function(category) {
ifTruePush(category, item_values, { category: { _cdata: category } });
});
ifTruePush(item.author || data.author, item_values, { 'dc:creator': { _cdata: item.author || data.author } });
ifTruePush(item.date, item_values, { pubDate: new Date(item.date).toGMTString() });
//Set GeoRSS to true if lat and long are set
data.geoRSS = data.geoRSS || (item.lat && item.long);
ifTruePush(item.lat, item_values, {'geo:lat': item.lat});
ifTruePush(item.long, item_values, {'geo:long': item.long});
if( item.enclosure && item.enclosure.url) {
if( item.enclosure.file ) {
item_values.push({
enclosure : {
_attr : {
url : item.enclosure.url,
length : item.enclosure.size || getSize(item.enclosure.file),
type : item.enclosure.type || mime.lookup(item.enclosure.file)
}
}
});
} else {
item_values.push({
enclosure : {
_attr : {
url : item.enclosure.url,
length : item.enclosure.size || 0,
type : item.enclosure.type || mime.lookup(item.enclosure.url)
}
}
});
}
}
ifTruePushArray(item.custom_elements, item_values, item.custom_elements);
channel.push({ item: item_values });
});
//set up the attributes for the RSS feed.
var _attr = {
'xmlns:dc': 'http://purl.org/dc/elements/1.1/',
'xmlns:content': 'http://purl.org/rss/1.0/modules/content/',
'xmlns:atom': 'http://www.w3.org/2005/Atom',
version: '2.0'
};
Object.keys(data.custom_namespaces).forEach(function(name) {
_attr['xmlns:' + name] = data.custom_namespaces[name];
});
//only add namespace if GeoRSS is true
if(data.geoRSS){
_attr['xmlns:geo'] = 'http://www.w3.org/2003/01/geo/wgs84_pos#';
}
return {
rss: [
{ _attr: _attr },
{ channel: channel }
]
};
}
function RSS (options, items) {
options = options || {};
this.title = options.title || 'Untitled RSS Feed';
this.description = options.description || '';
this.generator = options.generator || 'RSS for Node';
this.feed_url = options.feed_url;
this.site_url = options.site_url;
this.image_url = options.image_url;
this.author = options.author;
this.categories = options.categories;
this.pubDate = options.pubDate;
this.hub = options.hub;
this.docs = options.docs;
this.copyright = options.copyright;
this.language = options.language;
this.managingEditor = options.managingEditor;
this.webMaster = options.webMaster;
this.ttl = options.ttl;
//option to return feed as GeoRSS is set automatically if feed.lat/long is used
this.geoRSS = options.geoRSS || false;
this.custom_namespaces = options.custom_namespaces || {};
this.custom_elements = options.custom_elements || [];
this.items = items || [];
this.item = function (options) {
options = options || {};
var item = {
title: options.title || 'No title',
description: options.description || '',
url: options.url,
guid: options.guid,
categories: options.categories || [],
author: options.author,
date: options.date,
lat: options.lat,
long: options.long,
enclosure: options.enclosure || false,
custom_elements: options.custom_elements || []
};
this.items.push(item);
return this;
};
this.xml = function(indent) {
return '<?xml version="1.0" encoding="UTF-8"?>' +
xml(generateXML(this), indent);
};
}
module.exports = RSS;

8
build/node_modules/rss/node-rss.iml generated vendored Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

375
build/node_modules/rss/node_modules/mime-db/HISTORY.md generated vendored Normal file
View File

@@ -0,0 +1,375 @@
1.25.0 / 2016-11-11
===================
* Add `application/dicom+json`
* Add `application/dicom+xml`
* Add `application/vnd.openstreetmap.data+xml`
* Add `application/vnd.tri.onesource`
* Add `application/yang-data+json`
* Add `application/yang-data+xml`
1.24.0 / 2016-09-18
===================
* Add `application/clue_info+xml`
* Add `application/geo+json`
* Add `application/lgr+xml`
* Add `application/vnd.amazon.mobi8-ebook`
* Add `application/vnd.chess-pgn`
* Add `application/vnd.comicbook+zip`
* Add `application/vnd.d2l.coursepackage1p0+zip`
* Add `application/vnd.espass-espass+zip`
* Add `application/vnd.nearst.inv+json`
* Add `application/vnd.oma.lwm2m+json`
* Add `application/vnd.oma.lwm2m+tlv`
* Add `application/vnd.quarantainenet`
* Add `application/vnd.rar`
* Add `audio/mp3`
* Add `image/dicom-rle`
* Add `image/emf`
* Add `image/jls`
* Add `image/wmf`
* Add `model/gltf+json`
* Add `text/vnd.ascii-art`
1.23.0 / 2016-05-01
===================
* Add `application/efi`
* Add `application/vnd.3gpp.sms+xml`
* Add `application/vnd.3lightssoftware.imagescal`
* Add `application/vnd.coreos.ignition+json`
* Add `application/vnd.desmume.movie`
* Add `application/vnd.onepager`
* Add `application/vnd.vel+json`
* Add `text/prs.prop.logic`
* Add `video/encaprtp`
* Add `video/h265`
* Add `video/iso.segment`
* Add `video/raptorfec`
* Add `video/rtploopback`
* Add `video/vnd.radgamettools.bink`
* Add `video/vnd.radgamettools.smacker`
* Add `video/vp8`
* Add extension `.3gpp` to `audio/3gpp`
1.22.0 / 2016-02-15
===================
* Add `application/ppsp-tracker+json`
* Add `application/problem+json`
* Add `application/problem+xml`
* Add `application/vnd.hdt`
* Add `application/vnd.ms-printschematicket+xml`
* Add `model/vnd.rosette.annotated-data-model`
* Add `text/slim`
* Add extension `.rng` to `application/xml`
* Fix extension of `application/dash+xml` to be `.mpd`
* Update primary extension to `.m4a` for `audio/mp4`
1.21.0 / 2016-01-06
===================
* Add `application/emergencycalldata.comment+xml`
* Add `application/emergencycalldata.deviceinfo+xml`
* Add `application/emergencycalldata.providerinfo+xml`
* Add `application/emergencycalldata.serviceinfo+xml`
* Add `application/emergencycalldata.subscriberinfo+xml`
* Add `application/vnd.filmit.zfc`
* Add `application/vnd.google-apps.document`
* Add `application/vnd.google-apps.presentation`
* Add `application/vnd.google-apps.spreadsheet`
* Add `application/vnd.mapbox-vector-tile`
* Add `application/vnd.ms-printdevicecapabilities+xml`
* Add `application/vnd.ms-windows.devicepairing`
* Add `application/vnd.ms-windows.nwprinting.oob`
* Add `application/vnd.tml`
* Add `audio/evs`
1.20.0 / 2015-11-10
===================
* Add `application/cdni`
* Add `application/csvm+json`
* Add `application/rfc+xml`
* Add `application/vnd.3gpp.access-transfer-events+xml`
* Add `application/vnd.3gpp.srvcc-ext+xml`
* Add `application/vnd.ms-windows.wsd.oob`
* Add `application/vnd.oxli.countgraph`
* Add `application/vnd.pagerduty+json`
* Add `text/x-suse-ymp`
1.19.0 / 2015-09-17
===================
* Add `application/vnd.3gpp-prose-pc3ch+xml`
* Add `application/vnd.3gpp.srvcc-info+xml`
* Add `application/vnd.apple.pkpass`
* Add `application/vnd.drive+json`
1.18.0 / 2015-09-03
===================
* Add `application/pkcs12`
* Add `application/vnd.3gpp-prose+xml`
* Add `application/vnd.3gpp.mid-call+xml`
* Add `application/vnd.3gpp.state-and-event-info+xml`
* Add `application/vnd.anki`
* Add `application/vnd.firemonkeys.cloudcell`
* Add `application/vnd.openblox.game+xml`
* Add `application/vnd.openblox.game-binary`
1.17.0 / 2015-08-13
===================
* Add `application/x-msdos-program`
* Add `audio/g711-0`
* Add `image/vnd.mozilla.apng`
* Add extension `.exe` to `application/x-msdos-program`
1.16.0 / 2015-07-29
===================
* Add `application/vnd.uri-map`
1.15.0 / 2015-07-13
===================
* Add `application/x-httpd-php`
1.14.0 / 2015-06-25
===================
* Add `application/scim+json`
* Add `application/vnd.3gpp.ussd+xml`
* Add `application/vnd.biopax.rdf+xml`
* Add `text/x-processing`
1.13.0 / 2015-06-07
===================
* Add nginx as a source
* Add `application/x-cocoa`
* Add `application/x-java-archive-diff`
* Add `application/x-makeself`
* Add `application/x-perl`
* Add `application/x-pilot`
* Add `application/x-redhat-package-manager`
* Add `application/x-sea`
* Add `audio/x-m4a`
* Add `audio/x-realaudio`
* Add `image/x-jng`
* Add `text/mathml`
1.12.0 / 2015-06-05
===================
* Add `application/bdoc`
* Add `application/vnd.hyperdrive+json`
* Add `application/x-bdoc`
* Add extension `.rtf` to `text/rtf`
1.11.0 / 2015-05-31
===================
* Add `audio/wav`
* Add `audio/wave`
* Add extension `.litcoffee` to `text/coffeescript`
* Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data`
* Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install`
1.10.0 / 2015-05-19
===================
* Add `application/vnd.balsamiq.bmpr`
* Add `application/vnd.microsoft.portable-executable`
* Add `application/x-ns-proxy-autoconfig`
1.9.1 / 2015-04-19
==================
* Remove `.json` extension from `application/manifest+json`
- This is causing bugs downstream
1.9.0 / 2015-04-19
==================
* Add `application/manifest+json`
* Add `application/vnd.micro+json`
* Add `image/vnd.zbrush.pcx`
* Add `image/x-ms-bmp`
1.8.0 / 2015-03-13
==================
* Add `application/vnd.citationstyles.style+xml`
* Add `application/vnd.fastcopy-disk-image`
* Add `application/vnd.gov.sk.xmldatacontainer+xml`
* Add extension `.jsonld` to `application/ld+json`
1.7.0 / 2015-02-08
==================
* Add `application/vnd.gerber`
* Add `application/vnd.msa-disk-image`
1.6.1 / 2015-02-05
==================
* Community extensions ownership transferred from `node-mime`
1.6.0 / 2015-01-29
==================
* Add `application/jose`
* Add `application/jose+json`
* Add `application/json-seq`
* Add `application/jwk+json`
* Add `application/jwk-set+json`
* Add `application/jwt`
* Add `application/rdap+json`
* Add `application/vnd.gov.sk.e-form+xml`
* Add `application/vnd.ims.imsccv1p3`
1.5.0 / 2014-12-30
==================
* Add `application/vnd.oracle.resource+json`
* Fix various invalid MIME type entries
- `application/mbox+xml`
- `application/oscp-response`
- `application/vwg-multiplexed`
- `audio/g721`
1.4.0 / 2014-12-21
==================
* Add `application/vnd.ims.imsccv1p2`
* Fix various invalid MIME type entries
- `application/vnd-acucobol`
- `application/vnd-curl`
- `application/vnd-dart`
- `application/vnd-dxr`
- `application/vnd-fdf`
- `application/vnd-mif`
- `application/vnd-sema`
- `application/vnd-wap-wmlc`
- `application/vnd.adobe.flash-movie`
- `application/vnd.dece-zip`
- `application/vnd.dvb_service`
- `application/vnd.micrografx-igx`
- `application/vnd.sealed-doc`
- `application/vnd.sealed-eml`
- `application/vnd.sealed-mht`
- `application/vnd.sealed-ppt`
- `application/vnd.sealed-tiff`
- `application/vnd.sealed-xls`
- `application/vnd.sealedmedia.softseal-html`
- `application/vnd.sealedmedia.softseal-pdf`
- `application/vnd.wap-slc`
- `application/vnd.wap-wbxml`
- `audio/vnd.sealedmedia.softseal-mpeg`
- `image/vnd-djvu`
- `image/vnd-svf`
- `image/vnd-wap-wbmp`
- `image/vnd.sealed-png`
- `image/vnd.sealedmedia.softseal-gif`
- `image/vnd.sealedmedia.softseal-jpg`
- `model/vnd-dwf`
- `model/vnd.parasolid.transmit-binary`
- `model/vnd.parasolid.transmit-text`
- `text/vnd-a`
- `text/vnd-curl`
- `text/vnd.wap-wml`
* Remove example template MIME types
- `application/example`
- `audio/example`
- `image/example`
- `message/example`
- `model/example`
- `multipart/example`
- `text/example`
- `video/example`
1.3.1 / 2014-12-16
==================
* Fix missing extensions
- `application/json5`
- `text/hjson`
1.3.0 / 2014-12-07
==================
* Add `application/a2l`
* Add `application/aml`
* Add `application/atfx`
* Add `application/atxml`
* Add `application/cdfx+xml`
* Add `application/dii`
* Add `application/json5`
* Add `application/lxf`
* Add `application/mf4`
* Add `application/vnd.apache.thrift.compact`
* Add `application/vnd.apache.thrift.json`
* Add `application/vnd.coffeescript`
* Add `application/vnd.enphase.envoy`
* Add `application/vnd.ims.imsccv1p1`
* Add `text/csv-schema`
* Add `text/hjson`
* Add `text/markdown`
* Add `text/yaml`
1.2.0 / 2014-11-09
==================
* Add `application/cea`
* Add `application/dit`
* Add `application/vnd.gov.sk.e-form+zip`
* Add `application/vnd.tmd.mediaflex.api+xml`
* Type `application/epub+zip` is now IANA-registered
1.1.2 / 2014-10-23
==================
* Rebuild database for `application/x-www-form-urlencoded` change
1.1.1 / 2014-10-20
==================
* Mark `application/x-www-form-urlencoded` as compressible.
1.1.0 / 2014-09-28
==================
* Add `application/font-woff2`
1.0.3 / 2014-09-25
==================
* Fix engine requirement in package
1.0.2 / 2014-09-25
==================
* Add `application/coap-group+json`
* Add `application/dcd`
* Add `application/vnd.apache.thrift.binary`
* Add `image/vnd.tencent.tap`
* Mark all JSON-derived types as compressible
* Update `text/vtt` data
1.0.1 / 2014-08-30
==================
* Fix extension ordering
1.0.0 / 2014-08-30
==================
* Add `application/atf`
* Add `application/merge-patch+json`
* Add `multipart/x-mixed-replace`
* Add `source: 'apache'` metadata
* Add `source: 'iana'` metadata
* Remove badly-assumed charset data

22
build/node_modules/rss/node_modules/mime-db/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2014 Jonathan Ong me@jongleberry.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

82
build/node_modules/rss/node_modules/mime-db/README.md generated vendored Normal file
View File

@@ -0,0 +1,82 @@
# mime-db
[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![Node.js Version][node-image]][node-url]
[![Build Status][travis-image]][travis-url]
[![Coverage Status][coveralls-image]][coveralls-url]
This is a database of all mime types.
It consists of a single, public JSON file and does not include any logic,
allowing it to remain as un-opinionated as possible with an API.
It aggregates data from the following sources:
- http://www.iana.org/assignments/media-types/media-types.xhtml
- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types
## Installation
```bash
npm install mime-db
```
### Database Download
If you're crazy enough to use this in the browser, you can just grab the
JSON file using [RawGit](https://rawgit.com/). It is recommended to replace
`master` with [a release tag](https://github.com/jshttp/mime-db/tags) as the
JSON format may change in the future.
```
https://cdn.rawgit.com/jshttp/mime-db/master/db.json
```
## Usage
```js
var db = require('mime-db');
// grab data on .js files
var data = db['application/javascript'];
```
## Data Structure
The JSON file is a map lookup for lowercased mime types.
Each mime type has the following properties:
- `.source` - where the mime type is defined.
If not set, it's probably a custom media type.
- `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types)
- `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml)
- `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types)
- `.extensions[]` - known extensions associated with this mime type.
- `.compressible` - whether a file of this type can be gzipped.
- `.charset` - the default charset associated with this type, if any.
If unknown, every property could be `undefined`.
## Contributing
To edit the database, only make PRs against `src/custom.json` or
`src/custom-suffix.json`.
To update the build, run `npm run build`.
## Adding Custom Media Types
The best way to get new media types included in this library is to register
them with the IANA. The community registration procedure is outlined in
[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types
registered with the IANA are automatically pulled into this library.
[npm-version-image]: https://img.shields.io/npm/v/mime-db.svg
[npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg
[npm-url]: https://npmjs.org/package/mime-db
[travis-image]: https://img.shields.io/travis/jshttp/mime-db/master.svg
[travis-url]: https://travis-ci.org/jshttp/mime-db
[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-db/master.svg
[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master
[node-image]: https://img.shields.io/node/v/mime-db.svg
[node-url]: http://nodejs.org/download/

6712
build/node_modules/rss/node_modules/mime-db/db.json generated vendored Normal file

File diff suppressed because it is too large Load Diff

11
build/node_modules/rss/node_modules/mime-db/index.js generated vendored Normal file
View File

@@ -0,0 +1,11 @@
/*!
* mime-db
* Copyright(c) 2014 Jonathan Ong
* MIT Licensed
*/
/**
* Module exports.
*/
module.exports = require('./db.json')

View File

@@ -0,0 +1,98 @@
{
"_from": "mime-db@~1.25.0",
"_id": "mime-db@1.25.0",
"_inBundle": false,
"_integrity": "sha1-wY29fHOl2/b0SgJNwNFloeexw5I=",
"_location": "/rss/mime-db",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "mime-db@~1.25.0",
"name": "mime-db",
"escapedName": "mime-db",
"rawSpec": "~1.25.0",
"saveSpec": null,
"fetchSpec": "~1.25.0"
},
"_requiredBy": [
"/rss/mime-types"
],
"_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.25.0.tgz",
"_shasum": "c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392",
"_spec": "mime-db@~1.25.0",
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build/node_modules/rss/node_modules/mime-types",
"bugs": {
"url": "https://github.com/jshttp/mime-db/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Douglas Christopher Wilson",
"email": "doug@somethingdoug.com"
},
{
"name": "Jonathan Ong",
"email": "me@jongleberry.com",
"url": "http://jongleberry.com"
},
{
"name": "Robert Kieffer",
"email": "robert@broofa.com",
"url": "http://github.com/broofa"
}
],
"deprecated": false,
"description": "Media Type Database",
"devDependencies": {
"bluebird": "3.4.6",
"co": "4.6.0",
"cogent": "1.0.1",
"csv-parse": "1.1.7",
"eslint": "3.9.1",
"eslint-config-standard": "6.2.1",
"eslint-plugin-promise": "3.3.0",
"eslint-plugin-standard": "2.0.1",
"gnode": "0.1.2",
"istanbul": "0.4.5",
"mocha": "1.21.5",
"raw-body": "2.1.7",
"stream-to-array": "2.3.0"
},
"engines": {
"node": ">= 0.6"
},
"files": [
"HISTORY.md",
"LICENSE",
"README.md",
"db.json",
"index.js"
],
"homepage": "https://github.com/jshttp/mime-db#readme",
"keywords": [
"mime",
"db",
"type",
"types",
"database",
"charset",
"charsets"
],
"license": "MIT",
"name": "mime-db",
"repository": {
"type": "git",
"url": "git+https://github.com/jshttp/mime-db.git"
},
"scripts": {
"build": "node scripts/build",
"fetch": "gnode scripts/fetch-apache && gnode scripts/fetch-iana && gnode scripts/fetch-nginx",
"lint": "eslint .",
"test": "mocha --reporter spec --bail --check-leaks test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
"update": "npm run fetch && npm run build"
},
"version": "1.25.0"
}

View File

@@ -0,0 +1,210 @@
2.1.13 / 2016-11-18
===================
* deps: mime-db@~1.25.0
- Add new mime types
2.1.12 / 2016-09-18
===================
* deps: mime-db@~1.24.0
- Add new mime types
- Add `audio/mp3`
2.1.11 / 2016-05-01
===================
* deps: mime-db@~1.23.0
- Add new mime types
2.1.10 / 2016-02-15
===================
* deps: mime-db@~1.22.0
- Add new mime types
- Fix extension of `application/dash+xml`
- Update primary extension for `audio/mp4`
2.1.9 / 2016-01-06
==================
* deps: mime-db@~1.21.0
- Add new mime types
2.1.8 / 2015-11-30
==================
* deps: mime-db@~1.20.0
- Add new mime types
2.1.7 / 2015-09-20
==================
* deps: mime-db@~1.19.0
- Add new mime types
2.1.6 / 2015-09-03
==================
* deps: mime-db@~1.18.0
- Add new mime types
2.1.5 / 2015-08-20
==================
* deps: mime-db@~1.17.0
- Add new mime types
2.1.4 / 2015-07-30
==================
* deps: mime-db@~1.16.0
- Add new mime types
2.1.3 / 2015-07-13
==================
* deps: mime-db@~1.15.0
- Add new mime types
2.1.2 / 2015-06-25
==================
* deps: mime-db@~1.14.0
- Add new mime types
2.1.1 / 2015-06-08
==================
* perf: fix deopt during mapping
2.1.0 / 2015-06-07
==================
* Fix incorrectly treating extension-less file name as extension
- i.e. `'path/to/json'` will no longer return `application/json`
* Fix `.charset(type)` to accept parameters
* Fix `.charset(type)` to match case-insensitive
* Improve generation of extension to MIME mapping
* Refactor internals for readability and no argument reassignment
* Prefer `application/*` MIME types from the same source
* Prefer any type over `application/octet-stream`
* deps: mime-db@~1.13.0
- Add nginx as a source
- Add new mime types
2.0.14 / 2015-06-06
===================
* deps: mime-db@~1.12.0
- Add new mime types
2.0.13 / 2015-05-31
===================
* deps: mime-db@~1.11.0
- Add new mime types
2.0.12 / 2015-05-19
===================
* deps: mime-db@~1.10.0
- Add new mime types
2.0.11 / 2015-05-05
===================
* deps: mime-db@~1.9.1
- Add new mime types
2.0.10 / 2015-03-13
===================
* deps: mime-db@~1.8.0
- Add new mime types
2.0.9 / 2015-02-09
==================
* deps: mime-db@~1.7.0
- Add new mime types
- Community extensions ownership transferred from `node-mime`
2.0.8 / 2015-01-29
==================
* deps: mime-db@~1.6.0
- Add new mime types
2.0.7 / 2014-12-30
==================
* deps: mime-db@~1.5.0
- Add new mime types
- Fix various invalid MIME type entries
2.0.6 / 2014-12-30
==================
* deps: mime-db@~1.4.0
- Add new mime types
- Fix various invalid MIME type entries
- Remove example template MIME types
2.0.5 / 2014-12-29
==================
* deps: mime-db@~1.3.1
- Fix missing extensions
2.0.4 / 2014-12-10
==================
* deps: mime-db@~1.3.0
- Add new mime types
2.0.3 / 2014-11-09
==================
* deps: mime-db@~1.2.0
- Add new mime types
2.0.2 / 2014-09-28
==================
* deps: mime-db@~1.1.0
- Add new mime types
- Add additional compressible
- Update charsets
2.0.1 / 2014-09-07
==================
* Support Node.js 0.6
2.0.0 / 2014-09-02
==================
* Use `mime-db`
* Remove `.define()`
1.0.2 / 2014-08-04
==================
* Set charset=utf-8 for `text/javascript`
1.0.1 / 2014-06-24
==================
* Add `text/jsx` type
1.0.0 / 2014-05-12
==================
* Return `false` for unknown types
* Set charset=utf-8 for `application/json`
0.1.0 / 2014-05-02
==================
* Initial release

23
build/node_modules/rss/node_modules/mime-types/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,23 @@
(The MIT License)
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,103 @@
# mime-types
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Node.js Version][node-version-image]][node-version-url]
[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
The ultimate javascript content-type utility.
Similar to [node-mime](https://github.com/broofa/node-mime), except:
- __No fallbacks.__ Instead of naively returning the first available type, `mime-types` simply returns `false`,
so do `var type = mime.lookup('unrecognized') || 'application/octet-stream'`.
- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`.
- Additional mime types are added such as jade and stylus via [mime-db](https://github.com/jshttp/mime-db)
- No `.define()` functionality
Otherwise, the API is compatible.
## Install
```sh
$ npm install mime-types
```
## Adding Types
All mime types are based on [mime-db](https://github.com/jshttp/mime-db),
so open a PR there if you'd like to add mime types.
## API
```js
var mime = require('mime-types')
```
All functions return `false` if input is invalid or not found.
### mime.lookup(path)
Lookup the content-type associated with a file.
```js
mime.lookup('json') // 'application/json'
mime.lookup('.md') // 'text/x-markdown'
mime.lookup('file.html') // 'text/html'
mime.lookup('folder/file.js') // 'application/javascript'
mime.lookup('folder/.htaccess') // false
mime.lookup('cats') // false
```
### mime.contentType(type)
Create a full content-type header given a content-type or extension.
```js
mime.contentType('markdown') // 'text/x-markdown; charset=utf-8'
mime.contentType('file.json') // 'application/json; charset=utf-8'
// from a full path
mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8'
```
### mime.extension(type)
Get the default extension for a content-type.
```js
mime.extension('application/octet-stream') // 'bin'
```
### mime.charset(type)
Lookup the implied default charset of a content-type.
```js
mime.charset('text/x-markdown') // 'UTF-8'
```
### var type = mime.types[extension]
A map of content-types by extension.
### [extensions...] = mime.extensions[type]
A map of extensions by content-type.
## License
[MIT](LICENSE)
[npm-image]: https://img.shields.io/npm/v/mime-types.svg
[npm-url]: https://npmjs.org/package/mime-types
[node-version-image]: https://img.shields.io/node/v/mime-types.svg
[node-version-url]: https://nodejs.org/en/download/
[travis-image]: https://img.shields.io/travis/jshttp/mime-types/master.svg
[travis-url]: https://travis-ci.org/jshttp/mime-types
[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types/master.svg
[coveralls-url]: https://coveralls.io/r/jshttp/mime-types
[downloads-image]: https://img.shields.io/npm/dm/mime-types.svg
[downloads-url]: https://npmjs.org/package/mime-types

188
build/node_modules/rss/node_modules/mime-types/index.js generated vendored Normal file
View File

@@ -0,0 +1,188 @@
/*!
* mime-types
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict'
/**
* Module dependencies.
* @private
*/
var db = require('mime-db')
var extname = require('path').extname
/**
* Module variables.
* @private
*/
var extractTypeRegExp = /^\s*([^;\s]*)(?:;|\s|$)/
var textTypeRegExp = /^text\//i
/**
* Module exports.
* @public
*/
exports.charset = charset
exports.charsets = { lookup: charset }
exports.contentType = contentType
exports.extension = extension
exports.extensions = Object.create(null)
exports.lookup = lookup
exports.types = Object.create(null)
// Populate the extensions/types maps
populateMaps(exports.extensions, exports.types)
/**
* Get the default charset for a MIME type.
*
* @param {string} type
* @return {boolean|string}
*/
function charset (type) {
if (!type || typeof type !== 'string') {
return false
}
// TODO: use media-typer
var match = extractTypeRegExp.exec(type)
var mime = match && db[match[1].toLowerCase()]
if (mime && mime.charset) {
return mime.charset
}
// default text/* to utf-8
if (match && textTypeRegExp.test(match[1])) {
return 'UTF-8'
}
return false
}
/**
* Create a full Content-Type header given a MIME type or extension.
*
* @param {string} str
* @return {boolean|string}
*/
function contentType (str) {
// TODO: should this even be in this module?
if (!str || typeof str !== 'string') {
return false
}
var mime = str.indexOf('/') === -1
? exports.lookup(str)
: str
if (!mime) {
return false
}
// TODO: use content-type or other module
if (mime.indexOf('charset') === -1) {
var charset = exports.charset(mime)
if (charset) mime += '; charset=' + charset.toLowerCase()
}
return mime
}
/**
* Get the default extension for a MIME type.
*
* @param {string} type
* @return {boolean|string}
*/
function extension (type) {
if (!type || typeof type !== 'string') {
return false
}
// TODO: use media-typer
var match = extractTypeRegExp.exec(type)
// get extensions
var exts = match && exports.extensions[match[1].toLowerCase()]
if (!exts || !exts.length) {
return false
}
return exts[0]
}
/**
* Lookup the MIME type for a file path/extension.
*
* @param {string} path
* @return {boolean|string}
*/
function lookup (path) {
if (!path || typeof path !== 'string') {
return false
}
// get the extension ("ext" or ".ext" or full path)
var extension = extname('x.' + path)
.toLowerCase()
.substr(1)
if (!extension) {
return false
}
return exports.types[extension] || false
}
/**
* Populate the extensions and types maps.
* @private
*/
function populateMaps (extensions, types) {
// source preference (least -> most)
var preference = ['nginx', 'apache', undefined, 'iana']
Object.keys(db).forEach(function forEachMimeType (type) {
var mime = db[type]
var exts = mime.extensions
if (!exts || !exts.length) {
return
}
// mime -> extensions
extensions[type] = exts
// extension -> mime
for (var i = 0; i < exts.length; i++) {
var extension = exts[i]
if (types[extension]) {
var from = preference.indexOf(db[types[extension]].source)
var to = preference.indexOf(mime.source)
if (types[extension] !== 'application/octet-stream' &&
from > to || (from === to && types[extension].substr(0, 12) === 'application/')) {
// skip the remapping
continue
}
}
// set the extension -> mime
types[extension] = type
}
})
}

View File

@@ -0,0 +1,84 @@
{
"_from": "mime-types@2.1.13",
"_id": "mime-types@2.1.13",
"_inBundle": false,
"_integrity": "sha1-4HqqnGxrmnyjASxpADrSWjnpKog=",
"_location": "/rss/mime-types",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "mime-types@2.1.13",
"name": "mime-types",
"escapedName": "mime-types",
"rawSpec": "2.1.13",
"saveSpec": null,
"fetchSpec": "2.1.13"
},
"_requiredBy": [
"/rss"
],
"_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.13.tgz",
"_shasum": "e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88",
"_spec": "mime-types@2.1.13",
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build/node_modules/rss",
"bugs": {
"url": "https://github.com/jshttp/mime-types/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Douglas Christopher Wilson",
"email": "doug@somethingdoug.com"
},
{
"name": "Jeremiah Senkpiel",
"email": "fishrock123@rocketmail.com",
"url": "https://searchbeam.jit.su"
},
{
"name": "Jonathan Ong",
"email": "me@jongleberry.com",
"url": "http://jongleberry.com"
}
],
"dependencies": {
"mime-db": "~1.25.0"
},
"deprecated": false,
"description": "The ultimate javascript content-type utility.",
"devDependencies": {
"eslint": "3.10.2",
"eslint-config-standard": "6.2.1",
"eslint-plugin-promise": "3.4.0",
"eslint-plugin-standard": "2.0.1",
"istanbul": "0.4.5",
"mocha": "1.21.5"
},
"engines": {
"node": ">= 0.6"
},
"files": [
"HISTORY.md",
"LICENSE",
"index.js"
],
"homepage": "https://github.com/jshttp/mime-types#readme",
"keywords": [
"mime",
"types"
],
"license": "MIT",
"name": "mime-types",
"repository": {
"type": "git",
"url": "git+https://github.com/jshttp/mime-types.git"
},
"scripts": {
"lint": "eslint .",
"test": "mocha --reporter spec test/test.js",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js"
},
"version": "2.1.13"
}

137
build/node_modules/rss/package.json generated vendored Normal file
View File

@@ -0,0 +1,137 @@
{
"_from": "rss",
"_id": "rss@1.2.2",
"_inBundle": false,
"_integrity": "sha1-UKFpiHYTgTOnT5oF0r3I240nqSE=",
"_location": "/rss",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "rss",
"name": "rss",
"escapedName": "rss",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/rss/-/rss-1.2.2.tgz",
"_shasum": "50a1698876138133a74f9a05d2bdc8db8d27a921",
"_spec": "rss",
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build",
"author": {
"name": "Dylan Greene",
"email": "dylang@gmail.com"
},
"browserify": {
"transform": [
"folderify"
]
},
"bugs": {
"url": "http://github.com/dylang/node-rss/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Dylan Greene",
"email": "dylang@gmail.com"
},
{
"name": "Xavier Damman",
"email": "xdamman@gmail.com"
},
{
"name": "Michael R. Lange"
},
{
"name": "Victor Jonsson"
},
{
"name": "Danny Graham"
},
{
"name": "Patrick Garman",
"email": "contact@pmgarman.me"
},
{
"name": "Fred Morstatter"
},
{
"name": "Eric Vantillard",
"email": "eric.vantillard@evaxion.fr"
},
{
"name": "Jason Karns",
"email": "jasonkarns"
},
{
"name": "Hannah Wolfe",
"email": "github.erisds@gmail.com"
}
],
"dependencies": {
"mime-types": "2.1.13",
"xml": "1.0.1"
},
"deprecated": false,
"description": "RSS feed generator. Add RSS feeds to any project. Supports enclosures and GeoRSS.",
"devDependencies": {
"folderify": "^1.1.0",
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
"grunt-contrib-jshint": "^0.11.3",
"grunt-release": "^0.13.0",
"grunt-templates-dylang": "^1.0.10",
"include-folder": "^1.0.0",
"load-grunt-tasks": "^3.3.0",
"mockdate": "^1.0.3",
"prova": "^2.1.2",
"q": "^1.4.1",
"tap-difflet": "^0.4.0",
"tape": "^4.2.1",
"time-grunt": "^1.2.1",
"xml2js": "^0.4.12"
},
"homepage": "http://github.com/dylang/node-rss",
"keywords": [
"rss",
"xml",
"atom",
"podcasts",
"ghost",
"feed",
"feed builder",
"rss feed"
],
"license": "MIT",
"main": "lib/index",
"name": "rss",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/dylang/node-rss.git"
},
"scripts": {
"lint": "grunt lint",
"test": "tape test --tap | tap-difflet",
"test:browser": "prova -b"
},
"testling": {
"files": "test/*.js",
"browsers": [
"ie/9..latest",
"chrome/latest",
"firefox/latest",
"safari/latest",
"opera/latest",
"iphone/latest",
"ipad/latest",
"android-browser/latest"
]
},
"version": "1.2.2"
}

244
build/node_modules/rss/readme.md generated vendored Normal file
View File

@@ -0,0 +1,244 @@
## rss [![Build Status](http://img.shields.io/travis/dylang/node-rss.svg)](https://travis-ci.org/dylang/node-rss) [![rss](http://img.shields.io/npm/dm/rss.svg)](https://www.npmjs.org/package/rss)
> RSS feed generator. Add RSS feeds to any project. Supports enclosures and GeoRSS.
### Usage
#### Create a new feed
```js
var RSS = require('rss');
var feed = new RSS(feedOptions);
```
##### `feedOptions`
* `title` **string** Title of your site or feed
* `description` _optional_ **string** A short description of the feed.
* `generator` _optional_ **string** Feed generator.
* `feed_url` **url string** Url to the rss feed.
* `site_url` **url string** Url to the site that the feed is for.
* `image_url` _optional_ **url string** Small image for feed readers to use.
* `docs` _optional_ **url string** Url to documentation on this feed.
* `managingEditor` _optional_ **string** Who manages content in this feed.
* `webMaster` _optional_ **string** Who manages feed availability and technical support.
* `copyright` _optional_ **string** Copyright information for this feed.
* `language` _optional_ **string** The language of the content of this feed.
* `categories` _optional_ **array of strings** One or more categories this feed belongs to.
* `pubDate` _optional_ **Date object or date string** The publication date for content in the feed
* `ttl` _optional_ **integer** Number of minutes feed can be cached before refreshing from source.
* `hub` _optional_ **PubSubHubbub hub url** Where is the PubSubHub hub located.
* `custom_namespaces` _optional_ **object** Put additional namespaces in <rss> element (without 'xmlns:' prefix)
* `custom_elements` _optional_ **array** Put additional elements in the feed (node-xml syntax)
#### Add items to a feed
An item can be used for a blog entry, project update, log entry, etc. Your RSS feed
can have any number of items. Most feeds use 20 or fewer items.
```js
feed.item(itemOptions);
```
##### itemOptions
* `title` **string** Title of this particular item.
* `description` **string** Content for the item. Can contain html but link and image urls must be absolute path including hostname.
* `url` **url string** Url to the item. This could be a blog entry.
* `guid` **unique string** A unique string feed readers use to know if an item is new or has already been seen.
If you use a guid never change it. If you don't provide a guid then your item urls must
be unique.
* `categories` _optional_ **array of strings** If provided, each array item will be added as a category element
* `author` _optional_ **string** If included it is the name of the item's creator.
If not provided the item author will be the same as the feed author. This is typical
except on multi-author blogs.
* `date` **Date object or date string** The date and time of when the item was created. Feed
readers use this to determine the sort order. Some readers will also use it to determine
if the content should be presented as unread.
* `lat` _optional_ **number** The latitude coordinate of the item.
* `long` _optional_ **number** The longitude coordinate of the item.
* `custom_elements` _optional_ **array** Put additional elements in the item (node-xml syntax)
* `enclosure` _optional_ **object** An enclosure object
```js
/* enclosure takes url or file key for the enclosure object
url: _required_ url to file object (or file)
file: _required_ path to binary file (or url)
size: _optional_ size of the file
type: _optional_ if not provided the mimetype will be guessed
based on the extension of the file or url,
passing type to the enclosure will override the guessed type
*/
{
'url' : 'http://www.example.com/path/to/image',
'size' : 1668, //
'type' : 'image/jpeg'
}
```
##### Feed XML
```js
var xml = feed.xml({indent: true});
```
This returns the XML as a string.
`indent` _optional_ **boolean or string** What to use as a tab. Defaults to no tabs (compressed).
For example you can use `'\t'` for tab character, or `' '` for two-space tabs. If you set it to
`true` it will use four spaces.
### Example Usage
```js
var RSS = require('rss');
/* lets create an rss feed */
var feed = new RSS({
title: 'title',
description: 'description',
feed_url: 'http://example.com/rss.xml',
site_url: 'http://example.com',
image_url: 'http://example.com/icon.png',
docs: 'http://example.com/rss/docs.html',
managingEditor: 'Dylan Greene',
webMaster: 'Dylan Greene',
copyright: '2013 Dylan Greene',
language: 'en',
categories: ['Category 1','Category 2','Category 3'],
pubDate: 'May 20, 2012 04:00:00 GMT',
ttl: '60',
custom_namespaces: {
'itunes': 'http://www.itunes.com/dtds/podcast-1.0.dtd'
},
custom_elements: [
{'itunes:subtitle': 'A show about everything'},
{'itunes:author': 'John Doe'},
{'itunes:summary': 'All About Everything is a show about everything. Each week we dive into any subject known to man and talk about it as much as we can. Look for our podcast in the Podcasts app or in the iTunes Store'},
{'itunes:owner': [
{'itunes:name': 'John Doe'},
{'itunes:email': 'john.doe@example.com'}
]},
{'itunes:image': {
_attr: {
href: 'http://example.com/podcasts/everything/AllAboutEverything.jpg'
}
}},
{'itunes:category': [
{_attr: {
text: 'Technology'
}},
{'itunes:category': {
_attr: {
text: 'Gadgets'
}
}}
]}
]
});
/* loop over data and add to feed */
feed.item({
title: 'item title',
description: 'use this for the content. It can include html.',
url: 'http://example.com/article4?this&that', // link to the item
guid: '1123', // optional - defaults to url
categories: ['Category 1','Category 2','Category 3','Category 4'], // optional - array of item categories
author: 'Guest Author', // optional - defaults to feed author property
date: 'May 27, 2012', // any format that js Date can parse.
lat: 33.417974, //optional latitude field for GeoRSS
long: -111.933231, //optional longitude field for GeoRSS
enclosure: {url:'...', file:'path-to-file'}, // optional enclosure
custom_elements: [
{'itunes:author': 'John Doe'},
{'itunes:subtitle': 'A short primer on table spices'},
{'itunes:image': {
_attr: {
href: 'http://example.com/podcasts/everything/AllAboutEverything/Episode1.jpg'
}
}},
{'itunes:duration': '7:04'}
]
});
// cache the xml to send to clients
var xml = feed.xml();
```
### Notes
* You do not need to escape anything. This module will escape characters when necessary.
* This module is very fast but you might as well cache the output of xml() and serve
it until something changes.
### Inspiration
I started this module *years* ago (April 2011) because there weren't any Node modules
for creating RSS. [Nearly 50 modules](https://npmjs.org/browse/depended/rss)
use RSS, as well as many web sites and the popular [Ghost publishing platform](https://ghost.org/).
### Contributing
Contributions to the project are welcome. Feel free to fork and improve.
I do my best accept pull requests in a timely manor, especially when tests and updated docs
are included.
### About the Author
Hi! Thanks for checking out this project! My name is **Dylan Greene**. When not overwhelmed with my two young kids I enjoy contributing
to the open source community. I'm also a tech lead at [Opower](http://opower.com). [![@dylang](https://img.shields.io/badge/github-dylang-green.svg)](https://github.com/dylang) [![@dylang](https://img.shields.io/badge/twitter-dylang-blue.svg)](https://twitter.com/dylang)
Here's some of my other Node projects:
| Name | Description | npm&nbsp;Downloads |
|---|---|---|
| [`npmcheck`](https://github.com/dylang/npm-check) | Check for outdated, incorrect, and unused dependencies. | [![npm-check](https://img.shields.io/npm/dm/npm-check.svg?style=flat-square)](https://www.npmjs.org/package/npm-check) |
| [`gruntnotify`](https://github.com/dylang/grunt-notify) | Automatic desktop notifications for Grunt errors and warnings. Supports OS X, Windows, Linux. | [![grunt-notify](https://img.shields.io/npm/dm/grunt-notify.svg?style=flat-square)](https://www.npmjs.org/package/grunt-notify) |
| [`shortid`](https://github.com/dylang/shortid) | Amazingly short non-sequential url-friendly unique id generator. | [![shortid](https://img.shields.io/npm/dm/shortid.svg?style=flat-square)](https://www.npmjs.org/package/shortid) |
| [`gruntprompt`](https://github.com/dylang/grunt-prompt) | Interactive prompt for your Grunt config using console checkboxes, text input with filtering, password fields. | [![grunt-prompt](https://img.shields.io/npm/dm/grunt-prompt.svg?style=flat-square)](https://www.npmjs.org/package/grunt-prompt) |
| [`xml`](https://github.com/dylang/node-xml) | Fast and simple xml generator. Supports attributes, CDATA, etc. Includes tests and examples. | [![xml](https://img.shields.io/npm/dm/xml.svg?style=flat-square)](https://www.npmjs.org/package/xml) |
| [`changelog`](https://github.com/dylang/changelog) | Command line tool (and Node module) that generates a changelog in color output, markdown, or json for modules in npmjs.org's registry as well as any public github.com repo. | [![changelog](https://img.shields.io/npm/dm/changelog.svg?style=flat-square)](https://www.npmjs.org/package/changelog) |
| [`spacehogs`](https://github.com/dylang/space-hogs) | Discover surprisingly large directories from the command line. | [![space-hogs](https://img.shields.io/npm/dm/space-hogs.svg?style=flat-square)](https://www.npmjs.org/package/space-hogs) |
| [`observatory`](https://github.com/dylang/observatory) | Beautiful UI for showing tasks running on the command line. | [![observatory](https://img.shields.io/npm/dm/observatory.svg?style=flat-square)](https://www.npmjs.org/package/observatory) |
| [`captionbot`](https://github.com/dylang/captionbot) | Get captions for image using Microsoft's CaptionBot 🤖 | [![captionbot](https://img.shields.io/npm/dm/captionbot.svg?style=flat-square)](https://www.npmjs.org/package/captionbot) |
| [`gruntattention`](https://github.com/dylang/grunt-attention) | Display attention-grabbing messages in the terminal | [![grunt-attention](https://img.shields.io/npm/dm/grunt-attention.svg?style=flat-square)](https://www.npmjs.org/package/grunt-attention) |
| [`whatdog`](https://github.com/dylang/what-dog) | Get the breed of a dog from an image using Microsoft's what-dog. | [![what-dog](https://img.shields.io/npm/dm/what-dog.svg?style=flat-square)](https://www.npmjs.org/package/what-dog) |
| [`anthology`](https://github.com/dylang/anthology) | Module information and stats for any @npmjs user | [![anthology](https://img.shields.io/npm/dm/anthology.svg?style=flat-square)](https://www.npmjs.org/package/anthology) |
| [`randompuppy`](https://github.com/dylang/random-puppy) | Get a random imgur image url, by default a puppy. | [![random-puppy](https://img.shields.io/npm/dm/random-puppy.svg?style=flat-square)](https://www.npmjs.org/package/random-puppy) |
| [`gruntcat`](https://github.com/dylang/grunt-cat) | Echo a file to the terminal. Works with text, figlets, ascii art, and full-color ansi. | [![grunt-cat](https://img.shields.io/npm/dm/grunt-cat.svg?style=flat-square)](https://www.npmjs.org/package/grunt-cat) |
_This list was generated using [anthology](https://github.com/dylang/anthology)._
### License
Copyright (c) 2017 Dylan Greene, contributors.
Released under the [MIT license](https://tldrlegal.com/license/mit-license).
Screenshots are [CC BY-SA](http://creativecommons.org/licenses/by-sa/4.0/) (Attribution-ShareAlike).
***
_Generated using [grunt-readme](https://github.com/assemble/grunt-readme) with [grunt-templates-dylang](https://github.com/dylang/grunt-templates-dylang) on Wednesday, January 11, 2017._
_To make changes to this document look in `/templates/readme/`