Flat Editor VSCode Extension
👉🏽 👉🏽 👉🏽 Full writeup: Flat Data Project 👈🏽 👈🏽 👈🏽 Flat Editor is a VSCode extension that steps you through the process of creating a Flat Data Action, which makes it easy to fetch data and commit it to your repository. Flat Data is a GitHub action which makes it easy to fetch data and commit it to your repository as flatfiles. The action is intended to be run on a schedule, retrieving data from any supported target and creating a commit if there is any change to the fetched data. Flat Data builds on the “git scraping” approach pioneered by Simon Willison to offer a simple pattern for bringing working datasets into your repositories and versioning them, because developing against local datasets is faster and easier than working with data over the wire. UsageVSCodeTo use Flat Editor, first install the extension. If you're starting from an empty repository, invoke the VSCode Command Palette via the shortcut Cmd+Shift+P and select Initialize Flat YML File This will generate a At any given time, you can view the raw content of the underlying YML file via the View the raw YAML button in the GUI, or via the following button at the top right of your VSCode workspace. Changes to Action ConfigurationCurrently, Flat supports the ingestion of data via the two following sources:
Flat assumes that you'd like to run your workflow on a given schedule, and to that end exposes a GUI for specifying a CRON job as part of the action definition. We've selected a handful of default values, but feel free to enter any valid CRON string here. We'll even validate the CRON for you as you type! Creating an HTTP actionTo create an HTTP action, you'll be asked for the following inputs:
Creating a SQL actionTo create a SQL action, you'll be asked for the following inputs:
* Note that we will encrypt this value and create a GitHub secret in your repository for this connection string. No sensitive data will be committed to your repository. Keep in mind that your repository must have an upstream remote on github.com in order for us to create the secret. Running Your ActionAfter you've added the requisite steps to your Flat action, push your changes to your GitHub repository. Your workflow should run automatically. Additionally, under the hood, the extension lists your optional postprocessing and/or SQL query files as workflow triggers, meaning the workflow will run anytime these files change. You can run your workflows manually, too, thanks to the
Development and DeploymentDeploy a new version with: First make sure you're a part of the githubocto marketplace team here.
IssuesIf you run into any trouble or have questions, feel free to open an issue. Sharing your ❤️ GitHub OCTO License |