Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
elsiehupp opened this issue Sep 1, 2021 · 5 comments
Closed

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

elsiehupp opened this issue Sep 1, 2021 · 5 comments
Labels
bug It's a bug stale An issue that hasn't been active for a while...

Comments

@elsiehupp
Copy link
Contributor

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

  • The Get Info dialog should show something like "Kind: Joplin Export" rather than just "Kind: Document".
  • The "Open with..." should default to Joplin or at least offer Joplin as an option.
  • In the Finder, double-clicking the JEX file or selecting it and typing Cmd-O should open an import dialog or something similar in Joplin.
  • Dragging the JEX file onto the Joplin icon in the dock should open an import dialog or something similar in Joplin.
  • Selecting the JEX file and tapping the space bar should show a meaningful QuickLook preview. (Note that this is a somewhat secondary issue.)
  • The JEX file should have a specific icon, e.g. a document with a Joplin icon inside it, or an archive icon with a JEX label, rather than just a default blank document icon.

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
Copy link
Contributor Author

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
Copy link

stale bot commented Oct 2, 2021

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.

@stale stale bot added the stale An issue that hasn't been active for a while... label Oct 2, 2021
@elsiehupp
Copy link
Contributor Author

The issue is still present.

@stale stale bot removed the stale An issue that hasn't been active for a while... label Oct 2, 2021
@stale
Copy link

stale bot commented Nov 9, 2021

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.

@stale stale bot added the stale An issue that hasn't been active for a while... label Nov 9, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2022

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.

@github-actions github-actions bot closed this as completed Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug stale An issue that hasn't been active for a while...
Projects
None yet
Development

No branches or pull requests

1 participant