EnglishFrenchSpanish

OnWorks favicon

copyright-update - Online in the Cloud

Run copyright-update in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command copyright-update that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


copyright-update - Update Copyright information in files

SYNOPSIS


copyright-update [options] FILE [FILE ...]
copyright-update [options] --recursive PATH [PATH ...]

DESCRIPTION


Update the copyright information in set of files, possibly recursively, matching content
criteria. The updating affects copyright year, GPL address information etc.

The line must have word "Copyright", a space, three characters '(C)' (or a U+00A9 UTF
copyright sign), a space, and the range of years. Varying amount of spaces and tabs are
permitted, but there must be no spaces around the dash-character in YEAR-YEAR. Examples:

A whitespace, or multiple, required
| | No space between years
| | |
Copyright (C) YYYY-YYYY
Copyright: (C) YYYY-YYYY
|
A colon is optional

By default certain files and paths are always ignored; like version control directories,
backups files, object files and binary files according to Perl's "-T" file test. Run
program with option --help-exclude to see exclude path list.

OPTIONS


Run options
-a, --auto
In automatic mode, the author's name is read from environment variable NAME and only
lines matching 'Copyright.*$NAME' are affected. If NAME is not set, read information
from EMAIL.

If neither NAME nor EMAIL exists in evenvironemt, or if their values are not in a
recognizable formats (see section ENVIRONMENT), this options does nothing.

This option effectively tries to preset value for the --line option.

-c, --code
Preset --include to match common code files: .c, .h, .cc, .hh, .cpp, .c++, .hpp, .C,
.pl, .py, .sh and .rb

-d, --debug LEVEL
Turn on debug. Level can be in range 0-10.

-f, --fsf-address
Change License paragraphs that refer to FSF address. The FSF's current recommendation
is to redirect inquiries about licences to their URL.

Effectively replace paragraphs:

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

You should have received a copy of the GNU General Public License
along with this package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301USA

With this:

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

-i, --include REGEXP
Include files matching regexp. The match is done against whole path.

If this option is not supplied, every file is automatically included. The matches can
be further filtered by using option --exclude.

This option can be used multiple times. See also option --code.

-l, --line REGEXP
Change only lines which match REGEXP. The match is case-insensitive.

-r, --recursive
Recursively search all directories given in command line.

-R, --regexp REGEXP
Change only files whose content matches REGEXP. The file is read in as a one big
string so that it's possible to match using Perl regular expressions across the whole
file. An example: '(?smi)This.*multi.*line.*match'. See perlre(1) for more information
about 'smi' and other modifiers.

This option can be used as a preliminary Content criteria, to select files before
--line option finds the correct Copyright lines.

-t, --test, --dry-run
Run in test mode. Show what would happen. No files are changed.

-v, --verbose LEVEL
Print informational messages. Increase numeric LEVEL for more verbosity.

-x, --exclude REGEXP
Ignore files matching regexp. The match is done against whole path. The option can be
used multiple times.

This option is applied after possible --include matches.

-y, --year YEAR
Update files using YEAR. Value must be four digits.

The default operation is to use currect year, so this option is not necessary in
normal use. Use case: you plan to take a long holiday before year's end and want to
update the next year's value beforehand.

-Y, --no-year
Disable updating year.

Miscellaneus options
-h, --help
Display help.

--help-exclude
Display default values used to exclude paths and files.

--help-html
Display help in HTML format.

--help-man
Display help in manual page man(1) format.

-V, --version
Display contact and version information.

EXAMPLES


The primary use is to update files to reflect current year; option --year is implicit:

copyright-update *

To test what would happen:

copyright-update --verbose 1 --test *

Update only C-code file:

copyright-update --verbose 1 --include '\.[ch]$' --recursive .

It is possible to restrict updating files recursively to only those files whose content
match regexp. Here, the lines affected are those that match --line regular expression.

copyright-update \
--regexp '(?i)Author:.*John.*Doe' \
--line '\bFoo\b' \
--ignore '\.(bak|bup|[~#]])$' \
--verbose 1 \
--year 2013 \
--test \
--recursive \
.

TROUBLESHOOTING


See option --debug.

ENVIRONMENT


EMAIL
In the form "[email protected]"; that is, without the angles <>. If set,
the value is used in option --auto only if environment variable NAME is not set.

In order to find first and lastname, the localpart in email address must match case
insensitive regexp '^[a-z-]+\.[a-z-]+@':

[email protected] Not used, not in form First.Last
+------ +----------

[email protected] Not used, likewise
+---------------- +----------
| |
Localpart Domain part

NAME
In the form "Firstname Lastname". If set, the value is used in option --auto.

Use copyright-update online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    OfficeFloor
    OfficeFloor
    OfficeFloor provides inversion of
    coupling control, with its: - dependency
    injection - continuation injection -
    thread injection For more information
    visit the...
    Download OfficeFloor
  • 2
    DivKit
    DivKit
    DivKit is an open source Server-Driven
    UI (SDUI) framework. It allows you to
    roll out server-sourced updates to
    different app versions. Also, it can be
    used fo...
    Download DivKit
  • 3
    subconverter
    subconverter
    Utility to convert between various
    subscription format. Shadowrocket users
    should use ss, ssr or v2ray as target.
    You can add &remark= to
    Telegram-liked HT...
    Download subconverter
  • 4
    SWASH
    SWASH
    SWASH is a general-purpose numerical
    tool for simulating unsteady,
    non-hydrostatic, free-surface,
    rotational flow and transport phenomena
    in coastal waters as ...
    Download SWASH
  • 5
    VBA-M (Archived - Now on Github)
    VBA-M (Archived - Now on Github)
    Project has moved to
    https://github.com/visualboyadvance-m/visualboyadvance-m
    Features:Cheat creationsave statesmulti
    system, supports gba, gbc, gb, sgb,
    sgb2Tu...
    Download VBA-M (Archived - Now on Github)
  • 6
    Stacer
    Stacer
    Linux System Optimizer and Monitoring
    Github Repository:
    https://github.com/oguzhaninan/Stacer.
    Audience: End Users/Desktop. User
    interface: Qt. Programming La...
    Download Stacer
  • More »

Linux commands

  • 1
    7za
    7za
    7za - A file archiver with highest
    compression ratio ...
    Run 7za
  • 2
    7zr
    7zr
    7zr - A file archiver with highest
    compression ratio ...
    Run 7zr
  • 3
    cpan
    cpan
    cpan - easily interact with CPAN from
    the command line ...
    Run cpan
  • 4
    cpan2debp
    cpan2debp
    dh-make-perl - Create debian source
    packages from Perl modules ...
    Run cpan2debp
  • 5
    fweelin
    fweelin
    freewheeling � live looping musical
    instrument ...
    Run fweelin
  • 6
    fwexec
    fwexec
    fwexec - program to upload and rexecute
    image file to a connected NXT device ...
    Run fwexec
  • More »

Ad