Skip to content

Commit b6c80a6

Browse files
committed
Generalize a bit
1 parent f8678a8 commit b6c80a6

10 files changed

+22
-22
lines changed

LICENSE

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The fire information displayed by this app is
88
* NOT SUITABLE FOR SAFETY/EMERGENCY/EVACUATION PURPOSES,
99
* and MAY BE INCORRECT OR OUT-OF-DATE.
1010

11-
USE AT YOUR OWN RISK. FIRES MAY BE CLOSER THAN THEY APPEAR.
11+
USE AT YOUR OWN RISK. DANGER MAY BE CLOSER THAN SHOWN HERE.
1212

1313
Note that while we may distribute the images and posts generated and
1414
published by our original bot using the disclaimers indicated in the
@@ -17,6 +17,10 @@ you wish to use the same disclaimers and/or whether those disclaimers meet
1717
your obligations under both our and third-party requirements.
1818
We cannot give any legal advice on that.
1919

20+
No license to use any trademarks is provided. You are not permitted
21+
to use any of the names of our Twitter accounts in any content you
22+
generate.
23+
2024
=====
2125

2226
fire-monitor-bot (https://github.com/publicdocs-platform/fire-monitor-bot)
@@ -38,10 +42,6 @@ limitations under the License.
3842
This entire file serves as the NOTICE that must be included under
3943
Section 4d of the License.
4044

41-
No license to use any trademarks is provided. You are not permitted
42-
to use any of the names of our Twitter accounts in any content you
43-
generate.
44-
4545
=====
4646

4747
APACHE LICENSE, VERSION 2.0:

NOTICE

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The fire information displayed by this app is
88
* NOT SUITABLE FOR SAFETY/EMERGENCY/EVACUATION PURPOSES,
99
* and MAY BE INCORRECT OR OUT-OF-DATE.
1010

11-
USE AT YOUR OWN RISK. FIRES MAY BE CLOSER THAN THEY APPEAR.
11+
USE AT YOUR OWN RISK. DANGER MAY BE CLOSER THAN SHOWN HERE.
1212

1313
Note that while we may distribute the images and posts generated and
1414
published by our original bot using the disclaimers indicated in the

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The fire information displayed by this app is
4444
* NOT SUITABLE FOR SAFETY/EMERGENCY/EVACUATION PURPOSES,
4545
* and MAY BE INCORRECT OR OUT-OF-DATE.
4646
47-
USE AT YOUR OWN RISK. FIRES MAY BE CLOSER THAN THEY APPEAR.
47+
USE AT YOUR OWN RISK. DANGER MAY BE CLOSER THAN SHOWN HERE.
4848
4949
Note that while we may distribute the images and posts generated and
5050
published by our original bot using the disclaimers indicated in the

commands/map.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const config = {
8383
};
8484

8585

86-
const template = pug.compileFile(path.join(__dirname, '../templates/detailsRender.pug'));
86+
const template = pug.compileFile(path.join(__dirname, '../templates/render-details.pug'));
8787
const html = function(entry) {
8888
return template({config: config, data: entry, curdir: process.cwd()});
8989
};

commands/run.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -280,18 +280,18 @@ exports.handler = (argv) => {
280280
};
281281

282282

283-
const htmlTemplate = pug.compileFile(path.join(__dirname, '../templates/fireUpdateRender.pug'));
283+
const htmlTemplate = pug.compileFile(path.join(__dirname, '../templates/render-overview.pug'));
284284
const genHtml = function(entry) {
285285
return htmlTemplate({config: config, data: entry, curdir: process.cwd()});
286286
};
287287

288-
const perimeterTemplate = pug.compileFile(path.join(__dirname, '../templates/detailsRender.pug'));
288+
const perimeterTemplate = pug.compileFile(path.join(__dirname, '../templates/render-details.pug'));
289289
const perimeterHtml = function(entry) {
290290
return perimeterTemplate({config: config, data: entry, curdir: process.cwd()});
291291
};
292292

293293

294-
const tweetTemplate = pug.compileFile(path.join(__dirname, '../templates/fireUpdateTweet.pug'));
294+
const tweetTemplate = pug.compileFile(path.join(__dirname, '../templates/tweet-update.pug'));
295295

296296
const genTweet = function(entry) {
297297
return tweetTemplate({config: config, data: entry, curdir: process.cwd()});

lib/twitter.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ async function processTweet(logger, p, accounts, postMedia, findThread, retweet,
216216
// Use very short text.
217217
newPost.status = item.shortText;
218218
if (!newPost.status) {
219-
newPost.status = item.text.split(' ')[0] + ' - Unofficial fire report. See officials for safety info. May be incorrect; disclaimers in images.';
219+
newPost.status = item.text.split(' ')[0] + ' - Unofficial report. See officials for safety info. May be incorrect; disclaimers in images.';
220220
}
221221
logger.info(' !!! Reattempt', {post: newPost});
222222
try {

main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ yargs.command(require('./commands/map'))
4545
.option('db', {
4646
string: true,
4747
default: './persist.yaml',
48-
desc: 'R/W file to persist fire info.',
48+
desc: 'R/W file to persist disaster info.',
4949
})
5050
.option('port', {
5151
number: true,
5252
default: 8080,
5353
desc: 'Web server port',
5454
})
55-
.scriptName('firemon')
55+
.scriptName('fire-monitor-bot')
5656
.recommendCommands()
5757
.strict()
5858
.version('version', 'Displays package version', pkgVersion)

templates/detailsRender.pug templates/render-details.pug

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ html.perim
3434
br
3535
| Info is APPROXIMATE, often INCORRECT and OUT-OF-DATE, NOT REAL-TIME, and NOT REVIEWED BY A HUMAN BEING.
3636
br
37-
| Unofficial. For information only. USE AT YOUR OWN RISK — FIRES MAY BE CLOSER AND LARGER THAN THEY APPEAR HERE
37+
| Unofficial. For information only. USE AT YOUR OWN RISK — DANGER MAY BE CLOSER AND LARGER THAN SHOWN HERE
3838
div.warn
3939
if (data.current ? (data.current.NFSAType || '') : '').includes('Emerging')
4040
div.innerWarn
41-
| This is an emerging fire report - details may be especially uncertain.
41+
| This is an emerging report - details may be especially uncertain.
4242
div.cite
4343
b
4444
| To the maximum extent permitted by law: (1) all content is provided to you on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER (INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDNTIONS OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT); and (2) IN NO EVENT WILL ANY AUTHOR OR DATA PROVIDER BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES arising out of your use of this content, even if the author or data provider has been advised of the possibility of such losses, costs, expenses, or damages.
@@ -64,11 +64,11 @@ html.perim
6464
if data.perimDateTime
6565
if usePerimAcres
6666
span  #{numFormat.format(acres)} perim. acres
67-
span.perimDate @#{friendlyDate(data.perimDateTime)} (entire fire not shown; satellite data not current)
67+
span.perimDate @#{friendlyDate(data.perimDateTime)} (entire event not shown; satellite data not current)
6868
else
69-
span.perimDate Perimeter @#{friendlyDate(data.perimDateTime)} (entire fire not shown; satellite data not current)
69+
span.perimDate Perimeter @#{friendlyDate(data.perimDateTime)} (entire event not shown; satellite data not current)
7070
else
71-
span.perimDate General Vicinity (entire fire not shown; satellite data not current)
71+
span.perimDate General Vicinity (entire event not shown; satellite data not current)
7272
each st in (data.subtitle || [])
7373
.detailSubtitle
7474
| #{st}

templates/fireUpdateRender.pug templates/render-overview.pug

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ html.update
3535
br
3636
| Info is APPROXIMATE, often INCORRECT and OUT-OF-DATE, NOT REAL-TIME, and NOT REVIEWED BY A HUMAN BEING.
3737
br
38-
| For information only. USE AT YOUR OWN RISK — FIRES MAY BE CLOSER AND LARGER THAN THEY APPEAR HERE
38+
| For information only. USE AT YOUR OWN RISK — DANGER MAY BE CLOSER AND LARGER THAN SHOWN HERE
3939
table.wrapper
4040
tr
4141
if hasImg
@@ -47,7 +47,7 @@ html.update
4747
tr.important
4848
td(colspan=2)
4949
div.warn
50-
| THIS IS AN EMERGING FIRE REPORT
50+
| THIS IS AN EMERGING REPORT
5151
br
5252
| DETAILS MAY BE ESPECIALLY UNCERTAIN
5353
tr.important
@@ -139,7 +139,7 @@ html.update
139139
br
140140
span.detail Perimeter Updated #{friendlyDate(data.current.PerimDateTime)}
141141
br
142-
span.detail Fire Id #{data.current.UniqueFireIdentifier}
142+
span.detail Event Id #{data.current.UniqueFireIdentifier}
143143

144144
div.cite
145145
b
File renamed without changes.

0 commit comments

Comments
 (0)