freedesktop_org
Library implementation of some Freedesktop.org standards
Summary
| Latest Version | Unknown |
|---|---|
| License | Unlicense |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:25 |
Tags
Installation
nimble install freedesktop_org
choosenim install freedesktop_org
git clone https://git.sr.ht/~ehmry/freedesktop_org
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| freedesktop_org | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://git.sr.ht/~ehmry/freedesktop_org |
|---|---|
| Homepage | https://git.sr.ht/~ehmry/freedesktop_org |
| Registry Source | nimble_official |
README
freedesktop_org
Some Nim procedures for looking up freedesktop.org data.
Samples
let path = "freedesktop_org.html"
let exec = defaultApplicationExec("text/html", path)
assert exec == @["firefox freedesktop_org.html"]
assert mimeTypeOf(path) == @["text/html", "application/xhtml+xml"]
let data = newStringStream(readFile path)
assert mimeTypeOf(data) == @["application/xhtml+xml", "text/html", "application/xml"]
Alternatives
Filetype
The filetype library also provides MIME type detection but ships with its own heuristics. This makes it work without relying on system MIME database but the standard freedesktop.org.xml file already comes with more MIME types than provided by the filetype library.
std/mimetypes
The Nim standard library has a library with Mime-type to filename-extension mappings but is also not extensible at runtime.
Acknowledgment
This library was initially written as part of the ERIS standardization project. As such this library was indirectly funded by NGI Assure, a fund established by NLnet with financial support from the European Commission's Next Generation Internet program.