https://github.com/20scoops-cnx/csv-to-string-xml-android
convert file csv to format file string.xml android
https://github.com/20scoops-cnx/csv-to-string-xml-android
android csv csv-to-xml python xml
Last synced: about 2 months ago
JSON representation
convert file csv to format file string.xml android
- Host: GitHub
- URL: https://github.com/20scoops-cnx/csv-to-string-xml-android
- Owner: 20Scoops-CNX
- License: apache-2.0
- Created: 2017-11-14T03:41:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-29T09:05:51.000Z (about 6 years ago)
- Last Synced: 2025-03-24T15:42:06.508Z (2 months ago)
- Topics: android, csv, csv-to-xml, python, xml
- Language: Python
- Homepage:
- Size: 1.49 MB
- Stars: 10
- Watchers: 2
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# csv2string-xml-android [](https://travis-ci.org/T-Jedsada/csv2string-xml-android)
Python scripts converting csv file to Android strings.xml resources multiple language 🌈
Requirements
------------`python version 3`
To satisfy requirements, run the following command:
`$ pip install lxml`
If you are not using pip in a virtualenv and want to install lxml globally instead, you have to run the above command as admin, e.g. on Linux:
`$ sudo pip install lxml`
CSV Syntax
----
* First line must have minimum 2 column [key | language-code]
* Add `#` before string for comment message in strings.xml
* Column `arg` is optional but if you provide it. It must be at last column
* You can add multi column language code[file csv example](./csv-example.csv)
Usage
-----
1. Open Terminal :joy:2. Export path in your `.bash_profile` or `.zshrc`
`export PATH=$HOME/directory_your_download_this_project/csv-to-string-xml-android/bin:$PATH`
3. Go to your directory Android Project
`cd AndroidStudio/project_name`4. Generating *.xml files multi language
`csv2xml`
Continue enter your path file csv in terminal
`Path to CSV file : "path-file-csv/csv-example.csv"`
Output
-----
...
app
└── src
└── main
└── res
├── values
│  └── strings.xml
└── values-de
│ └── strings.xml
└── values-ja
│ └── strings.xml
└── values-zh
└── strings.xmlReference
-----
- [x] android-resource-converter by pwittchen [link](https://github.com/pwittchen/android-resource-converter)
License
-----Copyright 2017 Jedsada Tiwongvorakul
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 athttp://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.