Skip to content

MIME type? #1877

Closed
Closed

Description

@ctrlcctrlv

I think text/sile should be registered and am using it

HTTP/1.1 200 OK
Server: nginx/1.25.2
Date: Fri, 22 Sep 2023 21:17:46 GMT
Content-Type: text/sile; charset=utf-8
Content-Length: 1750
Last-Modified: Sat, 15 Apr 2023 07:06:05 GMT
Connection: keep-alive
ETag: "643a4cdd-6d6"
X-Clacks-Overhead: GNU Terry Pratchett
X-Clacks-Overhead: GNU Natalie Portman
X-Clacks-Overhead: GNU John Keats
X-Clacks-Overhead: GNU John Galt
X-Clacks-Overhead: GNU Stephen Hawking
X-Clacks-Overhead: GNU Leonard Nimoy
X-Clacks-Overhead: GNU Terry A. Davis
X-Clacks-Overhead: GNU Aaron Swartz
X-Clacks-Overhead: GNU Alan Turing
X-Clacks-Overhead: GNU Douglas Adams
Accept-Ranges: bytes
\begin[papersize=8in x 3in]{document}
% Note: This file is intended to be compiled by scripts/each_font_specimen.sh which expects you to also have installed pdftk
\script[src=packages/complex-spaces]
\script[src=packages/color-fonts]
\script[src=packages/frametricks]
\script[src=packages/rebox]
\set[parameter=font.family,value=TT2020Base,makedefault=true]
\frame[id=specimen,left=5%pw,right=95%pw,top=5%ph,bottom=top(footnotes)]
\frame[id=specimen_overlay,left=5%pw,right=95%pw,top=5%ph,bottom=top(footnotes)]
\frame[id=arrows,left=5%pw,right=95%pw,top=5.22%ph,bottom=top(footnotes)]
\set[parameter=shaper.spaceenlargementfactor,value=1]
\frame[id=fontname,left=5%pw,right=95%pw,top=1%ph,bottom=1% + height(folio)]
\typeset-into[frame=fontname]{
\noindent\font[family=TT2020Base,size=5pt]{&&FONT&&}
\begin[filename=dist/&&FONT&&]{font}
\par \font[features=+ss01,size=3em]{&&FONTFAMILY_H&&}
\bigskip
\par \font[features=+ss01]{&&STYLE&&}
\bigskip
\par Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz
\par ÁáÀàẢảÃãẠạĂăẮắẰằẲẳẴẵẶặÂâẤấẦầẨẩẪẫẬậĐđÉéÈèẺẻẼẽẸẹÊêẾếỀềỂểỄễỆệÍíÌìỈỉĨĩỊịÓóÒòỎỏÕõỌọ
\par ÔôỐốỒồỔổỖỗỘộƠơỚớỜờỞởỠỡỢợÚúÙùỦủŨũỤụƯưỨứỪừỬửỮữỰựÝýỲỳỶỷỸỹỴỵ
\par abcdefghijklmnopqrstuvwxyz
\par 1234567890 !@#$\%&*() []{};':",./ \\ № ₿ ₱ ₹ †
\par The quick brown fox jumps over the lazy dog.
\par Laŭ Ludoviko Zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj. 
\par В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!
\end{font}
}
\end{document}
* Connection #0 to host ftp.mfek.org left intact

