Last ned Google font (husk å legge til latin-ext/ æøå):
https://google-webfonts-helper.herokuapp.com/fonts/noto-serif?subsets=latin,latin-ext
Sett unicode ranges til 0020-007F,00A0-00FF og last ned fonten (woff2) via
const vttText = await fetch(vttUrl).then(res => res.text()); | |
const timeCodeToSeconds = (str) => { | |
const [h, m, s] = str.split(':').map(Number); | |
return h * 60 * 60 + m * 60 + s; | |
}; | |
// PS! simple TEST parser! vtt format could contain NOTES and css styling | |
// https://developer.mozilla.org/en-US/docs/Web/API/VTTCue | |
const cues = vttText |
const AND = 'and'; | |
const NIL = 'zero'; | |
const NUMBERS = ['', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen']; | |
const TENS = ['', '', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety']; | |
const UNITS = ['', '', 'hundred', 'thousand', 'million', 'billion', 'trillion', 'quadrillion', 'quintillion', 'sextillion', 'septillion', 'octillion', 'nonillion', 'decillion', 'undecillion', 'duodecillion', 'tredecillion', 'quattuordecillion', 'quindecillion', 'sedecillion', 'septendecillion', 'octodecillion', 'novendecillion', 'vigintillion', 'unvigintillion', 'duovigintillion', 'tresvigintillion', 'quattuorvigintillion', 'quinvigintillion', 'sesvigintillion', 'septemvigintillion', 'octovigintillion', 'novemvigintillion', 'trigintillion', 'untrigintillion', 'duotrigintillion', 'trestrigintillion', 'quattuortrigintillion', 'quintrigintillion', 'sestrigintillion', 'se |
// source: https://no.wikipedia.org/wiki/Tall | |
const numbers = ['','en','to','tre','fire','fem','seks','sju','åtte','ni','ti','elleve','tolv','tretten','fjorten','femten','seksten','søtten','atten','nitten']; | |
const tens = ['','','tjue','tretti','førti','femti','seksti','søtti','åtti','nitti']; | |
const units = [ '', '', 'hundre', 'tusen', 'million', 'milliard', 'billion', 'billiard', 'trillion', 'trilliard', 'kvadrillion', 'kvadrilliard', 'kvintillion', 'kvintilliard', 'sekstillion', 'sekstilliard', 'septillion', 'septilliard', 'oktillion', 'oktilliard', 'nonillion', 'nonilliard', 'desillion', 'undesillion', 'dodesillion', 'tredesillion', 'quattordesillion', 'kvindesillion', 'seksdesillion', 'googol', 'septendesillion', 'oktoesillion', 'novemdesillion', 'vigintillon', 'unvigintillion', 'dovigintillion', 'trevigintillion', 'kvartvigintillion', 'kvintvigintillion', 'seksvigintillion', 'septenvigintillion', 'octovigintillion', 'novemvigintillion', 'trigintillion', 'untrigintillion', 'dotrigintillion', 'trerigintill |
Last ned Google font (husk å legge til latin-ext/ æøå):
https://google-webfonts-helper.herokuapp.com/fonts/noto-serif?subsets=latin,latin-ext
Sett unicode ranges til 0020-007F,00A0-00FF og last ned fonten (woff2) via
const msal = require('@azure/msal-node'); | |
const app = someServer(); | |
const authenticator = new msal.ConfidentialClientApplication({ | |
auth: { | |
clientId: process.env.AZURE_CLIENT_ID, | |
clientSecret: process.env.AZURE_CLIENT_SECRET, | |
authority: `https://login.microsoftonline.com/${process.env.AZURE_TENANT_NAME}`, | |
}, | |
system: { |
import { UserAgentApplication } from 'msal'; | |
const app = new UserAgentApplication({ | |
auth: { | |
clientId: process.env.AZURE_CLIENT_ID, | |
authority: `https://login.microsoftonline.com/${process.env.AZURE_TENANT_ID}` | |
}, | |
cache: { | |
cacheLocation: 'localStorage' | |
} |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"> | |
<title>kraft</title> | |
<style> | |
body { | |
font-size: 50vw; | |
font-family: sans-serif; |
const fs = require('fs') | |
const JSON5 = require('./') | |
// eslint-disable-next-line node/no-deprecated-api | |
require.extensions['.json5'] = function (module, filename) { | |
const content = fs.readFileSync(filename, 'utf8') | |
try { | |
module.exports = JSON5.parse(content) | |
} catch (err) { | |
err.message = filename + ': ' + err.message |
// -----> server | |
server <- function(input, output, session) { | |
loggedIn <- callModule(authorize, 'login') | |
observe({ | |
req(loggedIn()) | |
callModule(startApp, 'dashboard') | |
}) |
<!-- ORIGINAL XML FEED --> | |
<article id="capi.fvn.698705" pubDate="2017-03-07 09:34:46" skin="theme-News section-Nyheter story-olsen-bil-saken shortId-blQkl paywall-closed" title="Olsen Bil-saken: Personlig gjeld på 28 mill. kroner"> | |
<![CDATA[ | |
<a href="http://www.fvn.no/okonomi/Olsen-Bil-saken-Personlig-gjeld-pa-28-mill-kroner-698705b.html"><img src="https://fvn.mnocdn.no/images/6cfcea78-5508-4e64-852c-190768acdafb?fit=crop&q=80&w=2048"/></a><h3><a href="http://www.fvn.no/okonomi/Olsen-Bil-saken-Personlig-gjeld-pa-28-mill-kroner-698705b.html">Olsen Bil-saken: Personlig gjeld på 28 mill. kroner</a></h3> <p>Geir Egil Olsens personlige konkurs har så langt resultert i krav på 28 millioner kroner. Blant de største kreditorene er foreldrene hans. </p> | |
]]> | |
</article> | |