https://github.com/redraw/mimelink
command-line tool to install MIME types
https://github.com/redraw/mimelink
Last synced: over 1 year ago
JSON representation
command-line tool to install MIME types
- Host: GitHub
- URL: https://github.com/redraw/mimelink
- Owner: redraw
- Created: 2016-07-01T04:14:15.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-07-01T04:14:46.000Z (about 10 years ago)
- Last Synced: 2025-01-25T17:33:18.607Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mimelink
This is just a Python command-line/module to generate and install MIME types on some GNU/Linux distributions following the (Shared MIME-info specification)[https://specifications.freedesktop.org/shared-mime-info-spec] XML format
### Install
```bash
$ git clone https://github.com/redraw/mimelink
$ cd mimelink
$ sudo chmod +x mimelink.py
$ sudo ln -s $(readlink -f mimelink.py) /usr/local/bin/mimelink
```
### Example
On command-line
```bash
$ mimelink processing-app text/x-processing *.pde *.PDE
*.pde
*.PDE
saving in /home/redraw/.local/share/mime/packages/processing-app.xml
running update-mime-database...
```
or as a Python module,
```python
from mimelink import MimeLink
m = MimeLink(name="processing-app", mimetype="text/x-processing", patterns=["*.pde", "*.PDE"])
m.link()
```
### Author notes
Beerware (?)