ALT Linux Bugzilla
– Attachment 4970 Details for
Bug 25741
Translit meets enconvmv
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
enconvmv-translit
enconvmv-translit.patch (text/plain), 1.44 KB, created by
Fr. Br. George
on 2011-06-10 01:10:07 MSK
(
hide
)
Description:
enconvmv-translit
Filename:
MIME Type:
Creator:
Fr. Br. George
Created:
2011-06-10 01:10:07 MSK
Size:
1.44 KB
patch
obsolete
>--- tmp/enconvmv 2011-06-10 01:02:20.078277573 +0400 >+++ /usr/bin/enconvmv 2011-01-10 17:06:52.000000000 +0300 >@@ -15,6 +15,7 @@ > echo "Usage: $0 [-L language] [-x charset] [-r] [-q] [<directory|file>]" >&2 > echo " -L and -x take parameters just as enca(1)" >&2 > echo " -r turns on recursion" >&2 >+ echo " -t ascii transliteration (via lynx)" >&2 > echo " -q means quiet" >&2 > exit 1 > } >@@ -27,7 +28,11 @@ > > process() > { >- new="$(echo $1 | enca -L "$language" -x "$charmap" || failed="$1")" >+ if [ -z "$translit" ]; then >+ new="$(echo "$1" | enca -L "$language" -x "$charmap" || failed="$1")" >+ else >+ new="$(echo "$1" | sed 's/</\</g' | lynx -nomargins -width 256 -dump -stdin -display_charset=us-ascii -assume_charset="$charmap")" >+ fi > [ -z "$new" ] && fatal "$1 results in EMPTY converted name!" > [ "$1" != "$new" ] && { > [ -e "$new" ] && { >@@ -49,7 +54,7 @@ > > ### main() > >-TEMP=`getopt -l language:,charset:,recurse,notest,quiet,help -- +L:x:r:N:q:h "$@"` || usage >+TEMP=`getopt -l language:,charset:,recurse,notest,tranlit,quiet,help -- +L:x:r:N:t:q:h "$@"` || usage > eval set -- "$TEMP" > eval `locale -k charmap` # $charmap is current charset > # alas, language code isn't that easy >@@ -59,6 +64,7 @@ > recurse= > wrapper="echo" > failed= >+translit= > > while :; do > case "$1" in >@@ -72,6 +78,8 @@ > ;; > -N|--notest) wrapper= > ;; >+ -t|--translit) translit="lynx" >+ ;; > -q|--quiet) verbose= > ;; > -h|--help) usage
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 25741
: 4970