Re: hunt-markdown 1.0.0 released,

2019-02-19 Thread Sönke Ludwig via Digitalmars-d-announce

Am 19.02.2019 um 11:36 schrieb zoujiaqing:
hunt-markdown is powerfull markdown spec parsing and randering library 
for Dlang. It's fast and clean. Api design like java's commonmark library.


example code:
```import hunt.markdown.node.Node;
import hunt.markdown.parser.Parser;
import hunt.markdown.renderer.html.HtmlRenderer;

Parser parser = Parser.builder().build();
Node document = parser.parse("This is *New*");
HtmlRenderer renderer = HtmlRenderer.builder().build();
renderer.render(document);  // "This is New\n"
```

More markdown spec like this:
https://spec.commonmark.org/0.28/


Github reposirory:
https://github.com/huntlabs/hunt-markdown


Since the code appears to be a direct port from Atlassian's library, you 
should also include the BSD license file, including the original 
copyright notice 
(https://github.com/atlassian/commonmark-java/blob/master/LICENSE.txt). 
Not sure whether the Apache-2.0 license that is set in dub.sdl is 
compatible.


Personally, I would also always explicitly mention the source project 
when doing a fork like this, since it can help a lot in terms of 
communicating the exposed API, as well as the code stability to be 
expected. Also, should the project stop being maintained at some point, 
the original project may still continue to be supported, so backporting 
changes can be an option. Since we are talking about server 
applications, tracking inherited security issues can also be important, 
so documenting the version/commit on which the port is based is also a 
good idea (probably most important for hunt-http etc.).


Re: hunt-markdown 1.0.0 released,

2019-02-19 Thread Guillaume Piolat via Digitalmars-d-announce

On Tuesday, 19 February 2019 at 10:36:38 UTC, zoujiaqing wrote:
hunt-markdown is powerfull markdown spec parsing and randering 
library for Dlang. It's fast and clean. Api design like java's 
commonmark library.


example code:
```import hunt.markdown.node.Node;
import hunt.markdown.parser.Parser;
import hunt.markdown.renderer.html.HtmlRenderer;

Parser parser = Parser.builder().build();
Node document = parser.parse("This is *New*");
HtmlRenderer renderer = HtmlRenderer.builder().build();
renderer.render(document);  // "This is New\n"
```

More markdown spec like this:
https://spec.commonmark.org/0.28/


Github reposirory:
https://github.com/huntlabs/hunt-markdown


Very cool! I don't think we had a CommonMark parser.


Re: FakeD

2019-02-19 Thread Nicholas Wilson via Digitalmars-d-announce
On Tuesday, 19 February 2019 at 10:38:22 UTC, Robert Schadek 
wrote:
FakeD [2,3] is a fake data generator with support for 
localisation.

It is based on faker.js [1].
See [4] for a list of available methods.

void main() {
import std.stdio;
import faked;

auto f = new Faker(/*random seed */ 1337);

writeln(f.loremText());
writeln(f.addressCity());
writeln(f.nameName());

// localized to german
f = new Faker_de(/*random seed */ 1338);

writeln(f.loremText());
writeln(f.addressCity());
writeln(f.nameName());
}

[1] https://github.com/marak/Faker.js/
[2] https://code.dlang.org/packages/faked
[3] https://github.com/kaleidicassociates/faked
[4] https://kaleidicassociates.github.io/faked/



Faker_en_au_ocker


Strewth!


FakeD

2019-02-19 Thread Robert Schadek via Digitalmars-d-announce
FakeD [2,3] is a fake data generator with support for 
localisation.

It is based on faker.js [1].
See [4] for a list of available methods.

void main() {
import std.stdio;
import faked;

auto f = new Faker(/*random seed */ 1337);

writeln(f.loremText());
writeln(f.addressCity());
writeln(f.nameName());

// localized to german
f = new Faker_de(/*random seed */ 1338);

writeln(f.loremText());
writeln(f.addressCity());
writeln(f.nameName());
}

[1] https://github.com/marak/Faker.js/
[2] https://code.dlang.org/packages/faked
[3] https://github.com/kaleidicassociates/faked
[4] https://kaleidicassociates.github.io/faked/


hunt-markdown 1.0.0 released,

2019-02-19 Thread zoujiaqing via Digitalmars-d-announce
hunt-markdown is powerfull markdown spec parsing and randering 
library for Dlang. It's fast and clean. Api design like java's 
commonmark library.


example code:
```import hunt.markdown.node.Node;
import hunt.markdown.parser.Parser;
import hunt.markdown.renderer.html.HtmlRenderer;

Parser parser = Parser.builder().build();
Node document = parser.parse("This is *New*");
HtmlRenderer renderer = HtmlRenderer.builder().build();
renderer.render(document);  // "This is New\n"
```

More markdown spec like this:
https://spec.commonmark.org/0.28/


Github reposirory:
https://github.com/huntlabs/hunt-markdown