dot in filename issue with new backup policy

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
adrianinsaval
Posts: 344
Joined: Thu Apr 05, 2018 5:15 pm

Re: dot in filename issue with new backup policy

Postby adrianinsaval » Mon Mar 23, 2020 9:38 pm

What about having -- before the date? I don't think you would manually save a file with a name like that and I doubt it will cause trouble with any software, uwestoehr has problems with his company's software with the current naming method, is it truly that hard to help him out? Not for the companies that may eventually use FreeCAD but for someone that already uses it?
chrisb
Posts: 30728
Joined: Tue Mar 17, 2015 9:14 am

Re: dot in filename issue with new backup policy

Postby chrisb » Mon Mar 23, 2020 10:14 pm

plgarcia wrote:
Mon Mar 23, 2020 8:39 pm
Chris If I understand well you are against this change right.
Correct, I'm against having any charcter besides the aforementioned in filenames. I would appreciate though a bigger change, where user defined placeholders can be used, similar to the export filename in Path workbench's postprocessor. Such augmentation should satisfy uwestoehr's request as well, but it sure is a major change.
You need at least FreeCAD 0.19.23300 to edit my current sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
uwestoehr
Posts: 2158
Joined: Sun Jan 27, 2019 3:21 am

Re: dot in filename issue with new backup policy

Postby uwestoehr » Mon Mar 23, 2020 11:18 pm

chrisb wrote:
Mon Mar 23, 2020 4:31 pm
I hate using special characters in filenames.
Hmm, why do we then have parentheses in the default filenames for new meshes created using the mesh WB?

I still don't understand why you are insisting in using a dot. There are plenty of chars available that can be used instead and the functionality would be the same.

I will be quiet now since the arguments are exchanged. Maybe someone from the main developers like Yorik or Werner could make a decision?
chrisb
Posts: 30728
Joined: Tue Mar 17, 2015 9:14 am

Re: dot in filename issue with new backup policy

Postby chrisb » Mon Mar 23, 2020 11:31 pm

uwestoehr wrote:
Mon Mar 23, 2020 11:18 pm
Hmm, why do we then have parentheses in the default filenames for new meshes created using the mesh WB?
That doesn't make anything better.
I still don't understand why you are insisting in using a dot. There are plenty of chars available that can be used instead and the functionality would be the same.
I didn't.
You need at least FreeCAD 0.19.23300 to edit my current sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
wmayer
Site Admin
Posts: 16862
Joined: Thu Feb 19, 2009 10:32 am

Re: dot in filename issue with new backup policy

Postby wmayer » Tue Mar 24, 2020 7:03 am

chrisb wrote:
Mon Mar 23, 2020 11:31 pm
uwestoehr wrote:
Mon Mar 23, 2020 11:18 pm
Hmm, why do we then have parentheses in the default filenames for new meshes created using the mesh WB?
That doesn't make anything better.
When creating a mesh from a part shape then the label of the mesh is of this form: <ShapeLabel>(Meshed)
Now when selecting the mesh and using the mesh export function the suggested file name is of the form <ShapeLabel>(Meshed).extension
The user is still able to override the suggested file name.
plgarcia
Posts: 309
Joined: Wed Jun 17, 2015 9:47 pm
Location: Near Paris (France)

Re: dot in filename issue with new backup policy

Postby plgarcia » Tue Mar 24, 2020 9:19 am

I make clear why I choose the dot as separator once more.
The name of the archive and the file must be identical if we remove the 2 last extensions. I will check this is properly implemented I think one control may miss.

This is a simple criteria, whatever character has been included in the base-name of the project. This works always, this is simple.
Note that the format of the second extension can be changed along time by the user. I cannot therefore know what is has been in the past, and identifying the 2 last extensions in the condition is easy.
If we use another character allowed in the filenames may introduce confusion as I cannot know what is the "extension" like added.

This "extension" could be indemnified as the content of the last parenthesis.

I am thinking also that it could be identified as everything after the last occurrence of a character as log as this character is not used then forbidden in the extension. This could be the _ or the -. But the - is a very common way separating date and time.

If you think of one character (or set of characters like -- or __ or _TS_) not exotic that we could forbid in the extension that could be implemented easily without completely changing the structure of the code.

Make a decision and tell me.

Regards
plgarcia
Posts: 309
Joined: Wed Jun 17, 2015 9:47 pm
Location: Near Paris (France)

Re: dot in filename issue with new backup policy

Postby plgarcia » Thu Mar 26, 2020 6:47 am

Please Chris or wmayer tell me what you want me to do?