forked from a-pertsev/xsl-graph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_old.py
executable file
·41 lines (30 loc) · 1.5 KB
/
run_old.py
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
39
40
41
#!/usr/bin/python
# -*- coding: utf-8 -*-
from lxml import etree, objectify
import config
import pyxsl.analyze as analyze
from pyxsl.parse import get_data_and_index, get_all_inner_xsl, get_all_ancestors
from pyxsl.pick import pickle_data_and_index, get_data_index_from_pickle
if __name__ == "__main__":
# result = etree.fromstring(""" <xsl:stylesheet
# version="1.0"
# xmlns:hh="http://schema.reintegration.hh.ru/types"
# exclude-result-prefixes="hh func"
# xmlns:func="http://exslt.org/functions"
# xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
# xmlns="http://www.w3.org/1999/xhtml"></xsl:stylesheet> """)
#
# result.extend(get_all_inner_xsl('/home/apertsev/workspace/hh.sites.main/xhh/xsl/ambient/similar-vacancy-result.xsl'))
# print etree.tostring(result, pretty_print=True)
# x
if False:
data, index = get_data_and_index(start_dir=config.ROOT_XSL_DIR)
pickle_data_and_index(data, index)
else:
data, index = get_data_index_from_pickle()
print analyze.get_not_used_xsls(data, index)
analyze.get_endpoint_xsls(data.iterkeys())
# for x in ['ambient', 'rmr', 'tut.by']:
# analyze.search_cross_platform_imports(index, config.ROOT_DIR + '/' + x)
# print analyze_modes_usage(data)
# print get_not_used_xsls(data, index)