Removed Python script used earlier with Bash

This commit is contained in:
DarkCat09 2022-12-30 15:58:23 +04:00
parent b4cc751b6d
commit 4c54e1e62f

View file

@ -1,26 +0,0 @@
#!/usr/bin/env python3
import re
import sys
SCRIPTS = r'((<script src="js/\w+\.js"></script>[\s\r\n]+)+)'
MINJS = '<script src="{}"></script>'
LESSJS = '<script src="https://cdn.jsdelivr.net/npm/less"></script>'
STYLES = '<link rel="stylesheet/less" type="text/css" href="styles.less" />'
CSS = '<link rel="stylesheet" href="{}" />'
def main():
stdin = sys.stdin.read()
conv = re.sub(SCRIPTS, MINJS.format(sys.argv[1]), stdin)
conv = conv.replace(LESSJS, '')
conv = conv.replace(STYLES, CSS.format(sys.argv[2]))
sys.stdout.write(conv)
if __name__ == '__main__':
main()