https://github.com/brlin-tw/clean-filter-for-xml
A clean filter for XML for Git and other applications. Currently it only beautifies the file using XMLstarlet
https://github.com/brlin-tw/clean-filter-for-xml
clean-filter git git-hooks xml
Last synced: about 2 months ago
JSON representation
A clean filter for XML for Git and other applications. Currently it only beautifies the file using XMLstarlet
- Host: GitHub
- URL: https://github.com/brlin-tw/clean-filter-for-xml
- Owner: brlin-tw
- Created: 2017-06-28T08:01:46.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-28T11:00:10.000Z (almost 9 years ago)
- Last Synced: 2025-06-04T13:48:21.516Z (about 1 year ago)
- Topics: clean-filter, git, git-hooks, xml
- Language: Shell
- Size: 18.6 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# 用於 XML 的清潔過濾器
Clean Filter for XML
[](https://travis-ci.org/Lin-Buo-Ren/Clean-Filter-for-XML)
A clean filter for XML for Git and other applications. Currently it only beautifies the file using XMLstarlet
## 依賴的軟體
Software Dependencies
Every software's executable directory should be in the shell's executable search `$PATH`
* GNU Bash as the scripting language
* XMLstarlet as the XML beautifer
## 如何使用
How to use it
Feel free to customize it according to your project configuration, the following instructions takes assumption that your working directory is at the root of your git worktree.
1. Add this repository as the repository's submodule with the following command:
git submodule\
add\
--depth=1\
'https://github.com/Lin-Buo-Ren/Clean-Filter-for-XML.git'\
'Clean Filter for XML'
1. Update required sub-submodules with the following command:
git submodule\
update\
--init\
--recursive\
"Clean Filter for XML"
1. Setup external git config with the following command:
git config\
--file .gitconfig\
filter.xml.clean\
'"./Clean Filter for XML/Clean Filter for XML.bash"'
Note that the single and double braces are required(for GNU Bash syntax, other shell may need adjustments)
1. Setup Git to read previously created external config with the following command:
git config\
--local\
include.path\
../.gitconfig
1. Add the following content in the `.gitattributes` file:
## Setup filters for XML
## Refer .gitconfig for more information
*.xml filter=xml
Add whatever filename extension that is in XML format.
1. All set! From now on all XML file check-in will be automatically be cleaned!
## 原作者
Original Author
林博仁 <>
## 智慧財產授權條款
Intellectual Property License
GNU GPLv3+
```
這個專案介紹文件是基於專案介紹文件範本
This README is based on Project README Template
http://github.com/Lin-Buo-Ren/Project-README-templates
```