manyfold3d / manyfold

A self-hosted digital asset manager for 3d print files.
https://manyfold.app
MIT License
781 stars 50 forks source link

Index all files in model directory #764

Open ksuquix opened 2 years ago

ksuquix commented 2 years ago

They don't necessarily need thumbnailed or anything, but probably a notes field (when that gets implemented). Most importantly, on the model page, you should have a list of links for all the files in that folder for download. (READMEs, license documentation, cura/lychee files, etc, etc)

Floppy commented 8 months ago

Also requested by @lloydpick in #1736:

I have quite a few models that include pdf assembly instructions or BOM lists and the same goes for assembly videos. I've stored these along side the 3d models, however it appears manyfold has no way of showing these back to the user. I'm not looking for an embedded player or viewer, but perhaps extra links on the right navigation to simply download them?

Floppy commented 8 months ago

@slitzer in #1377 says:

Is there a way to specify what file types are displayed in the viewer?

The problem im trying to solve is some folders have a few files and thats fine - when there are over 20 or so files in a collection this becomes a pain to manaully download each file. I know there is a request to add a d/l button, however I imagine this will be problematic when dealing with large files (and trying to zip them all would take a while, most likely timeout

Instead could we can a fiilter to choose what gets detected, and able to be downloaded (similar to LYS files) this way I could add a .zip or .7z file to this and have the option to download the zip file (which would be all files in 1 download)

marl-scot commented 1 month ago

Was just looking at a model i uploaded that had SCAD files and a README.md file. How about adding a simple JSON file (or what ever format) that can have something like the following :

{
  "extMD": {
    "name": "MarkDown",
    "display": "html",
    "render": "/usr/local/bin/markdown2html --input {file} --output -"
  },
  "extAD": {
    "name": "AsciiDoc",
    "display": "html",
    "render": "https://asciidoc2html.org/{file}"
  },
  "extTXT": {
    "name": "Plain Text",
    "display": "text",
    "render": "{file}"
  },
  "extPDF": {
    "name": "PDF",
    "display": "html",
    "render": "pipe:/dev/pdfrenderer:{file}"
  }
}

This way, MF can look at a file extension, if its in the lists, then call the render program (either a curl for http(s), direct command execution for renderer starting with '/' or pipe, and just has to collect the STDOUT, and if the display type is HTML, render an html block in a preview window, if TEXT, just load the text as is. This would also allow adding additional extensions, so if a user had '.txt' & '.text' file extensions, they can simple add an extra block into the JSON and it would render as text no matter what exten.

Floppy commented 1 month ago

interesting idea, I'll have a think about it!