Skip to content

Releases: hymkor/csvi

v1.10.0

01 Jun 23:34
Compare
Choose a tag to compare

Changes from v1.9.1 to v1.10.0 (English)

New features

  • Add new options:-p Protect the header line ( Config.ProtectHeader for package configuration )
  • Do not create a row contains nothing but EOF.
  • When -fixcol is set, the new row which o & O insert has all columns same as the row cursor exists

Fixed bugs

  • When -fixcol is specified
    • Fix: o and O: inserted column was always the first one of the new line
    • Fix: O: the line of cursor is incorrect before new cell text is input
  • Fix timing to close the terminal input was incorrect
    (The cause is unknown; however, the issue has not manifested)

Modifying package

  • Added a mechanism for cell input validation
  • User functions can be assigned to keys
  • Make uncsv.Cell.Original() that returns the original value before modified.
  • csvi.Result has removed rows in a field.
  • Set 14 as the default of csvi.Config.CellWidth
  • Implement csvi.Config.Edit as a function instead of csvi.Config.Main as the entry function for external packages

v1.9.1 から v1.10.0 への変更点 (日本語)

新仕様

  • 新オプション追加:-p ヘッダー行を保護 ( パッケージ用設定:Config.ProtectHeader )
  • EOF だけの行を作成しないようにした
  • -fixcol 指定時、oO で挿入される行は、カーソルのある行と同じ全列を持たせるようにした。

不具合修正

  • カラム数固定(-fixcol)の時
    • oO で入力されたテキストが記入される列がカーソルのあった列ではなく常に先頭列になっていた不具合を修正
    • O でテキストを入力する時の反転セルの行位置がずれている不具合を修正
  • 端末入力(go-tty)のクローズタイミングがおかしかった点を修正
    (なぜか問題として表面化していない)

パッケージ修正

  • セルの入力チェックの仕組みを用意
  • キーに関数を割り当てられるようにした
  • 変更前のセル値を取得する uncsv.Cell.Original() を用意した
  • csvi.Result に削除した行情報を保持させるようにした。
  • csvi.Config.CellWidth のデフォルトを14桁とした
  • 外部へのエントリ関数として、csvi.Config.Main のかわりに csvi.Config.Edit を用意

v1.9.0

08 May 10:54
Compare
Choose a tag to compare
  • Add the option -fixcol that disables keys i,a, and x not to shift columns.
  • Move the main function to the sub-package cmd/csvi to be available as a package of Go
  • Add the option -readonly that forbide changing the value of cell. When enabled, "q" shutdowns csvi immediately

  • 列をズレさせないよう、i,a,x などを無効にする オプション -fixcol を追加
  • Goパッケージとして利用できるよう、main 関数をcmd/main へ移動
  • セルの変更を禁止する -readonly オプションの追加。この時は q で確認プロンプトは出さない

v1.8.1

26 Apr 02:46
Compare
Choose a tag to compare
  • Fix: crashed on starting csvi with no arguments
  • Fix: a cell were not flipped when the cursor was in a cell with no text.
  • Fix: the foreground color was not black, but gray.
  • Change the case STDOUT or STDERR is used on no arguments to make the content of foo.txt becomes foo\r\n when executing echo "foo" | csvi -auto "w|-|q|y" > foo.txt

  • 引数なしで csvi を起動すると落ちる問題を修正
  • テキストがないセルにカーソルがある時にセルが反転しない問題を修正
  • カーソルの文字色が黒ではなく灰色になっていた不具合を修正
  • echo "foo" | csvi -auto "w|-|q|y" > foo.txt で foo.txt が foo\r\n になるように、引数ゼロ時の標準出力と標準エラー出力の使い分けを変更した。

v1.8.0

