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

is there a preferred mime type? #151

Closed
maybegeek opened this issue Apr 24, 2018 · 15 comments

Comments

Projects
None yet
2 participants
@maybegeek
Copy link

commented Apr 24, 2018

Hello,

is there a preferred mime type for *.csl files?

In the zotero support sites under self hosting is written they can be mime typed with "text/x-csl" so they can be imported to zotero with a click (if the zotero connector plugin for firefox is installed).
https://www.zotero.org/support/dev/citation_styles

If so, can we add this mime type to mime-db? This could make this available in github pages and mime type handling too?

thanks in advance

@rmzelle

This comment has been minimized.

Copy link
Member

commented Apr 25, 2018

I'm not sure to what extent Zotero made the transition, but we registered "vnd.citationstyles.style+xml" at IANA in 2015 for CSL styles. "text/x-csl" was previously in use by Zotero (and may still be) but is deprecated. The documentation you found is probably just outdated.

See zotero/zotero#633 and https://www.iana.org/assignments/media-types/application/vnd.citationstyles.style+xml for background.

It looks like we're already registered in mime-db (https://github.com/jshttp/mime-db/blob/0268e673c5b3cd13fb2ffae2361d3a9f91f6a4a6/db.json#L1635), but our entry doesn't have the ".csl" extension listed, so we probably should create a pull request to add that, right?

@maybegeek

This comment has been minimized.

Copy link
Author

commented Apr 25, 2018

Hi @rmzelle ,
and thanks for the quick answer.

I think we could move forward with this change.
The contributing to mime-db is not clear enough for me.

  "application/vnd.citationstyles.style+xml": {
    "source": "iana"
    "extensions": ["csl"]
  }

I think a PR is in order and as you forked mime-db already : )

thanks

@rmzelle

This comment has been minimized.

Copy link
Member

commented Apr 25, 2018

PR created at jshttp/mime-db#121.

@rmzelle

This comment has been minimized.

Copy link
Member

commented Apr 25, 2018

By the way, is there a specific use case you're thinking off that would benefit from having the correct MIME type on GitHub Pages?

(one of my personal long-time wishes is a GitHub Pages version of https://www.zotero.org/styles that's CSL-branded)

@rmzelle

This comment has been minimized.

Copy link
Member

commented Apr 27, 2018

I'm not sure to what extent Zotero made the transition, but we registered "vnd.citationstyles.style+xml" at IANA in 2015 for CSL styles. "text/x-csl" was previously in use by Zotero (and may still be) but is deprecated. The documentation you found is probably just outdated.

See zotero/zotero@53449d4, by the way. In the latest Zotero version "text/x-csl" is still recognized but is marked in the code as deprecated.

@rmzelle

This comment has been minimized.

Copy link
Member

commented Apr 27, 2018

@maybegeek

This comment has been minimized.

Copy link
Author

commented Apr 28, 2018

thank you so much @rmzelle

regarding my use case ... I had much simpler thoughts. I wanted the process of importing the csl-style to be as easy as possible. I am using github pages for some styles I have tinkerd with and wanted them to be by click importable (if firefox is used).

@rmzelle

This comment has been minimized.

Copy link
Member

commented Apr 28, 2018

That makes sense. Looks like the pull request will be accepted. Not sure how long it will take afterwards for GitHub Pages to update.

@rmzelle

This comment has been minimized.

Copy link
Member

commented Apr 30, 2018

I am using github pages for some styles I have tinkerd with

@maybegeek, do you have an URL of a GitHub Pages hosted CSL style I could check?

The pull request I made at mime-db has been merged, but https://raw.githubusercontent.com/citation-style-language/styles/master/apa.csl (via https://rawgit.com/, which also uses mime-db) still shows text/plain. Maybe GitHub Pages is updated more frequently than RawGit, though.

@maybegeek

This comment has been minimized.

Copy link
Author

commented Apr 30, 2018

Hi @rmzelle

I do (still in progress, as one can see : ) )

HI-PKM

firefox -> inspect element gives me content-type: application/octet-stream, which I think should be different, if github pages' mime handling would have been automatically updated.

I asked at the GitHub support and get back here with an answer.

thanks to you!

@rmzelle

This comment has been minimized.

Copy link
Member

commented Apr 30, 2018

Thanks. I see the same content-type. I do get prompted to install the style in Zotero when I click the link, though:

image

@rmzelle

This comment has been minimized.

Copy link
Member

commented May 7, 2018

I get this in Firefox on macOS, by the way. Not sure if we broke the Zotero installation prompt, or whether this already didn't work for me on this system:

image

MIME type still looks the same.

@maybegeek

This comment has been minimized.

Copy link
Author

commented May 8, 2018

Hi there,

not getting the one-click import on Linux Mint 18.3 / Firefox 59.0.2 / Zotero 5.0.47. I followed the steps for the Zotero.desktop .local/share/applications symlink too. I can, however, select the application in the firefox download dialog and import by opening the style file with the selectable zotero application.

(importing by click works on Windows / Firefox / Zotero 5.0.47)

mime type seems to have changed on github.io:

content-type: application/vnd.citationstyles.style+xml that's a good thing : )

@rmzelle

This comment has been minimized.

Copy link
Member

commented May 8, 2018

Mmm, Firefox is still giving me "content-type | application/octet-stream", but Google Chrome says "content-type: application/vnd.citationstyles.style+xml".

Anyway, I think we can close this issue, right? I'm not sure if we need to request any changes in Zotero.

@maybegeek

This comment has been minimized.

Copy link
Author

commented May 25, 2018

Hi @rmzelle

sorry for the delay, yes, we can close this one.

Thanks!

@rmzelle rmzelle closed this Jun 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.