Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Header42

A simple script for ADD,UPDATE or DELETE your headers to files just with one click(or typing command). Works cross-platform for Linux,MacOS And Windows

Build & Run

To build/compile type following command in your command prompt

Make
or
CMake

And change your directory to repository path Then run ./HeaderReplacer *

cd /Desktop/Header42
./HeaderReplacer *

This command detect all .c files in root directory(Desktop/Header42) and will add headers to them. You can configure it with Flags

Flags

USER -u
Default Value: value of $USER


Source Files -f
Default Value: .c
Note: File extensions separate by , so you can specify multiple files with -f .c,.h

./HeaderReplacer -u Trou95 main.c
or
./HeaderReplacer -u Trou95 -f .c
# Both commands above is same because .c default value of -f 

This command will out main.c at /output/main.c


Output Path -o
Default Value: /output


Recursive -r
Default Value: None

With -r flag you can enable scan subdirectories recursively So if your have file structure like this;

┣ πŸ“‚Libft
┃ β”— πŸ“œft_split.c
┃ β”— πŸ“œft_strjoin.c
┃ β”— πŸ“œ...
┣ πŸ“‚Utils
┃ β”— πŸ“œutils.c
┃ ┣ πŸ“‚math
┃ β”— πŸ“œmath.c
┣ πŸ“œ.main.c

 ./HeaderReplacer -r *

After run command above will out;

  • main.c
  • output/Libft
    • ft_split.c
    • ft_strjoin.c
    • ...
  • output/Utils
  • output/Utils/math
    • math.c
  • utils.c

Header -h
Default Value: false
Add header to target files. (this flag for removing headers from files automatically)


Logging -l
Default Value: true

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /