Category: FileExtension
-
FileExtension–PostMortem- part 7
It was interesting to wrote this project. At the final,it features an web site (https://fileextension.azurewebsites.net/ ) and a NuGet package ( https://www.nuget.org/packages/FileExtension/ ). Also,I have learned how to start Windows Terminal to start Angular / .NET Core / Tests wt new-tab -p “Windows PowerShell” -d . cmd /k “cd src && dotnet build && cd…
-
FileExtension–part 6 – CI/CD
So now how to make visible all those coding ? For tests –CodeCov, https://app.codecov.io/gh/ignatandrei/FileExtension hosts for free to see the coverage For documentation – ReadTheDocs, https://fileextension.readthedocs.io/en/latest/ hosts for free. For packaging – NuGEt https://www.nuget.org/packages/FileExtension/ For more detailed analysis Sonar https://sonarcloud.io/summary/overall?id=ignatandrei_FileExtension can show code smells and bugs and more GitHub actions https://github.com/ignatandrei/FileExtension/actions allows me to run all those…
-
FileExtension–Tests–part 5
The tests are the easy part. I have put some files on a folder( https://github.com/ignatandrei/FileExtension/tree/master/src/TestFileExtensions/TestFiles ) and test if the extension matches the recognizer. As NuGet packages I used FluentAssertions xunit LightBDD.XUnit2 FluentAssertion allows me to write more readable tests,like AllExtensions.Should().HaveCountGreaterThanOrEqualTo(number); LightBDD allows me to write tests in a more “business “ way : await…
-
FileExtension – GUI–part 4
Now I must do something for the people that just want to use the software. The most usual,for me,it is a .NET Core WebAPI site ( with swagger ) and an Angular frontend. You can find the sources at https://github.com/ignatandrei/FileExtension/tree/master/src . Some thoughts: For .NET Core ( see https://github.com/ignatandrei/FileExtension/tree/master/src/RecognizeFileExtWebAPI ) I use the following NuGET…
-
FileExtension–plugins–part 3
What I have more in mind is that the people can add easy their code for extensions. That means: Have an easy class to add the magic number in the header for an extension Have other people add their own implementations,not just the header Have an easy way to add the project with their code…
-
FileExtension– export data from CSV–part 2
First,is how to export data from table (https://en.wikipedia.org/wiki/List_of_file_signatures) into classes . First,the table must be transformed into a more programmatic recognizable way – like a CSV – see https://github.com/ignatandrei/FileExtension/blob/master/src/RSCG_GCK/offset0.txt Then a solution is to have into the dll ( as embedded resource or as a file) . The second solution,more complicated,is to use Roslyn Source…
-
FileExtension–idea- part 1
Every now and then we accept file uploads ( to a site ) – or we have files in outlook that we want to open – but we do not know if the extension matches the content of the file. There are numerous way to do it,however,I have been attracted by Magic Numbers – a…