Sourcehunt – Build a Medium Exporter + Cool New Libs!

From SitePoint
March 20, 2017 - 12:00pm
It's time for our monthly hunt for new open source libraries to use and contribute to! If you're new to Sourcehunt, it's our monthly post for promoting open source projects that seem interesting or promising and could use help in terms of Github stars or pull requests. It's our way of giving back - promoting projects that we use (or could use) so that they gain enough exposure to attract a wider audience, a powerful community and, possibly, new contributors or sponsors. We've had a lot of fantastic submissions this month, so let's dive in! rethinkphp/json-validator [28 ★] A Json Validator that designed to be elegant and easy to use. Made by the author of the Blink framework, json-validator's only purpose is to make sure a data structure conforms to the pre-defined specification. It currently supports int, double, bool, string, number, array, and object, but also lets you define fully custom types, like so: $validator->defineType('User', [ 'name' => 'string', 'gender' => 'string', 'age' => '?integer', ]); You can also define them in callables: $validator->defineType('timestamp', function ($value) { if ((!is\_string($value) && !is\_numeric($value)) || strtotime($value) === false) { return false; } $date = date\_parse($value); return checkdate($date['month'], $date['day'], $date['year']); }); The library is very new and could use contributions - everything from the docs to features needs work, so it's a great opportunity to contribute. Nerdmind/Blog [20 ★] This minimalistic and mobile-friendly blogging engine, while leaving much to be desired in the visual department, is a practical quick-fix for anyone looking to start a blog without the baggage of larger system weighing them down. It does seem somewhat like a learning experience for the author, so why not jump in, identify some issues (lots of antipatterns right off the bat), and maybe fix some while you're at it? Perhaps both of you can learn from the experience. violet-php/streaming-json-encoder [125 ★] This streaming JSON encoder lets you process and send large JSON files without hitting the memory limit. As described in the README: Streaming JSON Encoder is a PHP library that provides a set of classes to help with encoding JSON in a streaming manner, i.e. allowing you to encode the JSON document bit by bit rather tha

Continue reading this article »