我已经在 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 <[email protected] /cdn-cgi/l/email-protection>
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.
*/
反正。我可能可以编写一个脚本,搜索我的所有文件并用更好的注释替换第一个“//”行,但我确信有一个工具可以完美地做到这一点。
除了:我在任何地方都找不到该工具。
有人知道这样的工具吗? (或者我可能是个傻瓜?)
我最终使用了在这里找到的脚本:http://gergap.wordpress.com/2009/06/03/howto-recursively-replace-file-headers-of-source-files/ http://gergap.wordpress.com/2009/06/03/howto-recursively-replace-file-headers-of-source-files/
完全完成了我想做的工作,并且免除了我自己做的负担。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)