* Improvements to ANSI parser

* Introduction of storage tags for file bases / areas
* Expiration for file web server items
* WIP work on clean ANSI (on hold for a bit while other file base stuff is worked on)
This commit is contained in:
Bryan Ashby 2016-12-06 18:58:56 -07:00
parent a7c0f2b7b0
commit 6da7d557f9
16 changed files with 557 additions and 180 deletions

View file

@ -361,17 +361,21 @@ function getDefaultConfig() {
fileNamePatterns: {
// These are NOT case sensitive
// FILE_ID.DIZ - https://en.wikipedia.org/wiki/FILE_ID.DIZ
shortDesc : [
'^FILE_ID\.DIZ$', '^DESC\.SDI$', '^DESCRIPT\.ION$', '^FILE\.DES$', '$FILE\.SDI$', '^DISK\.ID$'
],
longDesc : [ '^.*\.NFO$', '^README\.1ST$', '^README\.TXT$' ],
// common README filename - https://en.wikipedia.org/wiki/README
longDesc : [
'^.*\.NFO$', '^README\.1ST$', '^README\.TXT$', '^READ\.ME$', '^README$', '^README\.md$'
],
},
yearEstPatterns: [
//
// Patterns should produce the year in the first submatch
// The year may be YY or YYYY
// Patterns should produce the year in the first submatch.
// The extracted year may be YY or YYYY
//
'[0-3]?[0-9][\\-\\/\\.][0-3]?[0-9][\\-\\/\\.]((?:[0-9]{2})?[0-9]{2})', // m/d/yyyy, mm-dd-yyyy, etc.
"\\B('[1789][0-9])\\b", // eslint-disable-line quotes
@ -385,17 +389,25 @@ function getDefaultConfig() {
expireMinutes : 1440, // 1 day
},
//
// File area storage location tag/value pairs.
// Non-absolute paths are relative to |areaStoragePrefix|.
//
storageTags : {
sys_msg_attach : 'msg_attach',
},
areas: {
message_attachment : {
name : 'Message attachments',
desc : 'File attachments to messages',
systemm_message_attachment : {
name : 'Message attachments',
desc : 'File attachments to messages',
storageTags : 'sys_msg_attach', // may be string or array of strings
}
}
},
eventScheduler : {
events : {
trimMessageAreas : {
// may optionally use [or ]@watch:/path/to/file