Created
September 11, 2018 15:51
-
-
Save hector6872/13d7c3e851ead44cba264235077af56f to your computer and use it in GitHub Desktop.
extract-strings-android script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "$1" ] | |
then | |
path="." | |
else | |
path=$1 | |
fi | |
for filename in $path"/strings"*.xml; do | |
if [ -e "$filename" ] | |
then | |
echo "Extracting from... $filename" | |
sed '1,/<\/key>/! d; s/\(<[^<][^<]*>\)//g; /^$/d;' $filename > "$filename.text" | |
else | |
echo "No strings.xml files found in specified $path" | |
echo "" | |
echo "Use $0 [path]" | |
break | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment