https://github.com/rsookram/axmlfmt
axmlfmt is an opinionated formatter for Android XML resources
https://github.com/rsookram/axmlfmt
android cli formatter golang xml
Last synced: 6 months ago
JSON representation
axmlfmt is an opinionated formatter for Android XML resources
- Host: GitHub
- URL: https://github.com/rsookram/axmlfmt
- Owner: rsookram
- License: apache-2.0
- Created: 2019-11-07T03:36:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-10-21T22:21:57.000Z (over 4 years ago)
- Last Synced: 2024-06-19T19:42:13.932Z (about 2 years ago)
- Topics: android, cli, formatter, golang, xml
- Language: Go
- Homepage:
- Size: 52.7 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# axmlfmt
axmlfmt is an opinionated formatter for Android XML resources. It takes XML
that looks like
```xml
```
and turns it into
```xml
```
## Install
Pre-compiled binaries of axmlfmt can be downloaded from
[the releases page](https://github.com/rsookram/axmlfmt/releases).
Alternatively, you can install it with with the
[`go` command](https://golang.org/doc/install) by running:
```shell
go install github.com/rsookram/axmlfmt/cmd/axmlfmt@latest
```
## Usage
One way you may want to use axmlfmt is to have it format all the XML files in a
git repository. This can be done with the following command:
```shell
git ls-files '*.xml' | xargs axmlfmt -w
```
The full usage description is:
```
USAGE:
axmlfmt [FLAGS] [FILE]...
FLAGS:
-h, -help, --help Prints help information
-V Prints version information
-w Writes result to (source) file instead of stdout
ARGS:
... Path of XML files to format
```
## Build
axmlfmt can be built from source by cloning this repository and using the `go`
command.
```shell
git clone https://github.com/rsookram/axmlfmt
cd axmlfmt
go build ./cmd/axmlfmt
```
License
-------
Copyright 2019 Rashad Sookram
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.