json file?

classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

json file?

jdawgaz
I just noticed this.

When I save a .scad file, I now get a .json file with the same name, and they all have the same contents?

{

    "fileFormatVersion": "1"

}

When did this start? and can I delete them?

Jerry


--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: json file?

kintel
Administrator
> On Nov 29, 2017, at 1:17 PM, Jerry Davis <[hidden email]> wrote:
>
> I just noticed this.
>
> When I save a .scad file, I now get a .json file with the same name, and they all have the same contents?
>
This is part of the new customizer for saving customizer presets. We may leverage this later for managing other design metadata/dependencies, but right now you’ll only lose customizer-related information if you remove the file.

 -Marius


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: json file?

jdawgaz
ok.

can y'all change this be a "hidden" file in unix/linux? I know winders doesn't have such a thing.
but that way I know the .json files are there, but I don't have to see them all the time.

just askin'.

thanks,

Jerry


--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov


On Wed, Nov 29, 2017 at 11:19 AM, Marius Kintel <[hidden email]> wrote:
> On Nov 29, 2017, at 1:17 PM, Jerry Davis <[hidden email]> wrote:
>
> I just noticed this.
>
> When I save a .scad file, I now get a .json file with the same name, and they all have the same contents?
>
This is part of the new customizer for saving customizer presets. We may leverage this later for managing other design metadata/dependencies, but right now you’ll only lose customizer-related information if you remove the file.

 -Marius


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: json file?

kintel
Administrator
> On Nov 29, 2017, at 1:32 PM, Jerry Davis <[hidden email]> wrote:
>
> can y'all change this be a "hidden" file in unix/linux? I know winders doesn't have such a thing.
> but that way I know the .json files are there, but I don't have to see them all the time.
>
You can also turn off the experimental customizer feature - that should kill the JSON file output.

 -Marius


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: json file?

nophead
Why does the customizer need to store anything? Isn't all the data in the scad file in comments?

On 29 November 2017 at 18:57, Marius Kintel <[hidden email]> wrote:
> On Nov 29, 2017, at 1:32 PM, Jerry Davis <[hidden email]> wrote:
>
> can y'all change this be a "hidden" file in unix/linux? I know winders doesn't have such a thing.
> but that way I know the .json files are there, but I don't have to see them all the time.
>
You can also turn off the experimental customizer feature - that should kill the JSON file output.

 -Marius


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: json file?

MichaelPFrey
In reply to this post by jdawgaz
Hi,

I kindly, but strongly disagree with hiding the json files.
Currently, the user base of openscad is very homogeneous:
We have programmers working on openscad and programmers/designers using
openscad.
Both groups are competent in using their computers.
Hiding the file by default would not be a big deal.

With the costumizer, we get a third user groups:
People that download models, costume them and print them without
touching the code of the model.
(see thingiverse costumizer)
Some of those users will think "code is scary" and (at first) only use
the costumizer.
They put their time into costumizing preexisting design. For those
users, the json file will be "their design" and the scad file something
like a software library to us (we need the file but do not care about
the internal working).
Sure they need to archive the scad file and json file together - but
this is the point where hiding the file would be an issue.
(Off course, we should try to get the users to touch the code - but
lowering the bar of entry for using openscad is a good thing for us.
Hiding files would obfuscate things, rising the bar of entry.)

By the way: With windows, there is also a hidden flag for files.
(most power uses set the explorer to always show hidden files)
If you really, really want to hide files in windows use Alternate data
streams on an NTFS formated drive.


with kind regards,
Michael Frey

Am 29.11.2017 um 19:32 schrieb Jerry Davis:

> ok.
>
> can y'all change this be a "hidden" file in unix/linux? I know winders
> doesn't have such a thing.
> but that way I know the .json files are there, but I don't have to see
> them all the time.
>
> just askin'.
>
> thanks,
>
> Jerry


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: json file?

MichaelPFrey
Why does the customizer need to store anything? Isn't all the data in the scad file in comments?

When you create a parameter set (or multiple parameter sets), the costumizer stores those parameter sets in the json files.

(The scad files offcourse contains the default/"no preset selected" parameter set)


with kind regards,
Michael Frey

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: json file?

doug.moen
In reply to this post by jdawgaz
Another idea is to not save the JSON file unless it contains useful information that is different from the default. That's another way to eliminate unwanted clutter.

On 29 November 2017 at 13:32, Jerry Davis <[hidden email]> wrote:
ok.

