Initial commit
This commit is contained in:
14
config/qutebrowser/theme/process.js
Normal file
14
config/qutebrowser/theme/process.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const Path = require('path')
|
||||
const fs = require('fs')
|
||||
|
||||
let target = process.argv[2]
|
||||
|
||||
let path = Path.isAbsolute(target) ? target : Path.join(process.cwd(), target)
|
||||
|
||||
let out = fs.readFileSync(path).toString('utf-8').replaceAll(
|
||||
/ <\w+ .*? id='([a-z_]+)' fill='#([A-Za-z0-9]+)'><\/\w+>/g,
|
||||
'@$1: #$2;'
|
||||
)
|
||||
.split('\n').filter(line => line.startsWith('@')).join('\n')
|
||||
|
||||
console.log(out)
|
||||
Reference in New Issue
Block a user