Socket
Socket
Sign inDemoInstall

activitystreams2-spec-scraped

Package Overview
Dependencies
288
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    activitystreams2-spec-scraped

[![Build Status](https://travis-ci.com/gobengo/activitystreams2-spec-scraped.svg?branch=master)](https://travis-ci.com/gobengo/activitystreams2-spec-scraped)


Version published
Weekly downloads
3
decreased by-70%
Maintainers
1
Install size
75.6 MB
Created
Weekly downloads
 

Readme

Source

activitystreams2-spec-scraped

Build Status

Scrape data from the ActivityStreams 2.0 specs:

Why?

  • Test libraries that deal with ActivityStreams2 data, e.g. to make sure the library fully models every vocab term. This was the original motivation: to help test gobengo/activitystreams2
  • generate code for libraries in other languages. go-fed/activity did this because the polymorphic nature of ActivityStreams 2.0 / JSON-LD data makes it hard to model in golang's type system
  • render better documentation for ActivityStreams 2.0. Right now the canonical documentation is in a couple huge html files, but it might be easier to maintain HTML docs (ideally with RDFa metadata) if rendered from less messy data like the JSON this library generates.

Usage

node.js/TypeScript

import { scrapeVocabulary, vocabularySpecUrl } from "activitystreams2-spec-scraped"

(async () => {
  let v

  // This will load from a fixture and *will not* make an http request
  v = await scrapeVocabulary()

  // Provide a URL to fetch the html from there, then parse
  v = await scrapeVocabulary(vocabularySpecUrl)

  console.log(v)
})()

Command Line Interface

  • npx activitystreams2-spec-scraped
  • npm install -g activitystreams2-spec-scraped && activitystreams2-spec-scraped
  • Clone repo and npm install && npm start
$ npx activitystreams2-spec-scraped

The output is big!. See ./data/ for a full example.

FAQs

Last updated on 12 Sep 2018

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc