File tree Expand file tree Collapse file tree 2 files changed +26
-5
lines changed Expand file tree Collapse file tree 2 files changed +26
-5
lines changed Original file line number Diff line number Diff line change
1
+ const version = 11 ;
2
+ const day = 7 ;
3
+ const expiresDay = 8 ;
4
+
5
+ if ( version % 2 === 0 ) {
6
+ month = 'December' ;
7
+ expiresMonth = 'June' ;
8
+ } else {
9
+ month = 'June' ;
10
+ expiresMonth = 'December' ;
11
+ }
12
+ const year = Math . floor ( 2013 + ( version - 1 ) / 2 ) ;
13
+ const expiresYear = Math . floor ( 2013 + version / 2 ) ;
14
+ const date = `${ day } ${ month } ${ year } ` ;
15
+ const expires = `${ expiresDay } ${ expiresMonth } ${ expiresYear } ` ;
16
+ const monthYear = ( month === 'June' ? ' ' : '' ) + month + ' ' + year ;
17
+
1
18
var fs = require ( 'fs' ) ,
2
19
lines = fs . readFileSync ( 'source.txt' ) . toString ( ) . split ( '\n' ) ,
3
20
breaker1a = '\n\nde Jong [Page ' ,
4
21
breaker1b = '\n\nde Jong [Page ' ,
5
22
breaker2 = ']' ,
6
- breaker3 = '\n\nInternet-Draft remoteStorage June 2018 \n\n' ,
23
+ breaker3 = '\n\nInternet-Draft remoteStorage ' + monthYear + ' \n\n',
7
24
page = 1 , line = 0 ;
8
25
9
26
while ( line < lines . length ) {
27
+ lines [ line ] = lines [ line ] . split ( '${EXPIRES}' ) . join ( expires ) ;
28
+ lines [ line ] = lines [ line ] . split ( '${DATE}' ) . join ( date ) ;
29
+ lines [ line ] = lines [ line ] . split ( '${YEAR}' ) . join ( year ) ;
30
+ lines [ line ] = lines [ line ] . split ( '${VERSION}' ) . join ( version ) ;
10
31
console . log ( lines [ line ] ) ;
11
32
if ( lines [ line ] . length > 72 ) {
12
33
console . log ( '123456789012345678901234567890123456789012345678901234567890123456789012*****' ) ;
Original file line number Diff line number Diff line change 1
1
INTERNET DRAFT Michiel B. de Jong
2
- Document: draft-dejong-remotestorage-11 (independent)
2
+ Document: draft-dejong-remotestorage-${VERSION} (independent)
3
3
F. Kooman
4
4
Intended Status: Proposed Standard (independent)
5
- Expires: 8 December 2018 7 June 2018
5
+ Expires: ${EXPIRES} ${DATE}
6
6
7
7
8
8
remoteStorage
@@ -32,11 +32,11 @@ Status of this Memo
32
32
time. It is inappropriate to use Internet-Drafts as reference
33
33
material or to cite them other than as "work in progress."
34
34
35
- This Internet-Draft will expire on 8 December 2018 .
35
+ This Internet-Draft will expire on ${EXPIRES} .
36
36
37
37
Copyright Notice
38
38
39
- Copyright (c) 2018 IETF Trust and the persons identified as the
39
+ Copyright (c) ${YEAR} IETF Trust and the persons identified as the
40
40
document authors. All rights reserved.
41
41
42
42
This document is subject to BCP 78 and the IETF Trust's Legal
You can’t perform that action at this time.
0 commit comments