Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/realazthat/excalidraw-brute-export-cli

💪🔨🎭 CLI to export Excalidraw diagrams to svg/png files, using playwright+firefox.
https://github.com/realazthat/excalidraw-brute-export-cli

browser canvas diagrams drawing excalidraw export png svg whiteboard

Last synced: 29 days ago
JSON representation

💪🔨🎭 CLI to export Excalidraw diagrams to svg/png files, using playwright+firefox.

Awesome Lists containing this project

README

        

@font-face {
font-family: "Fira Code";
src: local("FiraCode-Regular"),
url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff2/FiraCode-Regular.woff2") format("woff2"),
url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff/FiraCode-Regular.woff") format("woff");
font-style: normal;
font-weight: 400;
}
@font-face {
font-family: "Fira Code";
src: local("FiraCode-Bold"),
url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff2/FiraCode-Bold.woff2") format("woff2"),
url("https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/woff/FiraCode-Bold.woff") format("woff");
font-style: bold;
font-weight: 700;
}
.terminal-4099070515-matrix {
font-family: Fira Code, monospace;
font-size: 20px;
line-height: 24.4px;
font-variant-east-asian: full-width;
}
.terminal-4099070515-title {
font-size: 18px;
font-weight: bold;
font-family: arial;
}
.terminal-4099070515-r1 { fill: #d9d9d9 }
.terminal-4099070515-r2 { fill: #878787 }
.terminal-4099070515-r3 { fill: #d9d9d9;font-weight: bold }
.terminal-4099070515-r4 { fill: #569cd6 }
.terminal-4099070515-r5 { fill: #98e024 }
.terminal-4099070515-r6 { fill: #aaaaaa }
.terminal-4099070515-r7 { fill: #608b1a }

$ npx excalidraw-brute-export-cli --help

  excalidraw-brute-export-cli 0.4.0 — 
Export Excalidraw using a (headless) browser via the command line.

USAGE


 excalidraw-brute-export-cli  
<OPTIONS...>

OPTIONS

 --action-sleep-time
[action-sleep-t  Time (in milliseconds) for each action to sleep.       

    ime]
                                 Defaults to 100. Too short and dialogs won't open in   

                                         time. Too long and it will take longer to run.         

default: 200

 -b
,
 --background
<background>
        Should the background be exported, or should it be     

                                         transparent. Same option as in the Excalidraw UI when  

                                         exporting an image.                                    

boolean

 -d
,
 --dark-mode
<dark-mode>
          Should the diagram be exported in dark mode, or not.   

                                         Same option as in the Excalidraw UI when exporting an  

                                         image.                                                 

boolean

 -e
,
 --embed-scene
<embed-scene>
      Should the diagram be exported with the scene embedded 

                                         in the image, or not. Tooltip from the UI: 'Scene data 

                                         will be saved into the exported PNG/SVG file so that   

                                         the scene can be restored from it.                     

                                         Will increase exported file size.' Same option as in   

                                         the Excalidraw UI when exporting an image.             

boolean

 --excalidraw-version
[excalidraw-ve  The version of Excalidraw to use. If not specified, it 

    rsion]
                               will be detected automatically.                        

one of "0.15.0","0.17.0","", default: ""

 -f
,
 --format
<format>
                The format to export the image in. Either "png" or     

required
                             "svg".                                                 

one of "png","svg"

 --headless
[headless]
                Should the browser be headless. Note that file dialogs 

                                         do not open/work. Can turn this off for debugging.     

boolean, default: true

 -i
,
 --input
<excalidaraw-path>
       The path to the excalidraw file                        

required

 --leave-browser-running
[leave-brow  Should the browser be left open afterwards (only       

    ser-running]
                         allowed when headless==false). Can turn this off for   

                                         debugging.                                             

boolean

 -o
,
 --output
<output-path>
           The path to the output file.                           

required

 -s
,
 --scale
<scale>
                  The scale to use when exporting the image. Same option 

required
                             as in the Excalidraw UI when exporting an image.       

one of 1,2,3

 --screenshots
[screenshots]
          Path to store debug screenshots at each step. Empty    

                                         string means no screenshots are recorded. Defaults to  

                                         no screenshots.                                        

default: ""

 --timeout
[timeout]
                  Timeout (in milliseconds) for each action in           

                                         playwright. 0 for infinite timeout.
 -1
 for no specific 

                                         timeout, which uses playwright's default timeout.      

                                         Defaults to
 -1.

default:
 -1

 -u
,
 --url
[url]
                      The URL to use for excalidraw website. Falls back to   

                                         environment variable EXCALIDRAW_BRUTE_EXPORT_CLI_URL if

                                         not specified. Falls back to https://excalidraw.com/   

                                         otherwise.                                             

default: ""

GLOBAL OPTIONS

 -h
,
 --help
                           Display global help or command-related help.           

 -V
,
 --version
                        Display version.                                       

 --no-color
                           Disable use of colors in output.                       

 -v
,
 --verbose
                        Verbose mode: will also output debug messages.         

 --quiet
                              Quiet mode - only displays warn and error messages.    

 --silent
                             Silent mode: does not output anything, giving no       

                                         indication of success or failure other than the exit   

                                         code.