Artwork + copying of password.
This commit is contained in:
1168
Scripts/bashlib
Normal file
1168
Scripts/bashlib
Normal file
File diff suppressed because it is too large
Load Diff
60
Scripts/checkLocalization
Executable file
60
Scripts/checkLocalization
Executable file
@@ -0,0 +1,60 @@
|
||||
#! /usr/bin/env bash
|
||||
source bashlib
|
||||
|
||||
isIn() {
|
||||
local key=$1; shift
|
||||
|
||||
for value
|
||||
do [[ $value = "$key" ]] && return; done
|
||||
}
|
||||
|
||||
cd "${0%/*}/../../"
|
||||
|
||||
emit "Enumerating localization keys"
|
||||
code=$(find Classes -type f -exec grep -o 'NSLocalizedString(@"[^"]*"' {} + | sed -n 's/.*\("[^"]*"\).*/\1/p' | sort -bu)
|
||||
for l in Resources/*.lproj/Localizable.strings; do
|
||||
k=${l#*/}; k=${k%%/*}
|
||||
emit " - Found language: ${k%.lproj}"
|
||||
|
||||
lang+=( "$k" )
|
||||
lprojLocal+=( "$(sed -n '/\/\/[^"]*\[REMOTE\][^"]*$/!s/^\("[^"]*"\).*/\1/p' "$l" | sort -bu)" )
|
||||
lprojAll+=( "$(sed -n 's/^\("[^"]*"\).*/\1/p' "$l" | sort -u)" )
|
||||
done
|
||||
|
||||
allhealthy=1
|
||||
healthy=1
|
||||
echo; emit "Looking for unused localization keys"
|
||||
for l in "${!lang[@]}"; do
|
||||
while read; do
|
||||
(( healthy )) && emit -y "Not used in code or marked '// [REMOTE]':"
|
||||
allhealthy=0
|
||||
healthy=0
|
||||
emit -y " ${lang[l]}: ${REPLY##*([[:space:]])} "
|
||||
done < <(comm -1 -3 <(printf '%s\n' "$code") <(printf '%s\n' "${lprojLocal[l]}"))
|
||||
done
|
||||
(( healthy )) && emit "No unused keys."
|
||||
|
||||
healthy=1
|
||||
echo; emit "Looking for missing localization keys"
|
||||
for l in "${!lang[@]}"; do
|
||||
chealthy=1
|
||||
while read; do
|
||||
(( chealthy )) && emit -y "Used by code:"
|
||||
allhealthy=0
|
||||
chealthy=0
|
||||
healthy=0
|
||||
emit -r " ${lang[l]}: ${REPLY##*([[:space:]])} "
|
||||
done < <(comm -2 -3 <(printf '%s\n' "$code") <(printf '%s\n' "${lprojAll[l]}"))
|
||||
khealthy=1
|
||||
while read; do
|
||||
(( khealthy )) && emit -y "Present in other languages:"
|
||||
allhealthy=0
|
||||
khealthy=0
|
||||
healthy=0
|
||||
emit -r " ${lang[l]}: ${REPLY##*([[:space:]])} "
|
||||
done < <(for ol in "${!lang[@]}"; do comm -1 -3 <(printf '%s\n' "${lprojAll[l]}") <(printf '%s\n' "${lprojAll[ol]}"); done | sort -bu)
|
||||
done
|
||||
(( healthy )) && emit "No missing keys."
|
||||
|
||||
echo
|
||||
(( allhealthy )) && emit "All good." || emit -y "Some issues detected."
|
32
Scripts/convertImages
Executable file
32
Scripts/convertImages
Executable file
@@ -0,0 +1,32 @@
|
||||
#! /usr/bin/env bash
|
||||
source bashlib
|
||||
shopt -s nullglob
|
||||
|
||||
emit "Converting iTunesArtwork"
|
||||
icons=(
|
||||
[29]="Icon-Small.png"
|
||||
[50]="Icon-Small-50.png"
|
||||
[58]="Icon-Small@2x.png"
|
||||
[57]="Icon.png"
|
||||
[72]="Icon-72.png"
|
||||
[114]="Icon@2x.png"
|
||||
)
|
||||
cd "${0%/*}/../OnePassword"
|
||||
|
||||
for size in "${!icons[@]}"; do
|
||||
file=${icons[size]}
|
||||
|
||||
emit "$file ($size px)" --
|
||||
convert "iTunesArtwork.png" -resize "${size}x${size}" "$file"
|
||||
emit -$?
|
||||
done
|
||||
|
||||
|
||||
echo
|
||||
emit "Converting @2x artwork"
|
||||
for file in !(Icon*)@2x.png; do
|
||||
emit "${file/@2x}" --
|
||||
convert "$file" -resize 50% "${file/@2x}"
|
||||
emit -$?
|
||||
done
|
||||
|
@@ -4,13 +4,13 @@ cd "${BASH_SOURCE%/*}/.."
|
||||
shopt -s extglob
|
||||
|
||||
|
||||
## Pearl
|
||||
## LisuUI
|
||||
#
|
||||
## Submodules that need to be checked out.
|
||||
dependencies=( External/Pearl External/Pearl:External/{jrswizzle,uicolor-utilities} )
|
||||
dependencies=( External/Pearl External/Pearl:External/jrswizzle External/Pearl:External/uicolor-utilities )
|
||||
|
||||
## Custom migration.
|
||||
# Nothing yet.
|
||||
# None yet.
|
||||
|
||||
|
||||
################################################################################
|
||||
|
Reference in New Issue
Block a user