pixelmatch
FunctionScript
Our great sponsors
pixelmatch | FunctionScript | |
---|---|---|
5 | 5 | |
5,837 | 1,609 | |
1.5% | 0.7% | |
3.1 | 5.3 | |
8 months ago | 7 months ago | |
JavaScript | JavaScript | |
ISC License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pixelmatch
-
Immich - High-performance self-hosted backup photos/videos from your mobile phone (kinda like a Google Photos replacement) - Progress update July 27th, 2022. The album feature on the web is here π
I'm the dev for a javascript-based reddit bot that implements image comparisons using both pixel matching and/or perceptual hashes (that could be stored in a DB). I'd be happy to go over high-level or implementation details if its something your team would be interested in. Either on github or elsewhere.
-
JS Question
There are quite a few image comparison libraries in pure Javascript for both node and browser.
-
Show HN: Instantly create a GitHub repository to take screenshots of a web page
You could absolutely get this working with GitHub Actions with a bit of creativity.
I've been playing around with my own image-diff tool for this kind of thing, but it's not yet in a decent state: https://github.com/simonw/image-diff - there are other, better options out there such as https://github.com/mapbox/pixelmatch
Needle is an older system that did this using Selenium - updating that to work with Playwright (or Playwight via shot-scraper) would be an interesting project: https://github.com/python-needle/needle
-
Visual Regression Testing with Playwright
Internally, Playwright Test uses the pixelmatch library to compare screenshots for visual differences. It is possible to pass several options to this library, to fine-tune the comparison of images. The most important option is the threshold option, which indicates the threshold amount of differences allowed between two images.
-
An Introduction to Scraping (Almost) Anything With Puppeteer and Node.js
Other use-cases include combining screenshots with the Autocode scheduler, a file hosting platform like Box, and a package like pixelmatch to create daily screenshot diffs for regression testing.
FunctionScript
- FunctionScript: API gateway and framework to turn functions into web services
-
WebGPT: Customizable Website Chat Agent built in Node.js / JavaScript (x-post r/node)
This is no different than a repo that works on Vercel or Cloudflare workers. It is locally runnable β our gateway specification is open source at https://github.com/acode/functionscript . You can use this locally yourself via our command line tools at https://github.com/acode/cli .
-
Solving Coding Challenges with JavaScript Functions on Autocode
It's that simple to deploy reusable functions through Autocode! If you would like to dive deeper into Autocode's framework, check out FunctionScript on Github!
-
The Railsification of SaaS
You're half-right - we have a specification called FunctionScript [0] that can act as what's basically a universal translation layer for any API. You just generate a proxy to it using FunctionScript. So it's possible to add GraphQL APIs to our stdlib, it's just not convenient right now. All of Shopify is a GQL API, for example.
The reason we don't support GQL APIs natively is because we designed Autocode to follow the best practices of the top API companies we knew; Twilio and Stripe. Both companies designed their SDKs in a way that feels intuitive: a call to their API is achieved via a namespaced function call -- it's very Railslike. Everything available in our stdlib follows that convention as we felt it was the most intuitive approach to API / SDK design.
[0] https://github.com/FunctionScript/FunctionScript
-
An Introduction to Scraping (Almost) Anything With Puppeteer and Node.js
Note: To make the screenshot return as an image rather than just binary data, we must pass back the proper Content-Type header. The above code is an example of how to do this in Autocode with the object.http return type. To return other types of data, you'll need to remove the return type or change the return type to match the type of data you're returning. For more information, you can read about the FunctionScript specification Autocode uses for parameters and return types.
What are some alternatives?
odiff - The fastest pixel-by-pixel image visual difference tool in the world.
express-faas-rpc-example - How to write a FaaS in NodeJS with less than 100LoC by using MetaCall.
Cypress - Fast, easy and reliable testing for anything that runs in a browser.
KeyQL - A language and specification for building data queries using key-value pairs
loki - π Visual Regression Testing for Storybook
Strapi - π Strapi is the leading open-source headless CMS. Itβs 100% JavaScript/TypeScript, fully customizable and developer-first.
BackstopJS - Catch CSS curve balls.
lib - Autocode CLI and standard library tooling
vue-testing-library - π¦ Simple and complete Vue.js testing utilities that encourage good testing practices.
functionscript-server - Example using the FunctionScript gateway to serve APIs via Heroku
cypress-visual-regression - Module for adding visual regression testing to Cypress
TestCafe - A Node.js tool to automate end-to-end web testing.