Scancopyright is a tool which can be used to scan copyright info of source code,you can use it to identity source code as GPL/other license or propriertary. I wrote it for the open source of our android source code. You can submit issue for improvement or questions.
Scancopyright can be run cross platform(linux/windows...) in theory,but only linux installration is tested.
Scancopyright depend on python(2.6+)/uliweb/plugs/sqlalchemy,you should install them firstly. Example steps in ubuntu:
apt-get install python-setuptools
easy_install uliweb
easy_install plugs
easy_install sqlalchemy
-
get scancopyright source code
you can get source code from github:
git clone https://github.com/zhangchunlin/scancopyright.git cd scancopyright
-
cd source code root directory
follow the "uliweb schelp" instructions to use scancopyright(the whole scan process may take a few hours for big source code project i.e. android source code):
zhangclb@zhangclb2:~/devel/scancopyright$ uliweb schelp
follow these steps to scan copyright:
- copy apps/local_settings.ini.example as apps/local_settings.ini
- modify local_settings.ini
SCAN.DIR = 'YOUR_SOURCE_CODE_PATH'
ORM.CONNECTION = 'sqlite:///DATABASE_NAME_YOU_WANT.db'
- uliweb syncdb (if you want to recreate database use: uliweb reset)
- uliweb scap (scan all path)
- uliweb scac (scan all copyright)
- uliweb scdad (decide all direcotry status)
-
Run uliweb server
uliweb runserver
-
Visit http://localhost:8000 in your browser,google chrome recommanded.
-
You can click + icon to expand the directory in tree view
-
When click a node of tree,you can go to file view
-
File exts statistics
-
Copyright tools
-
list all file copyright conflicted
-
list all copyright types ![all copyright types] [http://uliweb.cpython.org/uploads/tutorial/13/8bd589aefb0a11e1a00ff23c91df0780.png]
-
-
click the directory you want to release and √ the "Release this package" option,then click submit
-
after mark all the directory you want to release,you can see a release directory list in home page of scancopyright
-
add setting in local_settings.ini
[SCAN] DIR_EXPORT = 'DIRECTORY_PATH_YOU_WANT_TO_EXPORT'
-
then use "uliweb sceos" to export
If you want to add or modify scan rules,you should edit SCAN.RE_LIST part in apps/Scan/settings.ini ,before it you should know Regular Expression.