Menu

#642 [feature request] the wrap-over to view the content statically (avoiding dynamic loading)

workingwiki
open
nobody
None
5
2015-04-21
2014-12-11
No

Is it possible to add a special directive to the project-filename that would allow me to show up the content all at once?
for example <project-file filename="XXX.all-pngs.static"/>

the issue: I show all slides of my presenation on my WW and there are about 60 of them. This all is loaded quite slowly (not because of the implemented machinery, but just it is like in any program - if one decides to printf every step of the program, this will slow down the process in total)
example: http://lalashan.mcmaster.ca/theobio/akhmetzhanov/index.php/Taiwan14

otherwise, would it be possible to implement only static view for particular wikis?

ps: sorry for a possible repeat of our previous discussion

Discussion

  • Lee Worden

    Lee Worden - 2015-04-21

    Sorry if this answer is also a repeat: you can take a look at how I implemented the all-pngs rule in the makefile, and write a similar makefile rule that does what you want.

    The rule is in site/makefile-after, and it looks like this:

    ~~~~~
    %.all-pngs.wikitext : $(SITE_RESOURCES)/all-pngs.pl %.pdf
    perl -f $^ > $@

    In other words, a .all-pngs.wikitext file is made from a .pdf file by running [this perl script](http://lalashan.mcmaster.ca/theobio/projects/index.php/Special:GetProjectFile?resources=1&filename=site/all-pngs.pl).  That script makes a .png image of each page of the pdf, and generates a .wikitext file made up of a project-file tag for each of those images.  When that wikitext is displayed, it  causes WW to load all the images.  This is why there are two loading steps: first it makes and loads the .wikitext file, and then it loads all the .png files.
    
    We could create something similar that loads in just one step, by creating a similar script that makes .png images of all the pages, and outputs a .html file instead of .wikitext, with an img tag for each image.  I'm not likely to do that soon, so I encourage you to do it.  You would use the environment variable WW_PUBLISH_URL to make HTML urls for the image files, like this:
    

    print "";
    ~~~~

    Then with a suitable make rule causing this script to be used to make .all-png.html targets, you could use <project-file filename="xyz.all-pngs.html"/> to get the behavior you want.

     

    Last edit: Lee Worden 2015-04-21

Anonymous
Anonymous

Add attachments
Cancel