olivierkes / manuskript

A open-source tool for writers
http://www.theologeek.ch/manuskript
GNU General Public License v3.0
1.77k stars 234 forks source link

Add MIME type for .msk files #1049

Open EugeneUvin opened 2 years ago

EugeneUvin commented 2 years ago

Linux (Ubuntu 22.04; KDE Neon 20.04) does not seem to recognize .msk as a file type - it thinks it is a ZIP file. Is there any plan to add MIME type to make Linux recognize such files properly? изображение

TheJackiMonster commented 2 years ago

I mean technically when you use the single-file-mode, those files are just .zip-archives with the ".msk" extension. It would probably be possible to change the MIME type but I don't think it has priority since it is currently recommended to not use the single-file-mode.

EugeneUvin commented 2 years ago

I am new user and just saved the project, it defaults to single fille.

вс, 17 июл. 2022 г., 13:57 Tobias Frisch @.***>:

I mean technically when you use the single-file-mode, those files are just .zip-archives with the ".msk" extension. It would probably be possible to change the MIME type but I don't think it has priority since it is currently recommended to not use the single-file-mode.

— Reply to this email directly, view it on GitHub https://github.com/olivierkes/manuskript/issues/1049#issuecomment-1186480667, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACICUG3IN72XW2YTBSI45MLVUPRKTANCNFSM53ZF3J6A . You are receiving this because you authored the thread.Message ID: @.***>

EugeneUvin commented 2 years ago

Hi @TheJackiMonster, two comments:

  1. I was trying to find how to save it other way, and the only option is to save as .msk - could you please advise how to save it recommended way?
  2. DOCX and ODT are ZIP files, too, but they are recoginzed as MIME types. If MSK should be used in future, it should be recognized as a separate MIME type.
TheJackiMonster commented 2 years ago

If you open the settings from Manuskript, it should be the lowest option in the general settings tab under "Saving". If you don't use the single-file-mode, it wll still save a .msk file but that will only contain the version number. The data of the project will actually be stored in a folder next to it with the same name.

I will probably need to check the default settings again because it should actually not default to the single-file-mode anymore.

EugeneUvin commented 2 years ago

HI @TheJackiMonster I am using Ubuntu - snap for ARM (v. 0.13.1) and flatpak for x86_64 (v. 0.14). Maybe the setting is default in Windows version? I am trying the app now and sharing that with a hobby writers group here in Lviv, Ukraine, so I'll also mention this setting to them when I figure out how to use it the best way.

TheJackiMonster commented 2 years ago

I am new user and just saved the project, it defaults to single fille.

Okay, I changed this now. So the next version will actually default to not doing that. ^^'

TheJackiMonster commented 2 years ago

2. DOCX and ODT are ZIP files, too, but they are recoginzed as MIME types. If MSK should be used in future, it should be recognized as a separate MIME type.

It seems like I can't really change/set the MIME type of the file: https://stackoverflow.com/questions/5120558/set-zipinfo-mime-type

This is something the GUI displaying file details needs to resolve by type. I assume I can look into registering a new MIME type in the OS locally though: https://stackoverflow.com/questions/30931/register-file-extensions-mime-types-in-linux

EugeneUvin commented 2 years ago

Hi @TheJackiMonster I've found the option now, thank you.

Other programs like SweetHome3D managed to have their file type as a separate one, it is recognized by the system. Based on the Stackfoverflow article, I see two scenarios:

  1. They run MIME type installation script when installing the app.
  2. They've managed to add their MIME type to some registry that is then used by all Linux distros.
TheJackiMonster commented 1 year ago

I think one issue with this is the actual packaging. Installing a MIME type description is different depending on the used packaging (native, flatpak or snap). I'll keep this issue open but I don't think it will make it for 0.15.0 if nobody else is implementing a clean script as solution to this in the next days. ^^'