can y'all change this be a "hidden" file in unix/linux? I know winders doesn't have such a thing.
but that way I know the .json files are there, but I don't have to see them all the time.

just askin'.

thanks,

Jerry


--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov


On Wed, Nov 29, 2017 at 11:19 AM, Marius Kintel <[hidden email]> wrote:
> On Nov 29, 2017, at 1:17 PM, Jerry Davis <[hidden email]> wrote:
>
> I just noticed this.
>
> When I save a .scad file, I now get a .json file with the same name, and they all have the same contents?
>
This is part of the new customizer for saving customizer presets. We may leverage this later for managing other design metadata/dependencies, but right now you’ll only lose customizer-related information if you remove the file.

 -Marius


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: json file?

kintel
Administrator
> On Nov 29, 2017, at 2:55 PM, doug moen <[hidden email]> wrote:
>
> Another idea is to not save the JSON file unless it contains useful information that is different from the default. That's another way to eliminate unwanted clutter.
>
Yes, that sounds like reasonable default behavior.

 -Marius


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: json file?

jdawgaz
In reply to this post by doug.moen
or if we must, and there is a compelling reason to keep from being a hidden file, then put all json files in a json subdirectory.

I place all my stl files in a subdirectory named stl. I do that to keep my top level openscad directory with just .scad source files.

I don't really much like that there are now .json files as well as .scad files.



--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov


On Wed, Nov 29, 2017 at 12:55 PM, doug moen <[hidden email]> wrote:
Another idea is to not save the JSON file unless it contains useful information that is different from the default. That's another way to eliminate unwanted clutter.

On 29 November 2017 at 13:32, Jerry Davis <[hidden email]> wrote:
ok.

can y'all change this be a "hidden" file in unix/linux? I know winders doesn't have such a thing.
but that way I know the .json files are there, but I don't have to see them all the time.

just askin'.

thanks,

Jerry


--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov


On Wed, Nov 29, 2017 at 11:19 AM, Marius Kintel <[hidden email]> wrote:
> On Nov 29, 2017, at 1:17 PM, Jerry Davis <[hidden email]> wrote:
>
> I just noticed this.
>
> When I save a .scad file, I now get a .json file with the same name, and they all have the same contents?
>
This is part of the new customizer for saving customizer presets. We may leverage this later for managing other design metadata/dependencies, but right now you’ll only lose customizer-related information if you remove the file.

 -Marius


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: json file?

MichaelAtOz
Administrator
jdawgaz wrote
> then put all json files in a json subdirectory.

Perhaps a Customiser (debate English/Yank spelling) would be a better
directory name.
And/or configurable like the library paths.
And/or in the same directory (prob better a sub-dir) where the backups go.
??



-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: json file?

Neon22
inkscape does this but keeps all the UI json in a single file config.xml
IIRC
But then its extension UI seldom changes

Personally - if the customizer is on - then save the json file - if its
values differ from the original
Then:
- if you don't use the customiser(switched off) - no extra json file
- if you use it occasionally but reset params before final save - no
extra json file
- if you use it - you get scad and matching json file

win/win


On 11/30/2017 10:10 AM, MichaelAtOz wrote:

> jdawgaz wrote
>> then put all json files in a json subdirectory.
> Perhaps a Customiser (debate English/Yank spelling) would be a better
> directory name.
> And/or configurable like the library paths.
> And/or in the same directory (prob better a sub-dir) where the backups go.
> ??
>
>
>
> -----
> Admin - PM me if you need anything, or if I've done something stupid...
>
> Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.
>
> The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
>
> ---
> This email has been checked for viruses by AVG.
> http://www.avg.com


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: json file?

jdawgaz
I have hundreds of .scad files scattered around (not only the main openscad directory), but in many subdirectories as well.

If I would like to keep customizer on, but not have my directory and subdirectories cluttered with .json files, what then. Not a win-win IMHO.

If .json file really need to exist, what would be the options to NOT clutter the directories with it? But still provide the functionality needed?



--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov


On Wed, Nov 29, 2017 at 2:23 PM, Mark Schafer <[hidden email]> wrote:
inkscape does this but keeps all the UI json in a single file config.xml IIRC
But then its extension UI seldom changes

Personally - if the customizer is on - then save the json file - if its values differ from the original
Then:
- if you don't use the customiser(switched off) - no extra json file
- if you use it occasionally but reset params before final save - no extra json file
- if you use it - you get scad and matching json file

win/win



