Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

organise definition.csv alphabetically #8

Open
timmwille opened this issue Apr 1, 2023 · 8 comments
Open

organise definition.csv alphabetically #8

timmwille opened this issue Apr 1, 2023 · 8 comments

Comments

@timmwille
Copy link

No description provided.

@timmwille
Copy link
Author

might also help for easier communication in #6

@hoijui
Copy link
Owner

hoijui commented Apr 2, 2023

Question:
should we use string sort, or path-sort with directories first/last?

string sort:

assembly.vf_recipe.ttl
bom.csv
bom.csv.license
bom.ods
doc/
doc/assembly/
doc/assembly/chap-1/sec-1.md
...
doc/workshops/build/main.md
gen/
gen/anim/
gen/assembly.vf_recipe.ttl
...
gen/software/
LICENSE.txt
LICENSES/
LICENSES/AGPL-3.0-or-later.txt
manuf.vf_recipe.ttl
mod/
mod/module-a/
mod/module-b/
okh.toml
README.md
recycle.vf_recipe.ttl
res/
res/assets/
res/assets/media/
res/assets/media/img/
res/assets/media/img/animation-1.gif
...

path sort:

assembly.vf_recipe.ttl
bom.csv
bom.csv.license
bom.ods
LICENSE.txt
manuf.vf_recipe.ttl
okh.toml
README.md
recycle.vf_recipe.ttl
doc/
doc/assembly/
doc/assembly/main.md
doc/assembly/vf_recipe.ttl
doc/assembly/chap-1/sec-1.md
doc/assembly/chap-1/sec-2.md
...

@hoijui
Copy link
Owner

hoijui commented Apr 4, 2023

I am currently leaning towards the former (alphabetic sort),
because that is easy to do in a variety of tools (e.g. AWK/`sort/BASH and LibreOffice),
so it would be easier to keep it updated and consistent,
which is one of the main reasons to have it sorted in the first place.

@hoijui
Copy link
Owner

hoijui commented Apr 7, 2023

(as already stated in the pull-request:)
here is an AWK script that does the job (alphabetic sorting only):
https://stackoverflow.com/a/65768883/586229

@timmwille
Copy link
Author

I would do it the way as it is shown in the repo structure afterwards, but apart from that no specific preferences from my side

@hoijui
Copy link
Owner

hoijui commented Apr 11, 2023

as it is shown in the repo structure afterwards... you mean in the file explorer or on github.com?

github.com shows:

  1. folders before files
  2. upper-case before lower-case
  3. alphabetic (as the lowest priority)

That is a bit complex, but would be doable, if you mean that.

@hoijui
Copy link
Owner

hoijui commented Apr 16, 2023

I implemented my idea of a path-specific sorting, and the outcome for unixish is the order below;
do you think it makes sense?

The thing is,
that it can not be exactly like GitHub shows files and directories,
because GitHub just shows one directories content,
while we have the whole tree at once in the CSV.

LICENSES/
LICENSES/AGPL-3.0-or-later.txt
doc/
doc/assembly/
doc/assembly/chap-1/sec-1.md
doc/assembly/chap-1/sec-2.md
doc/assembly/main.md
doc/assembly/vf_recipe.ttl
doc/manuf/
doc/manuf/chap-1/sec-1.md
doc/manuf/chap-1/sec-2.md
doc/manuf/main.md
doc/recycling/
doc/recycling/chap-1/sec-1.md
doc/recycling/chap-1/sec-2.md
doc/recycling/main.md
doc/usr/
doc/usr/chap-1/sec-1.md
doc/usr/chap-1/sec-2.md
doc/usr/main.md
doc/workshops/
doc/workshops/build/main.md
gen/
gen/anim/
gen/calc/
gen/doc/
gen/doc/assembly/
gen/doc/manuf/
gen/doc/recycling/
gen/doc/usr/
gen/elec/
gen/firmware/
gen/mech/
gen/sim/
gen/site/
gen/software/
gen/assembly.vf_recipe.ttl
gen/bom.csv
gen/manuf.vf_recipe.ttl
gen/okh.toml
gen/recycle.vf_recipe.ttl
mod/
mod/module-a/
mod/module-b/
res/
res/assets/
res/assets/media/
res/assets/media/img/
res/assets/media/img/animation-1.gif
res/assets/media/img/drawing-1.png
res/assets/media/img/partialy-auto-generated-drawing.pdf
res/assets/media/img/photo-1.jpg
res/assets/media/img/photo-2.webp
res/assets/media/vid/
res/assets/media/vid/tutorial.webm
res/assets/var/
res/assets/var/datasheet-x.pdf
res/conf/
res/conf/VisiCut-config.plf
res/conf/some-config.xml
res/media/
res/media/img/
res/media/img/diagram-1.svg
run/
run/build
run/ci
run/clean
run/release
run/test
src/
src/anim/
src/anim/assembly.blend
src/calc/
src/calc/feedback-evaluation.ods
src/calc/required-material-thickness.m
src/elec/
src/elec/main-subs/
src/elec/main-subs/parts.lib
src/elec/main-subs/sub-a.kicad_pcb
src/elec/main-subs/sub-a.pro
src/elec/main-subs/sub-a.sch
src/elec/main-subs/sub-b.kicad_pcb
src/elec/main-subs/sub-b.pro
src/elec/main-subs/sub-b.sch
src/elec/main.kicad_pcb
src/elec/main.pro
src/elec/main.sch
src/elec/plate.kicad_pcb
src/elec/plate.pro
src/elec/plate.sch
src/firmware/
src/firmware/Makefile
src/firmware/main.c
src/firmware/other.c
src/firmware/other.h
src/mech/
src/mech/case-alternative.fcstd
src/mech/case.fcstd
src/mech/parts.lib
src/mech/pieceX.scad
src/sim/
src/sim/stress-test.OpenFOAM
src/software/
src/software/control_lib/src/main.rs
src/software/control_lib/Cargo.toml
src/test/
LICENSE.txt
README.md
assembly.vf_recipe.ttl
bom.csv
bom.csv.license
bom.ods
manuf.vf_recipe.ttl
okh.toml
recycle.vf_recipe.ttl

@timmwille
Copy link
Author

works just fine @hoijui

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants