GithubHelp home page GithubHelp logo

resourcexmltoproperties's Introduction

ResourceXmlToProperties

This is a java file to transform xxx.xml to xxx.properties.

此工具用于将xml资源文件转换成properties文件。

before:

// colors.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- Palette generated by Material Palette - materialpalette.com/red/purple -->
    <color name="primary">#F44336</color>
    <color name="primary_dark">#D32F2F</color>
    <color name="primary_light">#FFCDD2</color>
    <color name="accent">#E040FB</color>
    <color name="primary_text">#500C0C</color>
    <color name="secondary_text">#3D3535</color>
    <color name="icons">#E7D5D5</color>
    <color name="divider">#948F8F</color>

    <color name="test_color_1">#246B30</color>
    <color name="text_bg_1">#E9CC65</color>
</resources>

after:

// colors.properties

primary=#F44336
primary_dark=#D32F2F
primary_light=#FFCDD2
accent=#E040FB
primary_text=#500C0C
secondary_text=#3D3535
icons=#E7D5D5
divider=#948F8F
test_color_1=#246B30
text_bg_1=#E9CC65

Usage

Transformer.kt

resourcexmltoproperties's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.