{"_id":"2tikz","_rev":"2-ef97358a6a74466cb566dda207d20f71","name":"2tikz","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"2tikz","version":"1.0.0","description":"A minimal http server that accepts .png and .svg fils, vectorizes the .pngs and returns .tikz code for inclusion in .tex files.","main":"2tikz.js","scripts":{"start":"node 2tikz.js","postinstall":"virtualenv-postinstall"},"author":{"name":"Hannes Leutloff","email":"hannes.leutloff@aol.de"},"license":"ISC","dependencies":{"fluture":"^8.0.2","fs":"0.0.1-security","http":"0.0.0","potrace":"^2.1.1","temp":"^0.8.3","virtualenv":"^0.3.1"},"gitHead":"959a543e222aff4e0306d175c2b83251f4d7bb29","_id":"2tikz@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"yeldir","email":"hannes.leutloff@aol.de"},"dist":{"integrity":"sha512-S7tcflNjROfRCcQpGvbA4bMeZ7cNROsJSIOFGs7YQNVVQbPoKfbXEh5GLZnU/OIsDRT0suePxE1af4wf9QN1tA==","shasum":"3cf1a2633401863857993c8de6a15c11de655a16","tarball":"https://registry.npmjs.org/2tikz/-/2tikz-1.0.0.tgz","fileCount":5,"unpackedSize":11267,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9zKJWinjfNXKu9XwvBzzdij8VVGbe5qhUkxugonHiQQIgM7ONZ7n3sHZEdgLE/e/QIYMFBeN/R68csimr0my9duo="}]},"maintainers":[{"name":"yeldir","email":"hannes.leutloff@aol.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/2tikz_1.0.0_1520182581603_0.23699777025408375"},"_hasShrinkwrap":false}},"time":{"created":"2018-03-04T16:56:21.603Z","1.0.0":"2018-03-04T16:56:22.035Z","modified":"2022-04-04T10:19:50.130Z"},"maintainers":[{"name":"yeldir","email":"hannes.leutloff@aol.de"}],"description":"A minimal http server that accepts .png and .svg fils, vectorizes the .pngs and returns .tikz code for inclusion in .tex files.","author":{"name":"Hannes Leutloff","email":"hannes.leutloff@aol.de"},"license":"ISC","readme":"2tikz\n=====\n\n\n2tikz is a small standalone http server that accepts svg and png data and \nreturns tikz code, which can be compiled with latex.  \nPng files will be vectorized using [potrace](https://www.npmjs.com/package/potrace). \nBear in mind that that means, that text content in the pngs will be of varying \nquality in the resulting .tikz file. Also potrace only supports greyscale output.\n\nrequirements\n------------\n* NPM\n* Python\n\nsetup\n----\n\n```\nnpm install\n```\n\nThis downloads all needed dependencies and creates a python virtualenv including\nsvg2tikz.\n\nstarting the server\n-------------------\n```\nnpm run\n```\n\nexample requests\n----------------\nPNG:\n```javascript\n$.ajax({\n    \"url\": url,\n    \"method\": \"POST\",\n    \"accepts\": {\n        \"text\": \"text/plain\"\n    },\n    \"data\": pngDataUri,\n    \"content-type\": \"image/png\",\n    \"processData\": false\n})\n    .then(function (data) {\n        console.log(data);\n    }, function (error) {\n        console.warn(error);\n    });\n```\n\nSVG:\n```javascript\n$.ajax({\n    \"url\": url,\n    \"method\": \"POST\",\n    \"accepts\": {\n        \"text\": \"text/plain\"\n    },\n    \"data\": svgString,\n    \"content-type\": \"image/svg+xml\",\n    \"processData\": false\n})\n    .then(function (data) {\n        console.log(data);\n    }, function (error) {\n        console.warn(error);\n    });\n```","readmeFilename":"Readme.md"}