tokei icon indicating copy to clipboard operation
tokei copied to clipboard

Transforming input before reporting

Open Shogoki opened this issue 1 year ago • 2 comments

Hey there,

We had the need to sometimes apply some transformations on the content of code files before getting the statistics for them. Right now tokei was not really giving us the possibility to do that.

Therefor I did take a look at the code and thought this would be easy to add, without affecting any existing functionality. Would be cool if we could get that integrated into an upcoming version.

What i did is, I added another Config option, which allows to pass a function, which will transform the text content of a file before getting the statistics.

Would love to hear your thoughts, and happy to adapt the feature in a way that might suit the project better.

Shogoki avatar Feb 02 '24 12:02 Shogoki

Hey @XAMPPRocky,

Any chance you can take it a look at this and we can get this merged?

Shogoki avatar Mar 15 '24 08:03 Shogoki

Thank you for your PR! However I'm quite busy right now, so it will be quite awhile before I can review this feature addition.

XAMPPRocky avatar Mar 15 '24 08:03 XAMPPRocky