Package: ceader
CeaderTool for automatically adding a header to files in the form of a comment.Based on the file extensions, Ceader detects the programming language and selects the comment character accordingly.Header sample, created bythissoftware:_                _
   ___ ___ _ __ ___| |__  _ __ ___  (_) ___
  / __/ _ \ '__/ _ \ '_ \| '__/ _ \ | |/ _ \
 | (_|  __/ | |  __/ |_) | | |  __/_| | (_) |
  \___\___|_|  \___|_.__/|_|  \___(_)_|\___/

Proprietary software created by CEREBRE.
© CEREBRE, USA. All rights reserved.
Visit us at: https://www.cerebre.ioSample output:.py file without header:print("Hello world!").py file with header:#                    _                _
#   ___ ___ _ __ ___| |__  _ __ ___  (_) ___
#  / __/ _ \ '__/ _ \ '_ \| '__/ _ \ | |/ _ \
# | (_|  __/ | |  __/ |_) | | |  __/_| | (_) |
#  \___\___|_|  \___|_.__/|_|  \___(_)_|\___/
#
#Proprietary software created by CEREBRE.
#© CEREBRE, USA. All rights reserved.
#Visit us at: https://www.cerebre.io
print("Hello world!")If the header already exists, in the same form as in the given${HEADER_PATH}file, the header will not be added a second time.InstallationFromPyPipip install ceaderExemplary cli usageceader --mode add_header --files ${FILES} --header-path ${HEADER_PATH} --extensions ${EXTENSIONS}  --prefer-multiline-comment --debug --skip-hiddenPre-commit pluginIn order to use ceader in pre-commit, the following two configs are recommended:always run on the specified files.run at certain stages (by default repo ceader usestages: all stages, check pre-commitdocumentation).Always runAdd the following configuration to your .pre-commit-config.yaml:repos:
    - repo: https://github.com/cerebre-io/ceader
        rev: 0.0.6
        hooks:
        - id: ceader
            args:[
                '--mode', ${MODE},
                '--header-path', ${HEADER_PATH},
                '--extensions', ${EXTENSIONS},
                '--debug',
                '--skip-hidden',
                '--files', ${FILES}]
            pass_filenames: falseWith this config ceader will try to change${FILES}every time.Run at certain stagesAdd the following configuration to your .pre-commit-config.yaml:repos:
    - repo: https://github.com/cerebre-io/ceader
        rev: 0.0.6
        hooks:
        - id: ceader
            args:[
                '--mode', ${MODE},
                '--header-path', ${HEADER_PATH},
                '--extensions', ${EXTENSIONS},
                '--debug',
                '--skip-hidden',
                '--files']
            stages: "add stages here"With this config ceader will try to change files provided by pre-commit on given stages.stagesis optional, because by default stages: all stagesFILESThis is the List of Paths to folders or directly to files that need to be changed. In folders, files will be searched recursively.HEADER_PATHPath to the file in .txt format with the header to be added.EXTENSIONSFiles with these extensions will be searched for in the${FILES}.The programming language will be recognized by this information and an appropriate comment will be added.
Supported extensions and languages can be foundhere.DEBUGAn optional boolean value that allows checking the status of adding headers.
If you are using precommit,verbose: truemust be provided in config.PREFER_MULTILINE_COMMENTSome languages ​​support block comments and also single comments and some of them only one type of comment.By default ceader will use try to use single comment if possible. If this is not possible it will use block comment.Use--prefer-multiline-commentif you want to reverse logic.SKIP_HIDDENAn optional boolean that allows you to ignore hidden files, even if they meet the extension condition.MODEThere are two modes at the moment:-add_headeradds the indicated header to files, if header already exists in the file it does nothing.-remove_headerremoves the indicated header to files, but only if header exists in the file.TODOuser validation (e.g: lint)files backup - pre-commit provides backup but the app itself notchange extensions arg to optional - if not used, change all files