123456789101112131415161718192021222324252627282930313233343536 |
- export LANG=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$'|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 '/^ *<LeftColumnVisible/d' \
- -e '/<Panes>/,/<\/Panes>/d' \
- -e '/<Table */,/>/s/ ss:StyleID="\w\+"//' \
- -e '/<Column .*\/>/d' \
- -e '/<Column /,/\/>/d' \
- -e '/<ConditionalFormatting xmlns/,/<\/ConditionalFormatting>/d' \
- -e '/<WorksheetOptions xmlns/,/<\/WorksheetOptions>/d' \
- -e '/^ *<Cell[ >]/s/ ss:StyleID="\w\+"//g' \
- -e '/^ *<Cell /,/<\/Cell>/s/ ss:StyleID="\w\+"//g' \
- -e '/^ *<Row /s/\( ss:StyleID=\)"\w\+"/\1"s1"/g' \
- -e '/^ *<Split/d'
- # /usr/bin/find 策划脚本 -name '*.xml' | xargs sed -b -i \
- git diff --name-only HEAD 策划脚本| grep '\.xml$'|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$'| while read n ;
- do
- awk -f style.awk "$n" > awk.tmp
- mv awk.tmp "$n"
- done
|