mime 0.2.0
Shared MIME-info Database specification implementation
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
This package provides sub packages which can be used individually:
mime:mimecache - A minimal D application.
mime:mimestore - A minimal D application.
mime:magic - A minimal D application.
mime:mimedatabase - A minimal D application.
Mime
Shared MIME-info database specification implementation in D programming language.
Generating documentation
Ddoc:
dub build --build=docs
Ddox:
dub build --build=ddox
Examples
MimeCache
Run to detect mime type of README.md or other files using mime.cache:
dub run mime:mimecache -- README.md lib/libmime.a Makefile CMakeLists.txt test.c test.C test.cpp test.xml
Run to detect mime type of files via magic rules.
dub run mime:mimecache -- --useMagic examples/mimecache/bin/mimecache lib/libmime.a
MimeDatabase
Run to detect mime types of files.
dub run mime:mimedatabase -- README.md source .gitignore lib/libmime.a examples/mimedatabase/bin/mimedatabase /var/run/acpid.socket dub.selections.json
Features
Implemented features
- Reading mime.cache files.
- Using mime.cache files to match file names against glob patterns, match data against magic rules (not fully implemented) and resolve aliases.
- Reading various files in mime/ subfolder, e.g. globs2, magic and others.
Missing features
- Reading MIME types from mime/packages sources (requires xml library).
- Determining MIME type by XMLnamespace if document is xml (requires streaming xml library).
- Registered by Roman Chistokhodov
- 0.2.0 released 8 years ago
- FreeSlave/mime
- BSL-1.0
- Copyright © 2015, Roman Chistokhodov
- Authors:
- Sub packages:
- mime:mimecache, mime:mimestore, mime:magic, mime:mimedatabase
- Dependencies:
- none
- Versions:
-
0.5.2 2020-Sep-29 0.5.1 2018-Oct-20 0.5.0 2018-Oct-10 0.4.3 2018-May-04 0.4.2 2016-Sep-26 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
349 downloads total
-
- Score:
- 0.8
- Short URL:
- mime.dub.pm