TheELNConsortium / TheELNFileFormat

Specification for the ELN File Format
MIT License
45 stars 9 forks source link

Question concerning directory structure #29

Closed smartsammler closed 1 year ago

smartsammler commented 1 year ago

I read the specification like it says that the eln file and the content of file should have the same name

Inside a .eln file, there MUST be a folder that will contain the rest of the data. The name of the folder SHOULD be the same as the archive name. This folder at root prevents issues when opening the file as a zip file and getting archived files extracted in the current directory, possibly overwriting other files, and probably polluting the current directory. […]

<root>
some-data.eln/
- ro-crate-metadata.json
- experimentA/:[…]

However, to my knowledge, that would not work as unzipping the eln file would overwrite the currently unzipped file by a directory of the same name. The examples are hence also not confirming to my interpretation of the text, but either have a completely different name (ok, because of should and not must) or the eln/zip file contains a directory without the .eln extension in its name (collections-example.eln -> collections-example/).

I would be pleased if either a formulation could be found that cannot be interpreted like I did or if the examples provided in this git repository would show the described behaviour and a description on how to generate and extract such zip files that are named exactly as their content.

NicolasCARPi commented 1 year ago

Hello,

The important part is that the zip contains a folder. We don't care about its name, it doesn't have to end in .eln either. Yes, unzipping it will overwrite a folder of the same name, but it's okay, that's unevitable afaik.

Feel free to propose a PR if you think the spec formulation can be improved upon!

nicobrandt commented 1 year ago

We could maybe just change the formulation/example slightly to recommend using the base name of the ELN file without the extension?