A quick question related to PDM. Does FreeCAD's file format have an UID (unique identifier) to differentiate files with the same name?
About PDM for FreeCAD
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: About PDM for FreeCAD
Code: Select all
>>> App.ActiveDocument.Uid
'568b453a-9be1-46c9-acb8-405a95dbf39c'
>>>
Re: About PDM for FreeCAD
Why do you want to know?
About Nim. Latest Release 2.0.2. Here is Nim in 100 seconds and a Nim package. There are Qt and OCCT packages.
Re: About PDM for FreeCAD
Noted. Thank you.
I was browsing some snippets of C++ code for reading and writing files and UIDs came up. Anyway, I'm a slow learner and I'm at least a full year away from even be useful in some minimal way.
Re: About PDM for FreeCAD
Please stay on topic.
About this problem:
I solved it. It was indeed a "chgrp vault directory" and "chrgp vault file" that I need to do after I place a new directory or file. So it works!It is working! I can upload and download files from the PDM. And also deleting files from the other user. I am having a bit of struggle with when I upload a directory from user1 and try to delete it with user2. So I need to chown (to 'vault') a directory, I think. I haven't worked that out yet. But so far it's a success!
Edit: I still don't get an answer to this question:
grd wrote: ↑Fri Mar 17, 2023 9:03 amAnd then it hit me. Normally when I want to access my server I do it with SSH. That server has also been secured with certbot. So how can I access those files? With SFTP! At first I thought about sshfs because then I don't need to rewrite a lot of my already written code, but sshfs has the problem that you first need to mount the filesystem. For me that is easy but I don't know how easy it is on other platforms (Windows) and also the connection is rather permanent. I still don't know really what is the best solution: SFTP or sshfs. If someone can give me a hint then I can maybe accept that
About Nim. Latest Release 2.0.2. Here is Nim in 100 seconds and a Nim package. There are Qt and OCCT packages.
Re: About PDM for FreeCAD
So no answer to that question... I choose SFTP and it works.
The storage of the files is simple. Each file that I import or copy gets a new file extension with a number behind the original file. So when I import file "blah.FCStd", the new file gets the name "blah.FCStd.000" and after I increase the file file number it gets the number "blah.FCStd.001". I think that ATM three digits is plenty and when the time comes to deal with "blah.FCStd.999" we only need to copy that file to a new file.
But having this new filesystem causes quite a few problems with the original program and that is why ATM it doesn't compile. The only thing to me that compiles is the filesystem on its own.
So... lots of work to do.
The storage of the files is simple. Each file that I import or copy gets a new file extension with a number behind the original file. So when I import file "blah.FCStd", the new file gets the name "blah.FCStd.000" and after I increase the file file number it gets the number "blah.FCStd.001". I think that ATM three digits is plenty and when the time comes to deal with "blah.FCStd.999" we only need to copy that file to a new file.
But having this new filesystem causes quite a few problems with the original program and that is why ATM it doesn't compile. The only thing to me that compiles is the filesystem on its own.
So... lots of work to do.
About Nim. Latest Release 2.0.2. Here is Nim in 100 seconds and a Nim package. There are Qt and OCCT packages.
Re: About PDM for FreeCAD
Aren't you re-inventing the wheel ? This looks very much like any version control software. Why don't you choose an existing one and make a front-end for it ? I'd suggest SVN, it has Python bindings, and Python has Qt bindings. And it does everything that you seem to re-implement. Did you look at it ?
Re: About PDM for FreeCAD
Of course I did. Maybe I can use SVN, but that is not the problem. ATM the main() program it doesn't compile, that is the problem. The back-end is only a tool. I don't care about SVN or git or whatever. But I like to store the files as a file storage and also I want to see the files and manipulate them whenever necessary. With SSH I can see the file storage and that is a big plus. Accessing the files with SFTP also works (take a look at the program filezilla for instance), and I need to code anyway, so I don't see many benefits for SVN.Zolko wrote: ↑Tue Mar 21, 2023 10:56 am Aren't you re-inventing the wheel ? This looks very much like any version control software. Why don't you choose an existing one and make a front-end for it ? I'd suggest SVN, it has Python bindings, and Python has Qt bindings. And it does everything that you seem to re-implement. Did you look at it ?
I the future maybe I can use SVN.
About Nim. Latest Release 2.0.2. Here is Nim in 100 seconds and a Nim package. There are Qt and OCCT packages.
Re: About PDM for FreeCAD
Yes, i am using Python. Have a look at https://github.com/grd/FreePDM
@Jee-Bee and I created this all with a little bit of help from others. If you are interested then maybe you can look at the FileSystem https://github.com/grd/FreePDM/tree/main/src/filesystem
There is no interaction with FreeCAD. But it is necessary to make it happen with a WB.
About Nim. Latest Release 2.0.2. Here is Nim in 100 seconds and a Nim package. There are Qt and OCCT packages.