7

私はしばらくの間iOSプロジェクトに取り組んでいて、何百ものソースファイルを作成してきましたが、これでうまくいきました。悲しいことに気づきました。仕事に取り掛かる前に著作権ファイルテンプレートを編集すると、すべてのファイルにこのラメフォーマット:

//
//  MyClass.h
//
//  Created by Redwarp on 3/25/13.
//  Copyright (c) 2013 Redwarp. All rights reserved.
//

そして、それはクールではありません!私はそれをもっとそのようなものに置き換えたいです:

/* This software is licensed under the Apache 2 license, quoted below.

Copyright 2013 Redwarp <redwarp@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
*/

ともかく。すべてのファイルを検索し、最初の「//」行をより適切なコメントに置き換えるスクリプトを作成することもできますが、それを完全に実行するツールがあると確信しています。

例外:そのツールはどこにも見つかりません。

誰かがそのようなツールを知っていますか?(または私がばかである可能性がありますか?)

4

1 に答える 1

6

ここで見つけたスクリプトを使用することになりました:http://gergap.wordpress.com/2009/06/03/howto-recursively-replace-file-headers-of-source-files/

私がやりたかった仕事を正確に実行し、自分でそれを行う負担を軽減しました。

于 2013-04-17T09:08:36.030 に答える