All Projects → mbrukman → autogen

mbrukman / autogen

Licence: Apache-2.0 license
Automatically generate boilerplate license comments.

Programming Languages

shell
77523 projects
Starlark
911 projects
emacs lisp
2029 projects
python
139335 projects - #7 most used programming language
Vim Script
2826 projects

Projects that are alternatives of or similar to autogen

Licenseplist
A license list generator of all your dependencies for iOS applications
Stars: ✭ 1,996 (+2526.32%)
Mutual labels:  license, licenses
license-ls
Get a list of licenses used by a projects dependencies
Stars: ✭ 17 (-77.63%)
Mutual labels:  license, licenses
php-legal-licenses
A utility to help generate a file containing information about dependencies including the full license text.
Stars: ✭ 62 (-18.42%)
Mutual labels:  license, licenses
Npm License Crawler
Analyzes license information for multiple node.js modules (package.json files) as part of your software project.
Stars: ✭ 168 (+121.05%)
Mutual labels:  license
Licensegenerator Ios
Build script that recursively searches for LICENSE files and generates a Settings.bundle friendly plist.
Stars: ✭ 186 (+144.74%)
Mutual labels:  license
friends-and-lovers-license
what if code i wrote was only for the people i love?
Stars: ✭ 61 (-19.74%)
Mutual labels:  license
license-checker-php
CLI tool to verify used licenses in composer dependencies
Stars: ✭ 28 (-63.16%)
Mutual labels:  license
Sbt Header
sbt-header is an sbt plugin for creating file headers, e.g. copyright headers
Stars: ✭ 166 (+118.42%)
Mutual labels:  license
python-license-check
Check python packages from requirement.txt and report issues
Stars: ✭ 111 (+46.05%)
Mutual labels:  license
eslint-plugin-license-header
Rules to validate the presence of license headers in source files.
Stars: ✭ 21 (-72.37%)
Mutual labels:  licenses
TrialLicensing
Swift framework to deal with licensing and time-based trial periods in macOS apps.
Stars: ✭ 36 (-52.63%)
Mutual labels:  license
SimpleLicensing
A Go Based Licensing System for Digital Rights Management
Stars: ✭ 96 (+26.32%)
Mutual labels:  license
Licensed
⚖️ ✔️ licensed is an interactive command line tool to help you choose and add licenses to your projects
Stars: ✭ 220 (+189.47%)
Mutual labels:  license
scancode.io
ScanCode.io is a server to script and automate software composition analysis pipelines with ScanPipe pipelines. This project is sponsored by NLnet project https://nlnet.nl/project/vulnerabilitydatabase/ Google Summer of Code, nexB and others generous sponsors!
Stars: ✭ 66 (-13.16%)
Mutual labels:  license
Copyright Header
© Copyright Header is a utility to manipulate software licenses on source code.
Stars: ✭ 168 (+121.05%)
Mutual labels:  license
License
常见的开源协议
Stars: ✭ 85 (+11.84%)
Mutual labels:  license
Carte
🍴 Open source license notice view generator for Swift
Stars: ✭ 167 (+119.74%)
Mutual labels:  license
Gradle License Plugin
Gradle plugin that provides a task to generate a HTML license report of your project.
Stars: ✭ 246 (+223.68%)
Mutual labels:  license
sandia-public-license
This is not a license of honor. No highly esteemed copyright statement is written here.
Stars: ✭ 114 (+50%)
Mutual labels:  license
software-project-blueprint
Project blueprint for Fintech Open Source Foundation hosted projects.
Stars: ✭ 21 (-72.37%)
Mutual labels:  licenses

autogen

Build Status

Automatically generate boilerplate comments and code for new files with a single command.

Install

cd ~/bin
git clone [email protected]:mbrukman/autogen.git
echo 'alias autogen=~/bin/autogen/autogen' >> ~/.bash_profile
source ~/.bash_profile

Editor support

For details on adding Autogen support to your editor, please see the editors directory.

Usage

autogen -c [copyright holder] -l [license] [filename]

Modify an existing file in-place:

autogen -i [...other params as above...]

Bulk update many existing files in-place:

find . -type f -name \*.sh -exec autogen -i --no-top-level-comment [options...] {} \;

The flag --no-top-level-comment avoids adding a comment such as:

/* TODO: High-level file comment */

because either some or all of the files have such a top-level comment, or if they don't, you probably wouldn't want to have to manually add or delete at this time, if you're just trying to add the license header in bulk.

To get a list of supported licenses, or to see the full set of flags, run autogen with no parameters.

File type or language is determined based on the full filename or extension, as appropriate. See autogen for a list of recognized file types.

The flag --no-code skips adding boilerplate code to source files.

The flag --no-runline skips adding runline to source files.

Sample outputs:

Developing

To add a new file type or feature, change autogen and add several files to the tests/testdata directory, namely:

  • <feature>.in - the input file containing command-line args to pass to autogen
  • <feature>.out - expected stdout for the test
  • <feature>.err - expected stderr for the test

To generate the *.out and *.err files automatically, just add the *.in files and run regen_testdata.sh. Then, examine the resulting *.out and *.err files.

Other custom tests can be added as separate scripts in the tests directory. Add an entry for each *_test.sh script in the tests/BUILD file, including appropriate dependencies on any data files it may need.

Testing

We use Bazel for testing:

bazel test //...

Related work

Contributing

See CONTRIBUTING.md for details.

License

Apache 2.0; see LICENSE.txt for details.

Disclaimer

This project is not an official Google project. It is not supported by Google and Google specifically disclaims all warranties as to its quality, merchantability, or fitness for a particular purpose.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].