1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- export LC_ALL=zh_CN.UTF-8@cjknarrow
- git config core.quotepath 0
- # /usr/bin/find 策划脚本 -name '*.xml' | xargs sed -b -i \
- git diff --name-only HEAD 策划脚本| grep '\.xml$'|grep -v -e 'items/Tc.xmld' -e 'monster/Monster.xmld'|xargs sed -b -i \
- -e '/^ *<Active\(Sheet\|Row\|Col\)>/d' \
- -e '/^ *<\(TopRowBottom\|LeftColumnRight\)Pane>/d' \
- -e '/^ *<Selected\/>/d' \
- -e '/^ *<Window\(Height\|Width\|TopX\|TopY\)>/d' \
- -e '/^ *<\(Last\)*Author>/d' \
- -e '/^ *<TopRowVisible/d' \
- -e '/^ *<LastSaved/d' \
- -e 's/Font html:Face="[^"]*"/Font/g' \
- -e '/^ *<FirstVisibleSheet/d' \
- -e '/^ *<LeftColumnVisible/d' \
- -e '/<Panes>/,/<\/Panes>/d' \
- -e '/<Styles>/,/<\/Styles>/d' \
- -e '/<CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office">/,/<\/CustomDocumentProperties>/d' \
- -e '/<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">/,/<\/OfficeDocumentSettings>/d' \
- -e '/<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">/,/<\/ExcelWorkbook>/d' \
- -e '/<Names>/,/<\/Names>/d' \
- -e '/<AutoFilter /,/<\/AutoFilter>/d' \
- -e '/<Table */,/>/s/ ss:StyleID="\w\+"//' \
- -e '/<Table */,/>/s/ ss:ExpandedRowCount="[0-9]*"//' \
- -e '/<Column .*\/>/d' \
- -e '/<Column /,/\/>/d' \
- -e '/<ConditionalFormatting xmlns/,/<\/ConditionalFormatting>/d' \
- -e '/<WorksheetOptions xmlns/,/<\/WorksheetOptions>/d' \
- -e '/^ *<Cell[ >].*<\/Cell>/s/ ss:StyleID="\w\+"//g' \
- -e '/^ *<Cell .*[^C][^e][^l][^l]$/,/<\/Cell>/s/ ss:StyleID="\w\+"//g' \
- -e '/^ *<Table /,/<\/Table>/s/ x:CharSet="[0-9]\+"//g' \
- -e '/^ *<Row /s/\( ss:StyleID=\)"\w\+"//g' \
- -e '/^ *<Row /s/\( ss:Height="[0-9]\+\(\.[0-9]\+\)*\)"//g' \
- -e '/^ *<Split/d'
- git diff --name-only HEAD 策划脚本| grep '\.xml$'|xargs sed -b -i \
- -e '/^ *<Window\(Height\|Width\|TopX\|TopY\)>/d'
- # /usr/bin/find 策划脚本 -name '*.xml' | xargs sed -b -i \
- git diff --name-only HEAD 策划脚本| grep '\.xml$'|grep -v -e 'items/Tc.xmld' -e 'monster/Monster.xmld'|xargs sed -b -i \
- -e '/^ *<\/Table>/a<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">'\
- '<Unsynced\/> <FrozenNoSplit\/> <SplitHorizontal>3<\/SplitHorizontal> <TopRowBottomPane>3<\/TopRowBottomPane> <SplitVertical>1<\/SplitVertical>'\
- '<LeftColumnRightPane>1<\/LeftColumnRightPane> <ActivePane>0<\/ActivePane>'\
- '\n<\/WorksheetOptions>'
- # /usr/bin/find 策划脚本 -name '*.xml' | while read n;
- git diff --name-only HEAD 策划脚本| grep '\.xml$'|grep -v -e 'items/Tc.xmld' -e 'monster/Monster.xmld'| while read n ;
- do
- awk -f style.awk "$n" > awk.tmp
- mv awk.tmp "$n"
- done
- git diff --name-only HEAD 策划脚本| grep '\.xml$'|grep -v -e 'items/Tc.xmld' -e 'monster/Monster.xmld'|xargs sed -b -i \
- -e 's/ x:Family="[^"]*"//g' \
- -e 's/ss:Data ss:Type="String" xmlns="http:[^"]*">\(.*\)<\/ss:Data>/Data ss:Type="String">\1<\/Data>/g' \
- -e '/^ *<Cell[ >].*<\/Cell>/s/ ss:StyleID="\w\+"//g'
|