.\" generated with Ronn-NG/v0.9.1 .\" http://github.com/apjanke/ronn-ng/tree/0.9.1 .TH "DECOPY" "1" "December 2022" "" .SH "NAME" \fBdecopy\fR \- Automatic debian/copyright generator .SH "SYNTAX" \fBdecopy\fR [options] [files or dirs] .SH "DESCRIPTION" Decopy is a tool that automates creating and updating the debian/copyright files\. It does this by parsing all files in a source tree, figuring out the copyright attribution and license for each file (when possible) and then structuring the output in the copyright format 1\.0\. .SH "USAGE" Simply running \fBdecopy\fR in the source tree that needs to be parsed will process all files in the tree, group them by license, wildcard those groups and generate the proper output to be written to the debian/copyright file\. .P If the source tree already includes a debian/copyright file, it will be used as input for files where the license could not be inferred, for the copyright of the debian directory and for the license snippets (which need to be filled in manually if there is no debian/copyright file)\. .P The files or directories specified as positional arguments can be used to limit the processing to the indicated subset instead of processing the complete source tree\. .SH "EXAMPLES" On top of the simple \fBdecopy\fR usage, these examples show some of the most common usecases\. Please see the following sections for detailed explanations of what each of the parameters do\. .TP \fBdecopy \-\-root src/hello\-1\.0/ \-\-output src/hello\-1\.0/debian/copyright\fR This runs the parser in the hello\-1\.0 source tree and generates the debian/copyright file in the source tree (the debian/ directory needs to pre\-exist this call)\. .TP \fBdecopy \-\-mode partial src/3rdparty/ninja\fR This shows the licensing and copyright information for the \fBsrc/3rdparty/ninja\fR directory\. Only that directory is analized and the output includes only files contained in it\. .TP \fBdecopy \-\-group\-by copyright\fR This processes the complete current source tree, paragraphs are split not only according to the licenses but also according to the copyright owners\. .TP \fBdecopy src\fR This will process the src directory but, provided debian/copyright already exists, show the complete updated debian/copyright file\. .SH "COMMON OPTIONS" .TP \fB\-\-mode \fR Indicates the mode to use when generating the output\. The \fBfull\fR mode (default) will generate a complete debian/copyright file, even if only some files were processed (the rest of the contents are taken from the original debian/copyright file)\. While the \fBpartial\fR mode will only print the copyright and licensing information for the indicated files\. .TP \fB\-\-output \fR, \fB\-o \fR Store the generated output in the indicated file\. This will overwrite the file if it already exists\. .TP \fB\-\-root \fR Process the indicated path instead of the current directory\. .SH "GROUPING CRITERIA" The generated output will always create separate paragraphs for groups of files with different licenses, additionally, it can also split paragraphs according to the following grouping options\. .TP \fB\-\-group\-by \fR When grouping by \fBlicense\fR (default), all copyright owners of different files with the same license are listed together\. When grouping by \fBcopyright\fR, each different group of copyright owners is listed separatedly (files that have the exact same list of copyright owners are listed together)\. .TP \fB\-\-split\-on\-license\fR When a subdirectory has its own license file (COPYING, LICENSE, etc), the subdirectory is given its own paragraph, even if it has the same license as the main directory\. This is the default\. .TP \fB\-\-no\-split\-on\-license\fR Even if a subdirectory has its own license file, the contents are listed together with other files in the tree that have the same license\. .TP \fB\-\-split\-debian\fR Even if the contents of the debian/ subdirectory have the same license as the main content, split it onto a separate paragraph\. This is the default\. .TP \fB\-\-no\-split\-debian\fR If the contents of the debian/ subdirectory have the same license as the main content, they are listed together\. .SH "LOG LEVEL OPTIONS" The default logging shows WARN and ERROR messages\. It can be modified with the following flags: .TP \fB\-\-debug\fR Show DEBUG, INFO, WARN and ERROR messages\. .TP \fB\-\-verbose\fR, \fB\-v\fR Show INFO, WARN and ERROR messages\. .TP \fB\-\-quiet\fR, \fB\-q\fR Show only ERROR messages\. .SH "LESS COMMON OPTIONS" .TP \fB\-\-copyright\-file \fR Specify a different copyright file to be used as a base for the processing\. Defaults to \fBdebian/copyright\fR .TP \fB\-\-text\fR Parse all files as text files, instead of using the different parsers according to the file types (e\.g\. using exiftool for images)\. .TP \fB\-\-exclude \fR, \fB\-X \fR Exclude files from being parsed\. The path can be specified as a regular expression that is matched against the full relative path for the file (e\.g\. \fB\-X '\.*\e\.jpg$'\fR to exclude all files that have the \fB\.jpg\fR extension\. or \fB\-X doc/\fR to exclude all files inside the \fBdoc/\fR directory)\. As a special case, \fBdebian/copyright\fR and \fBdebian/changelog\fR are always excluded\.\. .SH "COMPARISON WITH OTHER HELPERS" Decopy was inspired by previous copyright helpers like copyright\-helper by Modestas Vainius \fIhttps://anonscm\.debian\.org/cgit/users/modax/copyright\-helper\.git/\fR, licensecheck(1) by Jonas Smedegaard, or the copyright helper shipped with debmake(1), written by Osamu Aoki\. .P The main difference with all of them, is that decopy aims to detects as many licenses as possible, including many more that those in the other helpers, as well as the fact that it's capable of processing more than just plain text files\. .P Additionally, while it is possible to use it for the creation of the copyright file, its main usecase is to keep the copyright file updated with any changes that are done to the source tree as time passes\. .SH "AUTHORS" Decopy was written by Maximiliano Curia\. The debian packaging and this manpage were created by Margarita Manterola\. .SH "COPYRIGHT" Decopy and all the associated code and documentation are released under the ISC license\.