本帖最后由 smss 于 2019-5-16 13:36 编辑
需要处理内容如下- <?xml version="1.0" encoding="utf-8"?>
- <Lockscreen version="1" frameRate="20" screenWidth="720" displayDesktop="true" extraResourcesScreenWidth="720,1080" extraScaleByScreenWidth="1080:1.5">
- <!--绑定-->
- <VariableBinders>
- <!--电话-->
- <ContentProviderBinder name="missed_calls" uri="content://call_log/calls" columns="date,number,name,type,duration" order="date DESC" where="type=3 AND new=1"
- countName="call_count">
- <Variable name="call_name1" type="string" column="name" row="0"/>
- <Variable name="call_number1" type="string" column="number" row="0"/>
- <Variable name="call_date1" type="long" column="date" row="0"/>
- <varibale name="call_type1" type="integer" column="type" row="0"/>
- <Variable name="duration_time1" type="long" column="duration" row="0"/>
- <Variable name="call_name2" type="string" column="name" row="1"/>
- <Variable name="call_number2" type="string" column="number" row="1"/>
- <Variable name="call_date2" type="long" column="date" row="1"/>
- <varibale name="call_type2" type="integer" column="type" row="1"/>
- <Variable name="duration_time2" type="long" column="duration" row="1"/>
- </ContentProviderBinder>
- </Lockscreen>
复制代码 需要去除(包含符号)<!--之间内容--> 如 “<!--绑定-->”
颠倒代码中各元素位置 只保留首个元素不变
如<Lockscreen version="1" frameRate="20" screenWidth="720" displayDesktop="true" extraResourcesScreenWidth="720,1080" extraScaleByScreenWidth="1080:1.5">
<Lockscreen extraScaleByScreenWidth="1080:1.5" extraResourcesScreenWidth="720,1080" displayDesktop="true" screenWidth="720" frameRate="20" version="1">
将代码中的各种元素,如变量,函数,类的名字改写成无意义的名字。比如改写成单个字母,或是简短的无意义字母组合,甚至改写成“__”这样的符号,使得阅读的人无法根据名字猜测其用途。重写代码中的部分逻辑,将其变成功能上等价,但是更难理解的形式
目前只去除了换行符号- @echo off
- setlocal enabledelayedexpansion
- (for /f "delims=" %%i in ('type "1.txt"') do (
- set /p =%%i<nul
- ))>"2.txt"
复制代码
|