Skip to main content

Remove trailing white spaces from a text file.

Project description

# rm_rspace #
テキストファイルから末尾空白を取り除きます。

![example](https://user-images.githubusercontent.com/42906988/49338917-94506e00-f66c-11e8-85d1-b67351bd3e96.png)

## 対応バージョン ##
以下のバージョンで動作を確認しました。
- Python2.7
- Python3+

## インストール ##
```
pip install rm_space
```

## 使い方 ##
```
rm_rspace [-d] [-c] [-e ENCODING] FILE [NEWFILE]
```
FILE に末尾空白を取り除きたいテキストファイルを指定します。元のファイルを変更したくない場合は、NEWFILE に新しい保存先を指定してください。

### オプション ###
|オプション|説明|
|:-------:|:----:|
| -h, --help |ヘルプメッセージを表示して終了|
| -d, --display |末尾空白があった行とその行番号を表示|
| -c, --count |末尾空白を取り除いた行の数を表示|
| -e ENCODING, <br> --encoding ENCODING |指定したエンコーディングでファイルを開く <br> 省略した場合は UTF-8 で開く|

### 使用例 ###
```
$ rm_rspace -dc import.py
1 import os**
3 import random*
5 ***

3 行の末尾空白を取り除きました
```

## ライセンス ##
コードは MIT ライセンスのもとに公開しています。詳細は LICENSE.txt を参照してください。


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rm_rspace-0.0.1.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

rm_rspace-0.0.1-py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page