How to represent multiple files in a forum post?

Jonathan Marler johnnymarler at gmail.com
Wed Feb 14 18:33:23 UTC 2018


@timotheecour and I came up with a solution to a common problem:

How to represent multiple files in a forum post?

So we decided to take a stab at creating a standard! (queue links 
to https://xkcd.com/927)

We're calling it "har" (inspired by the name tar). Here's the 
REPO: https://github.com/marler8997/har and here's what it looks 
like:

--- file1.d
module file1;

--- file2.d
module file2;

// some cool stuff

--- main.d
import file1, file2;
void main() { }

--- Makefile
main: main.d file1.d file2.d
     dmd main.d file1.d file2.d

The repo contains the standard in README.md and a reference 
implementation for extracting files from a har file (archiving 
not implemented yet).

One of the great things is when someone creates a post with this 
format, you can simply copy paste it to "stuff.har" and then 
extract it with `har stuff.har`.  No need to create each 
individual file and copy/paste the contents to each one.

Is this going to change the world? No...but seems like a nice 
solution to an minor annoyance :)


More information about the Digitalmars-d mailing list