
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
archieml-pipe
Advanced tools
Pipe a Google Doc with ArchieML data to local JSON with easy authentication steps.
archieml-pipe is a library to help easily export data structured in ArchieML in Google Docs to local JSON. You can then use that data as context to render HTML templates.
We use this library in order to separate the function of writing and editing text from producing interactive content for the web in the POLITICO newsroom.
Read all about how to use ArchieML, then see how you can use this library to easily authenticate and export structured data from Google Docs.
Use archieml-pipe in your build system:
const gulp = require('gulp');
const archiePipe = require('archieml-pipe').default;
const config = {
googleDocId: '<google doc id>', // required
googleClientId: '<google client id>', // required
googleClientSecret: '<google client secret>', // required
redirectPort: '6006', // defaults to 6006
exportPath: 'path/to/save/data.json', // defaults to ./data.json
tokenPath: 'path/to/save/token.json', // defaults to ./archie-token.json
};
gulp.task('archie', (cb) => {
archiePipe(config);
cb();
});
This example uses Gulp, but of course you can use whatever you like. Just call the function, passing it a config object with the required properties.
googleDocId
Simply open you doc in the browser and copy the ID from the URL:
Don't forget to change your share settings to "Anyone with the link can view."
googleClientId
Go to the Google Developers Console and create a new project.
Create credentials for an OAuth client ID.
Select "Web Application" for the Application Type, and give your client a name.
Add http://localhost
to Authorized JavaScript origins
Add http://localhost:6006
to Authorized Redirect URIs
Click create and copy both the client ID and client secret.
Go to the Library tab in the left rail and search for the Drive API
Click it and enable the API in the next screen.
googleClientSecret
Use the client secret key you copied out of the previous step.
On your first run, archieml-pipe will open a browser that will guide you through the Google permission dialogue to access you document, after which you will be redirected with an auth code. Copy and paste it into the prompt and archieml-pipe will save the token locally to a JSON file at tokenPath
.
archieml-pipe is cobbled together from several other great ArchieML libs, namely:
Make changes in src/
and then run $ gulp
to transpile ES6 code.
FAQs
Pipe a Google Doc with ArchieML data to local JSON with easy authentication steps.
The npm package archieml-pipe receives a total of 0 weekly downloads. As such, archieml-pipe popularity was classified as not popular.
We found that archieml-pipe demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.