ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Andrew G. Klepcha" <andrew.klepcha@gmail.com>
To: community@lists.altlinux.org
Subject: Re: [Comm] Нужно пакетное переименование файлов на транслит.
Date: Fri, 1 Feb 2008 21:24:44 +0200
Message-ID: <200802012124.44587.andrew.klepcha@gmail.com> (raw)
In-Reply-To: <200802011313.18927.peet@altlinux.ru>

В сообщении от Friday 01 February 2008 12:13:18 Peter V. Saveliev написал(а):
> В сообщении от 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,
>
>
> Ну, для эстетики можно ещё кейс поменять местами.

некошерно бит отрезать. что будет если встретятся разные щ,я,ё и т.п.? 
помнится были решения в сети на эту тему...
вот например: 
http://mf.volsu.ru/pipermail/10-10/2005-August/005278.html

  reply	other threads:[~2008-02-01 19:24 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
2008-02-01 19:24   ` Andrew G. Klepcha [this message]
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=200802012124.44587.andrew.klepcha@gmail.com \
    --to=andrew.klepcha@gmail.com \
    --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