From: "Peter V. Saveliev" <peet@altlinux.ru>
To: ALT Linux Community general discussions <community@lists.altlinux.org>
Subject: Re: [Comm] Нужно пакетное переименование файлов на транслит.
Date: Fri, 1 Feb 2008 13:13:18 +0300
Message-ID: <200802011313.18927.peet@altlinux.ru> (raw)
In-Reply-To: <47A2DCE3.5000405@mail.ru>
В сообщении от Friday 01 February 2008 11:48:35 Kudashev Mike написал(а):
> Какими средствами можно переименовывать файлы с русского на транслит?
сначала имя файла переводить в koi8-r, а потом отрезать бит:
[peet@kelisaari peet]$ echo бала не дала | iconv -f utf-8 -t koi8-r | ./bala.py
BALA NE DALA
[peet@kelisaari peet]$ cat bala.py
#!/usr/bin/python
import sys
r = ""
for i in sys.stdin.read():
r += chr(ord(i) & 127)
print r,
Ну, для эстетики можно ещё кейс поменять местами.
--
Peter V. Saveliev
next prev parent reply other threads:[~2008-02-01 10:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-01 8:48 Kudashev Mike
2008-02-01 10:13 ` Peter V. Saveliev [this message]
2008-02-01 19:24 ` Andrew G. Klepcha
2008-02-01 20:08 ` Aleksander N.Gorohovski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200802011313.18927.peet@altlinux.ru \
--to=peet@altlinux.ru \
--cc=community@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git