forked from peterbe/mincss
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_mincss
More file actions
executable file
·38 lines (31 loc) · 835 Bytes
/
run_mincss
File metadata and controls
executable file
·38 lines (31 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env python
from __future__ import print_function
import sys, os
sys.path.insert(0, os.path.abspath('.'))
from mincss.processor import Processor
URL = 'http://localhost:9000/page.html'
def run():
p = Processor()
p.process(URL)
print("INLINES ".ljust(79, '-'))
for each in p.inlines:
print("On line %s" % each.line)
print('- ' * 40)
print("BEFORE")
print(each.before)
print('- ' * 40)
print("AFTER:")
print(each.after)
print("\n")
print("LINKS ".ljust(79, '-'))
for each in p.links:
print("On href %s" % each.href)
print('- ' * 40)
print("BEFORE")
print(each.before)
print('- ' * 40)
print("AFTER:")
print(each.after)
print("\n")
if __name__ == '__main__':
run()