Activity

  1. Omikhleia commented on Sep 22, 2023

    @Omikhleia
    Member

    I am not sure why you'd need an official MIME registrations, but:

    • I don't think text/sile is appropriate: The SIL TeXLike-syntax language is one possible input language, but not necessarily the only one for SILE as a software. You could go for text/x-sil (with x- since it's not IANA-registered)
    • You might also perhaps rather consider application/x-sil (for instance) along with application/x-sil+xml for the SIL XML flavor.

    Could be good to refer to appropriate RFCs.

  2. Omikhleia commented on Sep 23, 2023

    @Omikhleia
    Member

    Also relates to #1435 because you'd need to be able to refer to a formal specification of SIL, ideally.

  3. Omikhleia commented on Sep 23, 2023

    @Omikhleia
    Member

    Aside note: seems the most common MIME types for (La)TeX are application/x-latex, application/x-tex...

  4. alerque commented on Sep 27, 2023

    @alerque
    Member

    Yes, we should standardize on a MIME type for SIL files.

    I don't think text/sile is appropriate: The SIL TeXLike-syntax language is one possible input language, but not necessarily the only one for SILE as a software.

    While is far from the only input type SILE can process, it is most definitely the only input language exclusively designed by and for SILE. In other words it would be the only MIME type unique to the project. Everything else to date and speculated is just readers for other formats.

    You could go for text/x-sil (with x- since it's not IANA-registered)

    I don't know about IANA, and hence x- or not, but sil does make some sense since it is an acrynm for SILE Input Language, not a truncation of SILE.

    You might also perhaps rather consider application/x-sil (for instance) along with application/x-sil+xml for the SIL XML flavor.

    I'm not sure this makes sense, SILE's use of XML is not a flavor. There is zero difference from valid XML to a SILE document in XML format. It isn't a variant or flavor of the XML syntax. It might be a tag schema, but it isn't a different mime type I don't think.

    In other news I'm still angling to get support added to Linguist... be sure to post SIL files in public here and there so we can prove enough usage to qualify!

  5. Omikhleia commented on Sep 27, 2023

    @Omikhleia
    Member

    I don't know about IANA

    Official registration process for new MIME types is described in various IETF RFC. Internet Assigned Numbers Authority (IANA) is part of that process.

    The alternative to x- non-registered types is a vendor prefix, e.g. what ODT (open office) or OOXML (M$) did:

    • Open Office document .odt = application/vnd.oasis.opendocument.text
    • Microsoft Word (OpenXML) .docx = application/vnd.openxmlformats-officedocument.wordprocessingml.document

    I'm not sure this makes sense, SILE's use of XML is not a flavor. There is zero difference from valid XML to a SILE document in XML format.

    This is exactly what the the +xml means, if I understand it correctly. There's one difference: It just says that it is XML (so can be linted, parsed, etc. as XML), in addition to being related to other conventions (here, being in SIL XML). Some XML-based tools might be SIL-aware in XML syntax, but not SIL-aware (in TeX-like syntax). So one might want one to know based on the MIME type, whether it get \stuff or <stuff> to handle.

    EDIT: on vendor vnd.xxx prefixes, IIRC, these also need an official registration.

  6. alerque commented on Sep 27, 2023

    @alerque
    Member

    Hmm, need to read a little on that then...

  7. Omikhleia commented on Sep 27, 2023

    @Omikhleia
    Member

    Off topic @ctrlcctrlv (lol)
    I don't think Nathalie Portman needs Claks (she is still well alive, isn't she).
    Whatever, John Horton Conway would certainly deserve one.

  8. Omikhleia commented on Sep 27, 2023

    @Omikhleia
    Member

    There is zero difference from valid XML to a SILE document in XML format.

    SIL XML can be processed out-of-the box -- Any other generic XML tag set needs additional (and non-obvious) packages for supporting it...

    And I'll go further here: SILE as of now is not able to do it properly in an easy way. You'll get low-level commands possibly overlapping with the target tag set, and no namespacing. It's not unfeasible, but you are calling for a lot troubles... Say for instance, info (our info nodes) vs DocBook's info (wholly different), or our footnote vs DocBook footnotes (nope, they don't expect the same things, and so indeed #1338 is worse than first meets the eyes...). There are solutions for this, so everything is not lost, but the current implementation is far from ideal -- because, likely, no one ever really tried to really process XML formats (a full tag set). I did try, and I hit the many issues which prove that the current route is just a quick experiment, not a general solution.

  9. ctrlcctrlv commented on Oct 2, 2023

    @ctrlcctrlv
    MemberAuthor

    (Off topic @Omikhleia ahaha the joke of that is that it's an OpenAI GitHub Copilot suggestion, see https://twitter.com/fr_brennan/status/1704616725059141956 , they all are !)

  10. locked and limited conversation to collaborators on Feb 2, 2024
  11. converted this issue into a discussion #1982 on Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionAsk for advice or investigate solutions

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions