summaryrefslogblamecommitdiffstats
path: root/example_sync.nim
blob: f41180da05996cc35c7c5636e19b7243cb22f552 (plain) (tree)
1
2
         
             


















                                   
import os
import nimjpg
import json

var result: cint

if paramCount()  == 0:
  echo "Gimme a file pls"
  quit(QuitFailure)

let path = paramStr(1)

init_jpg()

if fileExists(path):
  let file = open(path)
  echo pretty(%* collect_jpg(file))
else:
  echo "Gimme an existing file pls"

deinit_jpg()