24 Apr 07:39
Compare
Choose a tag to compare
  • Update the read bytes of the status line 4 times per second while all lines have not read. Before, it was updated only on the timing user typed key
  • Reduced the number of times ERASELINE (ESC[K) is output for too slow terminal to improve the speed to update screen.

  • まだ全行読み切っていないとき、ステータスラインの読み込み済み行数欄を毎秒4回更新するようにした(今まではキー入力直後にしか更新していなかった)
  • 遅い端末向けに、ERASELINE (ESC[K) を出力する回数を削減して、表示更新速度を改善

v1.7.1

16 Apr 00:34
Compare
Choose a tag to compare
  • Set cursor ON or OFF when YES or NO is asked.
  • Fix the problem (since v1.6.0) that the cursor position could become invalid after moving from a long line to a short line, causing a crash when editing.

  • Yes/No を問い合わせる時、カーソルを On/Off するようにした。
  • 長い行から短い行に移動した後のカーソル位置が無効になることがあり、編集するとクラッシュする不具合(v1.6.0-)を修正

v1.7.0

15 Apr 02:53
Compare
Choose a tag to compare
  • Added the -auto option to enable running automated tests even without Expect-Lua. Using this option, all test programs were rewritten in PowerShell. nkf32 is no longer required for testing.
  • Added the -16le and -16be options to force interpretation as UTF-16 little-endian or big-endian encoding, respectively.
  • -semicolon: Enabled using semicolons as field delimiters (for some European locales that use commas as decimal separators). Considered allowing arbitrary delimiter strings, but decided against it to avoid potential issues.
  • -nonutf8: Added an option to handle cases where data is incorrectly interpreted as UTF-8 when it is not actually encoded that way.
  • Added the -help option to display a list of available options.
  • Increased the number of leading bytes checked to detect UTF-16 encoding from the previous value to 10 bytes.

  • Expect-Lua がなくても自動テストできるようにするためのオプション -auto を追加。これを使って、テスト用プログラムを全部 PowerShell で書き直した。テストで nkf32 も不要になった。
  • 強制的にUTF16と判断させるオプション -16le, -16be を追加
  • -semicolon: セミコロンを区切り文字列に使えるようにした(カンマを小数点と扱うような一部のヨーロッパ用:任意の区切り文字列を使えるようにしてもよかったが、無駄に増やしてもトラブル源になるため)
  • -nonutf8 : UTF8じゃないのに、UTF8扱いされてしまう時に使うオプションを追加
  • オプション一覧を表示する -help オプションを追加
  • UTF16 かどうかを判断する先読みバイト数を10バイトに拡大

v1.6.0

08 Apr 11:18
Compare
Choose a tag to compare
  • Rename from CSView to CSVI because not a few products that have the same name exist in the same category.

New features

  • Previously, users must have waited until all the lines were read, but now users can operate when the first 100 lines are read. The rest lines are read while waiting for key input.
  • Show (CURRENT-COLUMN-POSITION,CURRENT-ROW-POSITION/ALL-READ-ROWS-NUMBER) on the status line.

Fixed bugs

  • Fix: o after >: the last line was joined with the previous line in the saved file.
  • Prevent the displayed position from being incorrect even when it contains the character whose width is difficult to judge
  • Fix: the problem abortion at starting on Windows 8.1

Internal changes

  • Improve memory efficiency by holding row data with "container/list" now, those were held with slice.
  • Enable to build without env GOEXPERIMENT=rangefunc

  • 同分野に同名の製品が比較的多いため、CSView より CSVI に改名した

仕様変更

  • 今まで全行を読み込むまでユーザは待たされていたが、最初の百行を読み込んだ時点で操作できるようになった。残りの行はキー入力待ちの間に読み込むようにした
  • ステータスラインに (現在の桁位置,現在の行位置/読み込み済み全行数) を表示させるようにした

不具合修正

  • > の後の o で、最終行の前の改行コードが欠けてしまう不具合を修正
  • 幅の判定が難しい文字が現れても、表示位置がズレないよう対処した
  • Windows 8.1 で起動時にエラー終了する問題を修正した

内部の修正

  • slice で保持していた行データをcontainer/list で保持することでメモリ効率を改善した
  • env GOEXPERIMENT=rangefunc がなくともビルドできるようにした

v1.5.0

31 Mar 10:53
Compare
Choose a tag to compare
  • Support UTF16
    • Judge the file encoding UTF16 when the first two bytes are \xFE\xFF or \xFF\xFE, or \0 is one of the two bytes

  • UTF16 をサポート
    • 最初の2バイトが\xFE\xFF もしくは\xFF\xFE、あるいは2バイトのどちらかに\0 を含んでいる場合、UTF16 で記述されたCSVと判断するようにした

v1.4.0

27 Mar 04:27
Compare
Choose a tag to compare
  • Fix the problem the cache buffer for drawing did not work on v1.3.0
  • Set 1 as the default value of -h option and the first line is fixed header on default
    • To disable, use -h 0
    • Change the type uint (unsigned integer)
  • The width of the cells can be changed with -w uint
  • Even when the double quotations get redundant as the result to edit, they are not removed now
  • When inputting the save filename, the initial position of the cursor is now before the extension
  • Modifying the package uncsv
    • Rename: (Cell) ReadableSource(Cell) SourceText()
    • Implment: (Cell) Source that returns the binary value before decoding

  • v1.3.0 で画面の表示キャッシュがうまく効いていなかった不具合を修正
  • -h のデフォルト値を1とし、最初の行は常に固定ヘッダーとした
    • 抑制する場合は -h 0 とする
    • 型を符号なし整数とした
  • -w uint でセルの幅を指定できるようにした。
  • 編集の結果、ダブルクォーテーションが冗長になった場合でも削除されないようにした
  • 保存ファイル名入力の際、カーソルの初期位置を拡張子前とするようにした
  • uncsv パッケージの修正
    • (Cell) ReadableSource(Cell) SourceText() とリネーム
    • 文字コード変更前のバイナリをそのまま返す (Cell) Source メソッドを用意

v1.3.0

25 Mar 12:25
Compare
Choose a tag to compare
  • [CRLF] or [LF] in the status line now indicates the line feed code of the current line instead of the representative line feed code of the entire file.
  • Rename sub-package: csv(unbreakable-csv) to uncsv(uncsv)
  • The first few lines can now be fixed as header lines.(-h int)

  • ステータスラインの [CRLF] [LF] はファイル全体の代表改行コードではなく、現在の行の改行コードを示すようにした。
  • サブパッケージをリネーム: csv(unbreakable-csv) to uncsv(uncsv)
  • 最初の数行をヘッダー行として固定できるようにした(-h int)