wsdclient

Crates.iowsdclient
lib.rswsdclient
version0.0.0
sourcesrc
created_at2019-04-23 03:39:47.699414
updated_at2019-04-23 03:39:47.699414
descriptionLibrary and command-line tool for working with WebSequenceDiagrams public API.
homepage
repositoryhttps://github.com/mkl-/wsdclient
max_upload_size
id129584
size34,720
(mkl-)

documentation

README

Crate for working with https://www.websequencediagrams.com/ public RESTful API This service allows to create sequence diagrams from simple text. Note: this library is a simple wrapper around the API. Some features of this service require premium subscription (like export to pdf format) Features supported by this library

  • statically typed library. Different options are represented as enums
  • multiple output formats: png, pdf (premium), svg (premium)
  • detection of actual output format. E.g. trying to get pdf with wrong API key leads to png output
  • allows specification of scale, paper size, paper orientation, style
  • parse returned errors

This crate contains command line tool for accessing websequencediagram API

$ wsdclient my_diag.wsd -o my.png

Example:

use wsdclient::{get_diagram};

use std::fs::File;
use std::io::Write;

fn main(){
   let spec = "A->B: text1";
   let rez = get_diagram(spec, &Default::default()).unwrap();
   File::create("simple.png").unwrap()
       .write_all(&rez.diagram).unwrap();
}
Commit count: 15

cargo fmt