an-prata / fileheaders Goto Github PK
View Code? Open in Web Editor NEWA small script for quickly adding headers and footers to files in a folder.
License: MIT License
A small script for quickly adding headers and footers to files in a folder.
License: MIT License
Pretty sure this line print('Is this correct? [Y/n]: ')
should instead be
print('Is this correct? [N/y]: ')
.
Afaik the larger letter implies the default input when a user hits enter, but your internal logic won't ever run the main script without the user entering a lower case 'y'
as per this logic block.
Took me a while to figure out what I was doing wrong - had to read the source.
On line 110 os.path.join(dir, file) returns a relative path for a file in the current directory regardless of if the file was in a folder or not. Should be changed to return absolute path.
When in a folder, and not excluded by file extension, files without contents, or contents of only whitespace, will not get headers or footers.
In another tag in the header/footer file you could be able to list file and folder names that you would like to apply headers and footers to, then a flat would determine whether or not to use this, and if so whether it should be used as a white or black list of files.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.