On 11/30/2017 10:10 AM, MichaelAtOz wrote:
jdawgaz wrote
then put all json files in a json subdirectory.
Perhaps a Customiser (debate English/Yank spelling) would be a better
directory name.
And/or configurable like the library paths.
And/or in the same directory (prob better a sub-dir) where the backups go.
??



-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


---
This email has been checked for viruses by AVG.
http://www.avg.com


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
tp3
Reply | Threaded
Open this post in threaded view
|

Re: json file?

tp3
On 29.11.2017 22:38, Jerry Davis wrote:
> If .json file really need to exist, what would be the
> options to NOT clutter the directories with it? But
> still provide the functionality needed?
>

It is not supposed to exist in the empty form as shown in the initial post.

ciao,
  Torsten.


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: json file?

MichaelPFrey
In reply to this post by MichaelAtOz
MichaelAtOz wrote
> jdawgaz wrote
>> then put all json files in a json subdirectory.
> Perhaps a Customiser (debate English/Yank spelling) would be a better
> directory name.
> And/or configurable like the library paths.
configurable sounds good, until you start sharing designs reallying on
presets.
One example would be the literal examples that come with openscad.

A compromise would be, that openscad is always looking for the json file
in the same path as the scad file.
If it exists, use that. If not, look in the user configurable path. If
not, create the json file in the user configurable path.
(a "load/select preset" button opening a file dialog to select a json
file would resolve issues when users us a different configurable path,
but share designs)

> And/or in the same directory (prob better a sub-dir) where the backups go.
> ??
How would you plan on handling presets for scad files with the same file
name in different folders?
(off course, if it is just stored there as a back up, it would not matter)


with kind regards,
Michael Frey

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
tp3
Reply | Threaded
Open this post in threaded view
|

Re: json file?

tp3
On 30.11.2017 03:07, Michael Frey wrote:
> A compromise would be, that openscad is always looking for
> the json file in the same path as the scad file.
> If it exists, use that. If not, look in the user configurable
> path. If not, create the json file in the user configurable path.
> (a "load/select preset" button opening a file dialog to select
> a json file would resolve issues when users us a different
> configurable path, but share designs)
>
It's additional data that belongs to the model file itself.
I think putting that in random other locations is not a good
idea. Right now, there is no *cross platform* support for
storing additional meta data related to a file.

Currently  the file is generated always if the Customizer
is enabled. That's a bug and will be fixed eventually (once
someone finds the time to work on that... it's still an
experimental feature.).

We may not need to create a huge complicated logic including
extra UI and configuration just to hide a file which is
mostly not there in the first place once the bug is fixed.

Basically what Mark said earlier.

ciao,
  Torsten.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: json file?

MichaelPFrey
Torsten Paul wrote:
> Currently  the file is generated always if the Customizer
> is enabled. That's a bug and will be fixed eventually (once
> someone finds the time to work on that... it's still an
> experimental feature.).

Well, let us see if that fixes the discussion:

https://github.com/openscad/openscad/pull/2207


With kind regards,

Michael Frey


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: json file?

macdarren
This post was updated on .
In reply to this post by MichaelPFrey
I'd like to suggest that we do not have a separate json file at all unless
there is some project mechanism for keeping it together with the .scad file
and the .stl and any other files needed or generated.

Since I think that would overly complicate things and building a full IDE is
probably not the plan,
how about just add customizer information to the foot of the scad
file...either a single line identifier like
used for comments or maybe a separate section with a header and footer
identifier to specify this info is for customizer and should generally not
be changed by the programmer directly.

In general like to use a customizer for some of my designs, especially those
I share.  I would hate to loose or have end users loose custom
configurations they spend time setting up because some file was separated or
worse invisible and separated.  Having deal with two 'source' files is a
problem for many novice users...many don't keep the output files (if they
are able to regenerate them quickly) so having them separated is not as big
an issue....



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: json file?

TLC123
In reply to this post by kintel
I concur.



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: json file?

codifies
I've been thinking about this since the thread started and while I'm no
over bothered myself about an extra file being "untidy" I can see them
getting separated - especially by a less technical user (isn't this for
the customiser for the less technical)

Someone mentioned about putting the info in comments, I can see some
people baulking at this but its not as bad as it sounds, and you could
go further and directly embed it into the command set

either way, splitting one thing (and it is really) into two files,
really isn't going to benefit the code blind, and is going to irritate
the OCD, have you seen the crap that some games do to MY home directory!

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
12