JSON to generate app dmg - json

I'm trying to find an automatic way to generate at dmg file with my app inside and a nice looking background and application icon. I have found a an app which generate this called appdmg
https://www.npmjs.com/package/appdmg
My issue is that the json file is not understand and still complaining about a syntax issue.
Any example I found matching my syntax..
{
"title": "myApp",
"icon": "icon.ico",
"background": "banner.png",
"icon-size": 80,
"contents": [
{ "x": 192, "y": 344, "type": "link", "path": "/Applications" },
{ "x": 448, "y": 344, "type": "file", "path": “connect.app” }
]
}
Any idea or other easy cli tool ? I need to plug the tool inside a build server which generate automatically the app.
Thanks

Curly quotes are your syntax error. "connect.app" vs. “connect.app”

Related

"crbug/1173575, non-JS module files deprecated" Error in flutter

i created a json file with all the data required for my app, it was working fine but one image was showing error saying that it is from another domain, so i changed the image address to another image, and now it says
crbug/1173575, non-JS module files deprecated
i tried changing it back to the previous image and restarted the application it still shows the error.
{
"id": 1,
"name": "92.7",
"tagline": "on the ground by Rose",
"color": "blue",
"url": "https://upload.wikimedia.org/wikipedia/en/5/51/Google_Chrome_on_Windows_10_screenshot.png" ,
"icon": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Google_Chrome_icon_%28September_2014%29.svg/96px-Google_Chrome_icon_%28September_2014%29.svg.png" ,
"img": "https://preview.redd.it/ls2yuc4501l61.jpg?width=512&auto=webp&s=be785e98bf288f69c0b0105fb2bce6ab807b20f4",
"category": "blackpink",
"disliked": false,
"order": 1
},
{
"id": 2,
"name": "92.7",
"tagline": "blood sweat and tears by BTS",
"color": "blue",
"url":"https://upload.wikimedia.org/wikipedia/en/5/51/Google_Chrome_on_Windows_10_screenshot.png" ,
"icon": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Google_Chrome_icon_%28September_2014%29.svg/96px-Google_Chrome_icon_%28September_2014%29.svg.png",
"img":"https://m.media-amazon.com/images/M/MV5BZTQ3YmU4MjAtYzQ0NC00NjRjLThmMzYtMTE4MzgzMWJkNjliXkEyXkFqcGdeQXVyNDY5MjMyNTg#._V1_.jpg",
"category": "BTS",
"disliked": false,
"order": 2
}
Error was in the first pic, the second was showing fine but after changing it , now it doesnt start the application and shows the error i mentioned above. I'm using google chrome to run the application.
Delete your launch.json file as it is causing your app to not launch with the default configuration of flutter
I encounter the same error in one of my flutter web projects. you have to delete the launch.json file.
Here is path of file
.vscode -> launch.json
just delete launch.json and your project will run.
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"request": "launch",
"name": "Launch Chrome against localhost",
"type": "dart"
}
]
}

Embed Vega-Lite Diagrams in Antora

I'm trying to embed this vega-lite diagram in my antora docs: https://vega.github.io/vega-lite/examples/line_overlay.html
My Asciidoc file looks like this:
... some text ...
== Attachments
[vegalite, rendered-vega-image, svg]
----
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"description": "Stock prices of 5 Tech Companies over Time.",
"data": {"url": "data/stocks.csv"},
"mark": {
"type": "line",
"point": true
},
"encoding": {
"x": {"timeUnit": "year", "field": "date"},
"y": {"aggregate":"mean", "field": "price", "type": "quantitative"},
"color": {"field": "symbol", "type": "nominal"}
}
}
----
... some more text ...
The problem is the CSV file containing my data is not found. I tried every path I imagined ... relative and absolute filesystem paths and relativ and absolute http urls. Still I always get this message:
[DONE] build ui bundle
Skipping vegalite block. No such file: http://localhost:8080/vegalite/svg/eNpVkEFywyAMRfc5BcN0mdibdpNtj9D0AAQrWA0gArKnnozvXoHbpl0Zv9F_X3DfKaWfih0hGH1UemRO5dj3MzjTOeRxOndI_TbQ6MEjQz8_dx-Fot7X_ADFZkyMAsTxxmSvKmW0UBRd1Is6gR3VK4VkIlY2Q1YnDNB95w3X8ruesq-Cu2E2dgwQuQyY1z5QRKaM0R08OVe_GRJlllNfal3pbJn12nTB5GvVyVn-eElQpR4jtDphiTCyQM4TCNliEC0NInxEP9tSLIu-S3-VLGCy3it9QfBDBbI6bLUyv7R541yWdxJ-1AFM_DffXqWSn7Vuk4mMbBjnh8iSp9xkv8GyhDP5v8lIAaPxeq032K1fIi6OZQ==
[DONE] build docs
The Skipping vegalite block should not appear.
I tried vega-lite with data which is defined directly in the json block. This snippet works. So Vega-Lite in general works (I'm using a Kroki Server for diagram generation).
[vegalite, rendered-vega-image, svg]
----
{
"description": "A simple bar chart with embedded data.",
"data": {
"values": [
{"a": "A","b": 28}, {"a": "B","b": 55}, {"a": "C","b": 43},
{"a": "D","b": 91}, {"a": "E","b": 81}, {"a": "F","b": 53},
{"a": "G","b": 19}, {"a": "H","b": 87}, {"a": "I","b": 52}
]
},
"mark": "bar",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}
----
Defining my data directly inside the diagram definition is not a solution for me. Right now I'm just trying to make it work using the demo-CSV file. But afterwards I will switch to my own autogenerated, large CSV file. Both my real CSV and the Demo File are located in docs/modules/technical-docs/assets/attachments/monitoring-logging-reporting/stocks.csv.
My general setup consists of several projects.
Project containing the antora playbook und shell-script to generate my docs on my localhost
Project containing Asciidoc, the CSV files and a bunch of other docs and source code
Several other projects containing asciidoc docs which are not relevant for the problem at hand.
Anyone got any thougts? Thanks for yout help.
Kroki provides security levels that restrict access to files on the file system and on the network. Each level includes the restrictions enabled in the prior security level:
UNSAFE: disables any security features.
SAFE: Assume the diagram libraries secure mode request sanitization is sufficient.
SECURE: prevents attempts to read files from the file system or from the network.
By default, Kroki is running in SECURE mode.
As a result, "data": {"url": "data/stocks.csv"} will be removed/ignored.
If you are using Asciidoctor Kroki, the preprocessor should resolve the path, read the content and replace data.url with the actual values. See: https://github.com/Mogztter/asciidoctor-kroki
Alternatively, and since you are running a local instance of Kroki, you can use KROKI_SAFE_MODE=unsafe environment variable to configure the safe mode to unsafe.

How can I retrieve the perimeter and specific geometric properties using the Model Derivative API?

I have followed the Postman tutorial for the model derivative API, specifically for extracting metadata. I used a .dxf file, since I want to know if it is possible to retrieve perimeter, length/width properties based off the file.
I received a 200 response and it gave me a massive list of objects w/ their respective objectid's. Basically I got back a ton of these:
{
"objectid": 253,
"name": "Line [108]",
"externalId": "108",
"properties": {
"3D Visualization ": {
"Material": "ByLayer"
},
"General": {
"Color": "ByLayer",
"Handle": "108",
"Layer": "color#000000ff",
"Linetype": "BYLAYER",
"Linetype scale": "1.000",
"Lineweight": "ByLayer",
"Name ": "Line",
"Plot style": "ByColor",
"Thickness": "0.000 mm",
"Transparency": "ByLayer"
},
"Geometry": {
"Angle": "192.931 deg",
"Length": "0.088 mm"
}
}
}
The .dxf file I tested was as simple as possible and it looks like this image:
How can I retrieve the perimeter of this image? Is it possible to retrieve other specific geometric properties that I specify?
How can I know what part of the .dxf file each objectid is referring to?
Although it looks simple, the polyline (?) is probably being tessellated, resulting in a large number of small lines. Have you tried the original DWG file? Can you try that with viewer.autodesk.com?

Do I need google-apis-explorer for Vision?

I'm following the OCR Tutorial so of course calling GC's API, and I noticed bottom of OCR home page mentions API Explorer. What is this "Explorer", do I need it for Vision?
What the Explorer is is just a testbed for all the Google APIs so you can test the APIs in isolation or "Try Before You Buy" to see what functions are available. For instance, this page allows you to form a query for OCR and see what responses should look like. You don't need this tool, but it might be useful for debugging.
As an example, given this random source image, click this link to Google Explorer then press the Execute without OAuth button, and you get results that look like this:
{
"responses": [
{
"textAnnotations": [
{
"locale": "en",
"description": "How to\nInsert Text\nText Boxes in\nGoogle Docs\nBox\nControlAltAchieve.com #ericcurts\n",
"boundingPoly": {
"vertices": [
{
"x": 128,
"y": 20
},
{
"x": 909,
"y": 20
},
{
"x": 909,
"y": 502
},
{
"x": 128,
"y": 502
}
]
}
},
... And so on for many a page ...

what is the correct syntax for node-webkit chromium args?

In my package.json file for node-webkit I have: "chromium-args" : "--url="http://www.google.com"" I tried to use use backslashes \"www.google.com\", but webkit seems to not open at all when uses blackslashes. If I leave the blackslashes out, webkit loads the window but produces a JSON syntax error.
package.json file code:
{
"main": "index.html",
"name": "nw-demo",
"description": "demo app of node-webkit",
"version": "0.1.0",
"keywords": [ "demo", "node-webkit" ],
"window": {
"icon": "link.png",
"toolbar": true,
"width": 800,
"height": 500,
"position": "mouse",
"min_width": 400,
"min_height": 200,
"max_width": 800,
"max_height": 600
},
"webkit": {
"plugin": true
},
"chromium-args" : "--url=\"http://www.google.com\""
}
What is the correct json syntax to for "chromium-args"?
for 'url' you might write in in the 'main' field.
For quoting it could be written this way '--key
Instead of double quotes use single quotes
"chromium-args" : "--url='http://www.google.com'"