All Projects → FreeSlave → Mime

FreeSlave / Mime

Licence: bsl-1.0
Shared MIME-info database in D programming language

Programming Languages

d
599 projects

Projects that are alternatives of or similar to Mime

Filetype
Fast, dependency-free, small Go package to infer the binary file type based on the magic numbers signature
Stars: ✭ 1,278 (+18157.14%)
Mutual labels:  mime, mime-types
Mimetype
A fast golang library for MIME type and file extension detection, based on magic numbers
Stars: ✭ 452 (+6357.14%)
Mutual labels:  mime, mime-types
ruby-magic
Simple interface to libmagic for Ruby Programming Language
Stars: ✭ 23 (+228.57%)
Mutual labels:  mime, mime-types
Mime
.NET wrapper for libmagic
Stars: ✭ 51 (+628.57%)
Mutual labels:  mime, mime-types
Fileio.jl
Main Package for IO, loading all different kind of files
Stars: ✭ 133 (+1800%)
Mutual labels:  mime, mime-types
Mime
The Hoa\Mime library.
Stars: ✭ 100 (+1328.57%)
Mutual labels:  mime, mime-types
Mime Types
The ultimate javascript content-type utility.
Stars: ✭ 865 (+12257.14%)
Mutual labels:  mime, mime-types
Swime
🗂 Swift MIME type checking based on magic bytes
Stars: ✭ 119 (+1600%)
Mutual labels:  mime, mime-types
mimesniff
MIME Sniffing Standard
Stars: ✭ 89 (+1171.43%)
Mutual labels:  mime, mime-types
Mime Db
Media Type Database
Stars: ✭ 612 (+8642.86%)
Mutual labels:  mime, mime-types
mimeparse-php
Basic functions for handling mime-types, forked from Joe Gregorio's mimeparse library
Stars: ✭ 38 (+442.86%)
Mutual labels:  mime
safe-svg
Enable SVG uploads and sanitize them to stop XML/SVG vulnerabilities in your WordPress website.
Stars: ✭ 129 (+1742.86%)
Mutual labels:  mime
adif
用标准c语言开发的常用数据结构和算法基础库,作为应用程序开发接口基础库,为编写高性能程序提供便利,可极大地缩短软件项目的开发周期,提升工程开发效率,并确保软件系统运行的可靠性、稳定性。
Stars: ✭ 33 (+371.43%)
Mutual labels:  mime
Mail
Library to send e-mails over different transports and protocols (like SMTP and IMAP) using immutable messages and streams. Also includes SMTP server.
Stars: ✭ 399 (+5600%)
Mutual labels:  mime
mimesniffer
A MIME type sniffer for Go.
Stars: ✭ 22 (+214.29%)
Mutual labels:  mime
fs2-mail
asynchronous library for sending and receiving mail via fs2._
Stars: ✭ 39 (+457.14%)
Mutual labels:  mime
AdES
An Implementation of CAdES, XAdES, PAdES and ASiC for Windows in C++
Stars: ✭ 29 (+314.29%)
Mutual labels:  mime
MimeTypesMap
Simple dictionary provides a few methods to lookup mime type/extension, generated From Apache's mime.types.
Stars: ✭ 25 (+257.14%)
Mutual labels:  mime-types
Ruby Mime Types
Ruby MIME type registry library
Stars: ✭ 288 (+4014.29%)
Mutual labels:  mime-types
go
Monorepo for small Go modules maintained by Tawesoft
Stars: ✭ 16 (+128.57%)
Mutual labels:  mime

Mime

Shared MIME-info database specification implementation in D programming language. Shared MIME-info database helps to determine media type of file by its name or contents.

Build Status Coverage Status

Online documentation

Features

Implemented features

  • Reading and using mime.cache files to match file names against glob patterns, match file contents against magic rules, resolve aliases and find mime type parents.
  • Reading various shared MIME-info database files in mime/ subfolder, e.g. globs2, magic and others.
  • treemagic support.
  • Reading MIME types from mime/packages sources and mime/MEDIA folders.
  • Determining MIME type by XMLnamespace if document is xml.

Examples

Mime Database

Run to detect mime types of files.

dub examples/database.d detect README.md source .gitignore lib/libmime.a /bin/sh /var/run/acpid.socket dub.json /dev/sda

Automated mime path detection works only on Freedesktop platforms. On other systmes or for testing purposes it's possible to use mimepath option to set alternate path to mime/ subfolder. E.g. on Windows with KDE installed it would be:

dub examples/database.d --mimepath=C:\ProgramData\KDE\share\mime detect README.md source .gitignore lib/mime.lib C:/Windows/System32/notepad.exe dub.json

Run to print info about MIME types:

dub examples/database.d info application/pdf application/x-executable image/png text/plain text/html text/xml

Run to resolve aliases:

dub examples/database.d resolve application/wwf application/x-pdf application/pgp text/rtf text/xml

Mime Test

Run to test if this library is capable of parsing your local shared MIME-info database:

dub examples/test.d

Run to see names of parsed files:

dub examples/test.d --verbose

As with mimedatabase example you may specify paths to mime folder(s) via command line:

dub examples/test.d --mimepath=C:\ProgramData\KDE\share\mime
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].