1. This is another 'web gallery' because the world was just waiting for this one. 2. Motivation: every now and then I'm putting images or video clips into some 'hidden' directory on my page for example here https://www.dose.muc.de/bilder/wr Then I'm pointing people there so they might enjoy the media. But lately I got severe complaints about the (not) usability of the page: navigating through the many files was cumbersome! And indeed the simple 'old school' directory listing which the server is presenting is not exactly very convenient! I then looked around a bit for a simple gallery software which might present my images and video clips. Maybe I did not search long enough but at least for the moment I could not find what I wanted: o no fancy framework for generating the gallery o simple static HTML files (even without JavaScript) o not just images but also videos should be included o support complete directory trees, not just one directory o use original 'data base', i.e. just generate some HTML files which then point to the original media files 3. The result so far is a simple (medium sized) C-programm: 'create_ht_ml.c' which does the job. BTW 'ml' might be seen as 'ML' from 'HTML' but also as abbreviation for 'media list'. For compiling there are almost no further dependencies with the exception of the math lib. I'm compiling like this: gcc -o create_ht_ml create_ht_ml.c -lm -Wall However, there are some other 'tooling dependencies'. I'm using system() from glibc to call several well known tools like ffmpeg or different programs from the netpbm suite for instance and, of course some 'standard tools' like cp, rm, mkdir or tar. Without these tools installed 'create_ht_ml' cannot do it's job! BTW from my description so far you might guess I'm not using Windoze but rather a GNU system, Linux in my case. 4. Using create_ht_ml is quite simple: either put the binary onto the top of some directory tree (this 'tree' might, of course also be a simple directory WITHOUT further sub directories) and simply call it: ./create_ht_ml. Or you might apply ONE command line parameter. This will be interpreted as 'root directory' of a file tree for which the gallery should be generated. The whole tree is then examined for the presence of files with suffix '.mp4' or '.jpg'. But extending the program to other suffixes would be very easy. I'm just looking at the suffix and do not use 'file' for instance. So if the suffix was 'lying' 'file' would be the better choice. Additionally a command line option '-h' might be given. '-h' is for 'hide'. This will suppress the generation of an HTML_DIR (and an HTML_DIR.html file) in the root of the examined file tree. The consequence is that subdirectories in the examined file tree are 'hidden' from each other because they are no more linked in one big tree. This way create_ht_ml needs only be called once for the whole tree. Otherwise it would have to be called for each single subdirectory in the tree to achieve the same 'directory hiding'. See next paragraph for HTML_DIR and HTML_DIR.html. 5. create_ht_ml is listing the media files it processes (to show it's progess) and the main task is to generate (potentially) a 'special' new directory in each directory of the examined file tree. In order not to interfere with existing names the name of this new directory is ht_ml_15d2a2db3aa31c9382c4bf7f0071fd61 The part after 'ht_ml_' is just some random number which god gave me. And my hope is that nobody in the whole world has ever created or will ever create directories with this name! In the program I use a #define HTML_DIR for this name. However, this HTML_DIR is only created if needed. If the examined directory itself does not contain files with suffix '.mp4' or '.jpg' and if the same is true for all sub directories in this examined directory there is no need for a HTML_DIR since we do not find any media files here which can be added to the gallery. Besides this HTML_DIR a file HTML_DIR.html is generated. This is for user's convenience: when loading HTML_DIR.html the user will automatically be redirected to a 'starting point' of the gallery somewhere inside the HTML_DIR. 6. Now what is in an HTML_DIR? You will find here a bunch of sub directories: ds, ik, ma, nm, pv, sh, sp containing mainly (static) HTML files which will allow a convenient navigation through the whole file tree examined. The basic idea was to have one bidirectional linked list for each directory. There will be exactly one HTML file for each media file found. These HTML files are found in sh and called show_.html. Besides the linked lists for the media files proper there are additionally bidirectionally linked lists for the 'overview' inside one directory. These lists first show all sub directory names found in the examined directory and then preview pictures for all the media files. These lists are kept in nm and ma. The difference between 'nm' and 'ma' is: 'nm' is for 'not marked' preview pictures and 'ma' is for 'marked' preview pictures. The idea was, if you leave the 'basic linked list' (or just go up one level in the whole directory tree) and thus enter an(other) overview page it would be nice to see the just visited media file (or sub directory) marked/highlighted. This is done with HTML files in 'ma'. OTOH if you just browse through the overview there is no need for any mark/highlight. This is done with HTML files in 'nm'. Now you may ask: why at all are there 'nm' AND 'ma' sub directories? The answer is because I use static HTML (and indeed this is a drawback of 'static')! Moreover the idea was to have different layouts, some with only few preview pictures in them and some with many. This could only be solved with more than one set of linked lists. Because of 'static' we then also need more than one sh directory: 'sh'. Besides the 'single media list' in 'sh' there is another set of lists: 'ds'. Here you do not have to (but you can if you wish) click in order to see the next (or previous) picture but after some time the next picture is shown automatically. 'ik' is contaning some icons. 'pv' is containing all the (little) preview pictures for the examined directory. sp contains a very small *css file. 7. What is this ht_ml_15d2a2db3aa31c9382c4bf7f0071fd61.tgz file after create_ht_ml was run? Running create_ht_ml will create zero or more HTML_DIRs in the examined file tree. If at least one such HTML_DIR was created tar is called to archive all the found HTML_DIRs into this ht_ml_15d2a2db3aa31c9382c4bf7f0071fd61.tgz file. This way we have the complete gallery packed into this one *tgz file with the exception of the original media files. You may unpack the *tgz file at any place and start navigating through the unpacked file structure but instead of the original media you will see nothing. This may sound rather useseless but my use case is the following: I have media files on the server but cannot run create_ht_ml on the server. So I have to fetch all files from the server to some local storage. Here I can run create_ht_ml. After that I just need to upload the generated *tgz file back to the server and unpack it in the relevant file tree and voila the web gallery is operational! 8. Can I see an 'example gallery' generated with create_ht_ml? Yes, in the above mentioned URL simply load this html file: https://www.dose.muc.de/bilder/wr/ht_ml_15d2a2db3aa31c9382c4bf7f0071fd61.html You may switch between the different 'gallery layouts' by clicking on the 'grid button' in the lower left corner of the page. Layout 1 might be most useful for small screens (like on mobile phones) in landscape mode.