• Stars
    star
    371
  • Rank 115,103 (Top 3 %)
  • Language
    HTML
  • License
    MIT License
  • Created almost 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Graphviz to ASCII converter using Graph::Easy

dot-to-ascii

Try it here: https://dot-to-ascii.ggerganov.com

dot-to-ascii

How it works?

API

Dot-to-ascii can be easily used in your code by performing https requests to the api.

Python

import requests


def dot_to_ascii(dot: str, fancy: bool = True):

    url = 'https://dot-to-ascii.ggerganov.com/dot-to-ascii.php'
    boxart = 0

    # use nice box drawing char instead of + , | , -
    if fancy:
        boxart = 1

    params = {
        'boxart': boxart,
        'src': dot,
    }

    response = requests.get(url, params=params).text

    if response == '':
        raise SyntaxError('DOT string is not formatted correctly')

    return response
graph_dot = '''
    graph {
        rankdir=LR
        0 -- {1 2}
        1 -- {2}
        2 -- {0 1 3}
        3
    }
'''

graph_ascii = dot_to_ascii(graph_dot)

print(graph_ascii)
                 ┌─────────┐
                 │         │
     ┌───┐     ┌───┐     ┌───┐     ┌───┐
  ┌─ │ 0 │ ─── │ 1 │ ─── │   │ ─── │ 3 │
  │  └───┘     └───┘     │   │     └───┘
  │    │                 │   │
  │    └──────────────── │ 2 │
  │                      │   │
  │                      │   │
  └───────────────────── │   │
                         └───┘

Run locally with docker

This uses the minimal Dockerfile with the default apache config etc. Not suitable for production use.

$ docker build -t dot-to-ascii .
$ docker run --rm -d --name dot-to-ascii -p 8080:80 dot-to-ascii
$ # open localhost:8080 in your browser

More Repositories

1

llama.cpp

LLM inference in C/C++
C++
66,953
star
2

whisper.cpp

Port of OpenAI's Whisper model in C/C++
C++
33,134
star
3

ggml

Tensor library for machine learning
C++
10,796
star
4

kbd-audio

🎤⌨️ Acoustic keyboard eavesdropping
C++
7,569
star
5

imtui

ImTui: Immediate Mode Text-based User Interface C++ Library
C++
2,421
star
6

wave-share

Serverless, peer-to-peer, local file sharing through sound
C++
1,955
star
7

ggwave

Tiny data-over-sound library
C++
1,496
star
8

imgui-ws

Dear ImGui over WebSockets
C++
373
star
9

hnterm

📃 Hacker News in the terminal
C++
144
star
10

ggmorse

Morse code decoding library
C++
136
star
11

whisper.spm

whisper.cpp package for the Swift Package Manager
C
120
star
12

tweet2doom

Tweet to play Doom
Shell
83
star
13

wave-gui

Yet another data-over-sound tool
C++
70
star
14

wtf-tui

Text-based UI tool for configuring the WTF terminal dashboard
C++
66
star
15

incppect

Inspect C++ memory in the browser
C++
63
star
16

ggweb

Template for C++ GUI apps that can run in the browser
C
54
star
17

ggterm

Terminal configuration for C++ development with Vim
Vim Script
34
star
18

diff-challenge

Is this even possible?
Shell
27
star
19

wordle-bg

🇧🇬 Wordle clone in Bulgarian
C++
27
star
20

hnreplies

Scrape Hacker News replies
C++
22
star
21

intervals

Downsampling array of intervals
C++
21
star
22

wave-em

Data over sound in the browser
C++
20
star
23

typing-battles

A multiplayer typing game (server: C++/WebSockets, client: JS)
C++
18
star
24

morse-meme

Meme generator in Bash
Shell
16
star
25

tweet2doom-data

@tweet2doom data and tools
JavaScript
16
star
26

ggwave-java

Minimal Java app for Android using ggwave
Java
14
star
27

ggwave-arduino

Mirror of ggwave used in the Arduino Library Manager
C++
14
star
28

imgui-em

Emscripten port of Dear ImGui (not maintained)
C++
14
star
29

ggwave-objc

Minimal Objective-C app for iOS using ggwave
Objective-C
10
star
30

ggwords

Generate language n-gram statistics
C++
10
star
31

ggerganov.github.io

JavaScript
10
star
32

imtui-template

Template repo for simple ImTui apps
C++
9
star
33

ggwave-spm

ggwave package for the Swift Package Manager
C++
8
star
34

asteroid-generator

The demo generates and renders asteroids floating in space. The shape and the texture of the generated asteroids are procedurally generated. The space background is procedurally generated as well.
C++
7
star
35

ggint

Poor man's big integer arithmetic operations
C++
6
star
36

ggsock

Non-blocking sockets wrapper
C++
5
star
37

hnguessr

Guess the Hacker News titles
C++
5
star
38

ggimg

Poor man's 2d and 3d image operations
C++
4
star
39

load-em

Load a local file in C++ Emscripten program
HTML
4
star
40

the-story

Collaborative storytelling experiment
HTML
4
star
41

tweet2btc

BTC price predictions via Twitter Polls
Shell
3
star
42

site-wave-share

A dedicated page for the wave-share tool:
JavaScript
3
star
43

ocl-lights

Pixel perfect 2D shadows on the GPU
C++
3
star
44

font-rasterizer

Simple TTF rasterizer
C
3
star
45

toto-check

See how many times you could have won the lottery
HTML
3
star
46

puzzle-solver

C++
2
star
47

OSSRH-94491

Jira
1
star
48

homebrew-ggerganov

My Homebrew tap for projects that are not notable enough
Ruby
1
star