reiserlab / Component-Designs

Some 3D printing, laser cutting, PCBs used in the lab.
https://reiserlab.github.io/Component-Designs/
CERN Open Hardware Licence Version 2 - Weakly Reciprocal
13 stars 7 forks source link

How to improve component list #7

Closed floesche closed 3 years ago

floesche commented 3 years ago

From this weeks work it became obvious, that generating a shopping list to replicate the setup is more laborious than I had hoped.

in this issue we can discuss how this could be improved.

floesche commented 3 years ago

Would this be a good place: https://reiserlab.github.io/Component-Designs/walking/inexpensive-treadmill ? Would you have expected it at another location when we started earlier this week?

InchoateArtichoke commented 3 years ago

I think it's really hard to avoid that page if you're trying to rebuild the setup. So that should be a good place.

floesche commented 3 years ago

And would you prefer links on the website, or a spreadsheet that you can download and then edit for your own requirements?

InchoateArtichoke commented 3 years ago

Oh, that's a good question. Do the two have to be separate? ie: have a table, plus a place to download in spreadsheet form

floesche commented 3 years ago

Since links will rot over time, we want to avoid duplicating information. Otherwise, if one product becomes unavailable at some point, we would need to change the link at several places and this is error prone…

So if we can find a way to render the content on the website (= Markdown → HTML….) and provide a downloadable file (eg CSV) form the same source, that would be best IMHO. For a start, I'd settle with one of the options.

InchoateArtichoke commented 3 years ago

Makes sense, let's go w/ a table on the site then.

floesche commented 3 years ago

Could this be interesting? https://docs.github.com/en/github/managing-files-in-a-repository/working-with-non-code-files/rendering-csv-and-tsv-data Maybe worth a small test…

floesche commented 3 years ago

Another piece of information that looks useful is at https://jekyllrb.com/tutorials/csv-to-table/

Github-pages uses jekyll to render the content of the github repository into a website…

InchoateArtichoke commented 3 years ago

Yup, I got that working yesterday to display the csv. It looks pretty nice. (Column headings aren't final) image

InchoateArtichoke commented 3 years ago

I was able to get around the issue I mentioned earlier (not being able to publish the data files) by changing the default data directory, since the default (/_data) starts with an underscore and is ignored by Jekyll in the site urls. The tables and csv downloads should come from the same source now!

Will push page with tables and links once I clean up the csv files.

floesche commented 3 years ago

The screenshot looks good.

On the website, we don't need the full link spelled out – so the link could be the name of the vendor, once you click on it you can get to the deep linked URL.

Also, would it be possible to move the csv into an existing path (eg "assets") to keep the root directory uncluttered? I am sure there are more improvements once the table is on the website… :-)

floesche commented 3 years ago

This is the section I was referring to in the meeting: https://jekyllrb.com/tutorials/csv-to-table/#unpack-a-row

With this in mind, you can add one column to the CSV with the component description URL (within our own website) and one column with the supplier URL. For the website rendering, you could then use the liquid syntax to generate the <a href…> anchors.

floesche commented 3 years ago

The result looks very good and addresses exactly the issues that the previous documentation had. I consider this task done, if we come up with ideas how to improve this, we can open new issues in the future.