Hacker News new | past | comments | ask | show | jobs | submit login

Another alternative for something like this would be MIME multipart/mixed (https://en.wikipedia.org/wiki/MIME#Multipart_messages).

That allows a text file to contain several other files. Plain text files can be included as-is (as text/plain), and binaries can be included (as application/octet-stream). Each file can be given a name through 'Content-Disposition: filename="foo.txt"'.

It can be hand-edited if you're reasonably careful. (Use boundaries, not Content-Length.)

And if any of the files would have been mergeable (with Git, etc.) as a separate file, it should also be pretty mergeable as a section of a MIME file. (Because it is included literally, and because presumably you give each one a unique filename, so the merge/diff algorithm has a unique Content-Disposition line to work with for each file.)




Would love to accept a PR adding a link to that.

There really should be one. Thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: