Compare commits
2 Commits
868bc9a3cf
...
6d192adce7
Author | SHA1 | Date | |
---|---|---|---|
6d192adce7 | |||
75fe42a68d |
@ -7,13 +7,13 @@ namespace ReMime.Cli
|
||||
{
|
||||
public static class Program
|
||||
{
|
||||
private const string USAGE = "remime [-r] file/directory/-...\n" +
|
||||
"remime --help for more help.";
|
||||
private const string USAGE = "refile [-r] file/directory/-...\n" +
|
||||
"refile --help for more help.";
|
||||
|
||||
private const string HELP =
|
||||
"ReMime Command Line Tool - Determine file Media Type\n" +
|
||||
"\n" +
|
||||
" remime [-r] file/directory/-...\n" +
|
||||
" refile [-r] file/directory/-...\n" +
|
||||
"\n" +
|
||||
" file infer a file\n"+
|
||||
" directory infer files in directory. Requires -r\n"+
|
||||
|
41
ReMime.ReFile/README.md
Normal file
41
ReMime.ReFile/README.md
Normal file
@ -0,0 +1,41 @@
|
||||
ReFile - Simple Tool demonstrating ReMime
|
||||
=========================================
|
||||
|
||||
```
|
||||
ReMime Command Line Tool - Determine file Media Type
|
||||
|
||||
refile [-r] file/directory/-...
|
||||
|
||||
file infer a file
|
||||
directory infer files in directory. Requires -r
|
||||
- infer from standard input.
|
||||
-r search files and folders recursively.
|
||||
-a include hidden files.
|
||||
-v verbose mode, use full paths.
|
||||
--list list known mime types. Will ignore files.
|
||||
--help show this help text.
|
||||
```
|
||||
|
||||
ReMime - Simple Media Type Resolution
|
||||
=====================================
|
||||
ReMime is a very humble library that can identify IANA media types of file
|
||||
from their file extension and its content. While being fully extensible
|
||||
with your own resolvers, ReMime will also refer to your operating system's
|
||||
file type database when resolving files.
|
||||
|
||||
Platform Caveats
|
||||
----------------
|
||||
* On Windows, the default resolver assumes your application has read access to
|
||||
the registry.
|
||||
* On Linux, not all `/etc/mime.types` syntax is supported.
|
||||
* None of this was written with MacOS in mind. But maybe it'll work?
|
||||
|
||||
Refer to `ReMime.ReFile` as an example of how to use the library. Refer to in line
|
||||
documentation and the given default resolvers as an example resolver to
|
||||
implementations.
|
||||
|
||||
Contributing
|
||||
------------
|
||||
Feel free to contribute your own file type resolvers and bug fixes. The more
|
||||
file types that can be detected accurately, the better. Currently the
|
||||
repository is available at https://git.mixedup.dev/ReFuel/ReMime. Accepting [email patches](<mailto:sht7ntgni@mozmail.com>).
|
@ -1,17 +1,43 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ReMime\ReMime.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<SelfContained>true</SelfContained>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<AssemblyName>refile</AssemblyName>
|
||||
|
||||
<!--NuGet-->
|
||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
||||
<PackageId>ReFuel.ReMime.ReFile</PackageId>
|
||||
<Version>0.1.0</Version>
|
||||
<Authors>H. Utku Maden</Authors>
|
||||
<Company>ReFuel</Company>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
|
||||
<PackageIcon>images\icon.png</PackageIcon>
|
||||
<PackageProjectUrl>https://refuel.mixedup.dev/docs/ReMime.html</PackageProjectUrl>
|
||||
<RepositoryUrl>https://git.mixedup.dev/ReFuel/ReMime</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageTags>detection; detector; type; file; mime; mime-type; media; media-type; analysis; tool; refile</PackageTags>
|
||||
<PackageDescription>
|
||||
ReMime is a very humble library that can identify IANA media types of file
|
||||
from their file extension and its content. While being fully extensible
|
||||
with your own resolvers, ReMime will also refer to your operating system's
|
||||
file type database when resolving files.
|
||||
|
||||
This is an example project a tool that will resolve the media types of the
|
||||
given list of files and directories.
|
||||
</PackageDescription>
|
||||
<PackageType>DotnetTool</PackageType>
|
||||
<PackAsTool>true</PackAsTool>
|
||||
<ToolCommandName>refile</ToolCommandName>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ReFuel.ReMime" Version="0.1.0" />
|
||||
|
||||
<Content Include="README.md" Pack="true" PackagePath="/" />
|
||||
<Content Include="../LICENSE.md" Pack="true" PackagePath="/" />
|
||||
<None Include="../remime_favicon.png" Pack="true" PackagePath="images\icon.png"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user