{"id":16947022,"url":"https://github.com/mainro/dooble","last_synced_at":"2025-04-11T15:32:10.621Z","repository":{"id":49863556,"uuid":"170035675","full_name":"MainRo/dooble","owner":"MainRo","description":"marble diagram generator from text input","archived":false,"fork":false,"pushed_at":"2022-12-26T20:47:00.000Z","size":95,"stargazers_count":5,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T15:35:06.392Z","etag":null,"topics":["generator","marble-diagrams","reactive-programming","reactivex"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MainRo.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-10T22:40:16.000Z","updated_at":"2023-09-08T17:50:19.000Z","dependencies_parsed_at":"2023-01-31T01:30:41.276Z","dependency_job_id":null,"html_url":"https://github.com/MainRo/dooble","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MainRo%2Fdooble","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MainRo%2Fdooble/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MainRo%2Fdooble/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MainRo%2Fdooble/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MainRo","download_url":"https://codeload.github.com/MainRo/dooble/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248431648,"owners_count":21102236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["generator","marble-diagrams","reactive-programming","reactivex"],"created_at":"2024-10-13T21:45:36.026Z","updated_at":"2025-04-11T15:32:10.298Z","avatar_url":"https://github.com/MainRo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"======\ndooble\n======\n\n\n.. image:: https://img.shields.io/pypi/v/dooble.svg\n        :target: https://pypi.python.org/pypi/dooble\n\n.. image:: https://img.shields.io/travis/MainRo/dooble.svg\n        :target: https://travis-ci.org/MainRo/dooble\n\n\nDooble is a marble diagram generator from text. It eases the documentation of\nReactiveX standard and custom operators, in a consitent way.\n\nInstallation\n-------------\n\n.. code:: python\n\n        pip install dooble\n\nA sphinx plugin is also available:\n\n.. code:: python\n\n        pip install sphinxcontrib-dooble\n\nUsage\n------\n\nThe text grammar allows to easilly define *observables* and *operators*. The map\noperator with an input observable and an output observable is described the\nfollowing way:\n\n.. code::\n\n        --1--2--3--4--\u003e\n        [ map(i: i*2) ]\n        --2--4--6--8--\u003e\n\nsave this text in a file named *map.txt* and then render it to an image:\n\n.. code:: console\n\n        dooble --input map.txt --output map.png\n\nThe generated image looks like this:\n\n.. image:: examples/map.png\n\n\n*Higher order observables* can also be documented easilly:\n\n.. code::\n\n        --a-b-c---d-e-f--\u003e\n        [     window     ]\n        --+-------+------\u003e\n                  +d-e-f-|\n          +a-b-c-|\n\nsave this text in a file named *window.txt* and then render it to an image:\n\n.. code:: console\n\n        dooble --input window.txt --output window.png\n\nThe generated image looks like this:\n\n.. image:: examples/window.png\n\nFor operators that take several observables as input, it is possible to label\nthem:\n\n.. code::\n\n        --1--2--3--*\n                 a-7-8-|\n        [   catch(a)   ]\n        --1--2--3--7-8-|\n\nsave this text in a file named *catch.txt* and then render it to an image:\n\n.. code:: console\n\n        dooble --input catch.txt --output catch.png\n\nThe generated image looks like this:\n\n.. image:: examples/catch.png\n\nFull grammar\n------------\n\n* Each text line represents either an observable, or an operator\n* Observables are defined with dash lines\n* If an Observable starts with a letter, this letter is considered as a label\n* Each character represent a time span\n* Character ``|`` indicates an observable completion\n* Character ``*`` indicates an observable error\n* Character ``\u003e`` indicates an observable continutation\n* The ``+`` character is used to define anchors of higher order observables\n* operators start with a ``[`` and end with a ``]``\n\nThe full grammar is the following one (in tatsu pseudo ebnf syntax):\n\n.. code::\n\n        @@grammar::dooble\n\n        start = { layer } $ ;\n\n        layer\n        =\n        | obs:observable\n        | op:operator\n        ;\n\n        observable = {skipspan}* [prefix] {lifetime}* completion ;\n        operator = '[' description ']' ;\n\n        prefix = '+' | label ;\n\n        label = /[a-z]/ ;\n\n        lifetime\n        =\n        | ts:timespan\n        | item:item\n        ;\n\n        completion = /[\u003e|*]/ ;\n\n        skipspan = ' ' ;\n        timespan = '-' ;\n        item = /[a-zA-Z0-9+.,]+/ ;\n\n        description = /[a-zA-Z0-9,:+*() \u003c\u003e_]+/ ;\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmainro%2Fdooble","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmainro%2Fdooble","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmainro%2Fdooble/lists"}