laurent22 / joplin

Joplin - the privacy-focused note taking app with sync capabilities for Windows, macOS, Linux, Android and iOS.
https://joplinapp.org
Other
46.08k stars 5.01k forks source link

JEX export files are not associated with Joplin on macOS #5403

Closed elsiehupp closed 2 years ago

elsiehupp commented 3 years ago

Environment

Joplin version: Joplin 1.7.11 (prod, darwin) Platform: macOS OS specifics: macOS 11.4 20F71

Steps to reproduce

  1. Export notes to JEX
  2. Look at the file in the Finder
  3. Try double-clicking it or selecting it and typing Cmd-O, idk?
  4. Select the file and type Cmd-I for more information:
jex info
  1. The icon (as seen in the QuickLook popup) is a generic blank document:
blank document quicklook

Describe what you expected to happen

For comparison, if you rename the JEX archive so that it has a .tar extension, you get this icon instead (as seen in the QuickLook popup):

tar quicklook

As an extremely baseline behavior, Joplin could somehow tell the operating system that a .jex file is just a .tar file in disguise, so that double-clicking it in the Finder would extract it as a folder, as with any other archive. (I'm not sure what would be involved in doing this for systems that don't have Joplin installed.)

Logfile

N/A

Commentary

According to the macOS Document Package documentation, a document type can be registered in the application's Info.plist under CFBundleDocumentTypes and/or UTImportedTypeDeclarations. So creating a file type association may be as simple as adding a couple of XML keys. I've copied the Info.plist from The Unarchiver into a GitHub gist here as a reference example, since it specifically handles (among other things) .tar archives and assigns them custom icons.

I'm not sure what would be involved in making macOS see .jex files as .tar archives in disguise on a system without Joplin installed. Declaring an archive as a document package might involve including an XML header file of some sort in the archive, though that might only work with .zip archives and unarchived folders, idk. It's not immediately clear to me, but it might be explained in the documentation.

As for how to handle a JEX file opening itself in Joplin (e.g. triggering an import dialog), that I honestly don't know. And what amount of information to show in a QuickLook plugin is kind of a rabbit hole, as you could hypothetically go as far as implementing a fully navigable HTML render of the entire export, which, yeah... A more basic QuickLook could just have a summary of the JEX file's contents, e.g. the number of notes, the number of attachments, and maybe (maybe) a notebook table of contents.

elsiehupp commented 3 years ago

Note: while this issue is specific to macOS (and probably iOS), I'm sure similar issues could be raised for Windows, Linux, and Android. I just haven't looked into these as much, so I can't easily comment on what would be involved. For Linux, at least, you'd probably be registering a mimetype or something, idk.

stale[bot] commented 3 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

elsiehupp commented 3 years ago

The issue is still present.

stale[bot] commented 3 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

github-actions[bot] commented 2 years ago

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, feel free to create a new issue with up-to-date information.