├── .gitignore ├── README.md ├── appsscript.json ├── main.js └── rss.html /.gitignore: -------------------------------------------------------------------------------- 1 | .clasp.json 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## About 2 | 3 | This enables you to register [Apps Script Release Notes](https://developers.google.com/apps-script/releases) as RSS feed. 4 | 5 | ## How to use 6 | 7 | Register the following URL in the RSS reader app. 8 | 9 | https://script.google.com/macros/s/AKfycbyV23zDXoA2hmJ8_HRJxzUcNjec3tHjsBjYyDeO1RIIzgQwc1T-RiTtawBm97jpamv0/exec 10 | -------------------------------------------------------------------------------- /appsscript.json: -------------------------------------------------------------------------------- 1 | { 2 | "timeZone": "UTC", 3 | "exceptionLogging": "STACKDRIVER", 4 | "runtimeVersion": "V8", 5 | "dependencies": { 6 | "libraries": [ 7 | { 8 | "userSymbol": "Cheerio", 9 | "libraryId": "1ReeQ6WO8kKNxoaA_O0XEQ589cIrRvEBA9qcWpNqdOP17i47u6N9M5Xh0", 10 | "version": "13" 11 | } 12 | ] 13 | }, 14 | "webapp": { 15 | "executeAs": "USER_DEPLOYING", 16 | "access": "ANYONE_ANONYMOUS" 17 | } 18 | } -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | const URL = 'https://developers.google.com/apps-script/releases' 2 | const CACHE_KEY = 'rss' 3 | 4 | const getFeed = () => { 5 | const cache = CacheService.getScriptCache() 6 | const cached = cache.get(CACHE_KEY) 7 | if (cached) { 8 | return cached 9 | } 10 | 11 | const content = UrlFetchApp.fetch(URL).getContentText() 12 | const $ = Cheerio.load(content) 13 | const items = [] 14 | $('h3').each((i, elem) => { 15 | const _date = $(elem).attr('data-text') 16 | if (_date) { 17 | const id = $(elem).attr('id') 18 | const link = `${URL}#${id}` 19 | const title = $(elem).next().text().split('\n').join() 20 | const date = 21 | Utilities.formatDate(new Date(_date), 'GMT', 'E, dd MMM YYYY') + 22 | ' 00:00:00 GMT' 23 | items.push({ link, date, title }) 24 | } 25 | }) 26 | const template = HtmlService.createTemplateFromFile('rss') 27 | template.items = items 28 | const feed = template.evaluate().getContent() 29 | cache.put(CACHE_KEY, feed, 60 * 60) 30 | return feed 31 | } 32 | 33 | const doGet = () => { 34 | return ContentService.createTextOutput(getFeed()).setMimeType( 35 | ContentService.MimeType.RSS 36 | ) 37 | } 38 | -------------------------------------------------------------------------------- /rss.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Apps Script Release Notes 4 | https://developers.google.com/apps-script/releases 5 | This page lists the major changes in each release of Google Apps Script. It is intended to help developers identify recent changes in behavior. 6 | 7 | 8 | <?= item.title ?> 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | --------------------------------------------------------------------------------