Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
D
Data Recovery White
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
Data Recovery White
Commits
18f5688c
Commit
18f5688c
authored
Apr 09, 2025
by
guest
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交脚本
parent
9d8a858b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
377 additions
and
6 deletions
+377
-6
GetInfo.py
app/GetInfo.py
+369
-0
test9.py
app/test9.py
+7
-0
word_file.json
app/word_file.json
+1
-6
No files found.
app/GetInfo.py
0 → 100644
View file @
18f5688c
This diff is collapsed.
Click to expand it.
app/test9.py
View file @
18f5688c
...
@@ -1471,12 +1471,19 @@ def deal_res():
...
@@ -1471,12 +1471,19 @@ def deal_res():
# styleables_attr = re.findall('<attr name="(.*?)".*?/>', i)
# styleables_attr = re.findall('<attr name="(.*?)".*?/>', i)
styleables_attr
=
re
.
findall
(
'<attr name="(.*?)".*?>'
,
i
)
# 包括单行和多行定义
styleables_attr
=
re
.
findall
(
'<attr name="(.*?)".*?>'
,
i
)
# 包括单行和多行定义
for
attr
in
styleables_attr
:
for
attr
in
styleables_attr
:
# else:
# new_attr = attr
result
=
result
.
replace
(
'<attr name="'
+
attr
+
'"'
,
'<attr name="'
+
styleable_mapping
[
attr
+
'_A'
]
+
'"'
)
result
=
result
.
replace
(
'<attr name="'
+
attr
+
'"'
,
'<attr name="'
+
styleable_mapping
[
attr
+
'_A'
]
+
'"'
)
sub_map
[
'R
\\
.styleable
\\
.'
+
styleable_id
+
'_'
+
attr
+
'(
\\
W)'
]
=
\
sub_map
[
'R
\\
.styleable
\\
.'
+
styleable_id
+
'_'
+
attr
+
'(
\\
W)'
]
=
\
'R.styleable.'
+
styleable_mapping
[
styleable_id
]
+
'_'
+
styleable_mapping
[
attr
+
'_A'
]
+
'
\\
g<1>'
'R.styleable.'
+
styleable_mapping
[
styleable_id
]
+
'_'
+
styleable_mapping
[
attr
+
'_A'
]
+
'
\\
g<1>'
sub_map
[
'app:'
+
attr
+
'='
]
=
'app:'
+
styleable_mapping
[
attr
+
'_A'
]
+
'='
sub_map
[
'app:'
+
attr
+
'='
]
=
'app:'
+
styleable_mapping
[
attr
+
'_A'
]
+
'='
sub_map
[
'
\\
?attr/'
+
attr
]
=
'?attr/'
+
styleable_mapping
[
attr
+
'_A'
]
# 新增的替换规则
sub_map
[
'
\\
?attr/'
+
attr
]
=
'?attr/'
+
styleable_mapping
[
attr
+
'_A'
]
# 新增的替换规则
sub_map
[
'<item name=
\"
'
+
attr
+
'
\"
'
]
=
'<item name=
\"
'
+
styleable_mapping
[
attr
+
'_A'
]
+
'
\"
'
# 新增的替换规则
sub_map
[
'<item name=
\"
'
+
attr
+
'
\"
'
]
=
'<item name=
\"
'
+
styleable_mapping
[
attr
+
'_A'
]
+
'
\"
'
# 新增的替换规则
# 判断 attr 是否以 "android:" 开头
if
attr
.
startswith
(
"android:"
):
new_attr
=
"android_"
+
attr
[
8
:]
# 去掉 "android:" 并替换为 "android_"
sub_map
[
'R
\\
.styleable
\\
.'
+
styleable_id
+
'_'
+
new_attr
+
'(
\\
W)'
]
=
\
'R.styleable.'
+
styleable_mapping
[
styleable_id
]
+
'_'
+
styleable_mapping
[
attr
+
'_A'
]
+
'
\\
g<1>'
sub_map
[
re
.
escape
(
i
)]
=
result
sub_map
[
re
.
escape
(
i
)]
=
result
sub_map_text
(
sub_map
)
sub_map_text
(
sub_map
)
...
...
app/word_file.json
View file @
18f5688c
...
@@ -283,7 +283,6 @@
...
@@ -283,7 +283,6 @@
"democraticedto"
,
"democraticedto"
,
"cellaredto"
,
"cellaredto"
,
"essentialedto"
,
"essentialedto"
,
"infrastructureedto"
,
"introductionedto"
,
"introductionedto"
,
"celledto"
,
"celledto"
,
"principleedto"
,
"principleedto"
,
...
@@ -774,7 +773,7 @@
...
@@ -774,7 +773,7 @@
"satisfactionedto"
,
"satisfactionedto"
,
"raceedto"
,
"raceedto"
,
"circumstanceedto"
,
"circumstanceedto"
,
"
E
uropeedto"
,
"
e
uropeedto"
,
"pupiledto"
,
"pupiledto"
,
"denyedto"
,
"denyedto"
,
"contradictionedto"
,
"contradictionedto"
,
...
@@ -3091,7 +3090,6 @@
...
@@ -3091,7 +3090,6 @@
"usefuledto"
,
"usefuledto"
,
"sighedto"
,
"sighedto"
,
"threatenedto"
,
"threatenedto"
,
"vacuumedto"
,
"valleyedto"
,
"valleyedto"
,
"evaluateedto"
,
"evaluateedto"
,
"worthedto"
,
"worthedto"
,
...
@@ -3728,7 +3726,6 @@
...
@@ -3728,7 +3726,6 @@
"diligenceedto"
,
"diligenceedto"
,
"edictedto"
,
"edictedto"
,
"epicureanedto"
,
"epicureanedto"
,
"equinoxedto"
,
"etherealedto"
,
"etherealedto"
,
"exodusedto"
,
"exodusedto"
,
"fjordedto"
,
"fjordedto"
,
...
@@ -3772,7 +3769,6 @@
...
@@ -3772,7 +3769,6 @@
"opaledto"
,
"opaledto"
,
"optimismedto"
,
"optimismedto"
,
"papyrusedto"
,
"papyrusedto"
,
"paradoxedto"
,
"phantomedto"
,
"phantomedto"
,
"phosphorescentedto"
,
"phosphorescentedto"
,
"plutoniumedto"
,
"plutoniumedto"
,
...
@@ -3785,7 +3781,6 @@
...
@@ -3785,7 +3781,6 @@
"serendipityedto"
,
"serendipityedto"
,
"solsticeedto"
,
"solsticeedto"
,
"sonorousedto"
,
"sonorousedto"
,
"spectrumedto"
,
"tachyonedto"
,
"tachyonedto"
,
"terracottaedto"
,
"terracottaedto"
,
"threnodyedto"
,
"threnodyedto"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment