SBUML -ScrapBook for User-Mode Linux-
Menu
»  ENGLISH
    »  About
    »  HowTo
    »  Techniques
    »  Reference
       »  Browser Helper Application
       »  Directory Layout
       »  The rh72c Distribution
       »  Restoring Old Snapshots
       »  Kernel/Scripts Interface
    »  FAQ
    »  Miscellaneous
    »  Contact
»  JAPANESE
»  Site Map



Creating Web Page Snapshots

Creating Web Page Snapshots

As an example, here are all the steps used to create the "tetris" snapshot:
  1. Start a machine either by booting a new machine or, as done here, restoring an existing snapshot
    • sbumlquick rh72-32m
  2. Configure machine
    • login with uid=root, passwd=root
    • start emacs
    • type ESC X tetris
  3. Save snapshot
    • mkdir /tmp/misc-examples
    • sbumlsave m1 /tmp/misc-examples/tetris -f -c
  4. Delta compress snapshot with the sbuml-makedelta script
    • sbumlmakedelta /tmp/misc-examples/tetris -s
  5. Run the sbuml--prepare-snapshots-for-posting script in the directory that contains the snapshot.  The script takes one parameter, which will be the URL of the directory in which the snapshot will be posted.  It produces a link-*.sbuml file for each snapshot which contains the information passed to the helper application.  It also creates file-list.txt files for each directory, which SBUML uses to search for snapshots.
    • cd /tmp/misc-examples/
    • sbuml--prepare-snapshots-for-posting http://sbuml.sourceforge.net/misc-examples/
  6. Copy snapshot directory to website along with the link-*.sbuml files and file-list.txt files created by the script.
  7. Create a link on the web page that links to the link-*.sbuml file.
In addition, the website must be setup so that files with .sbuml extensions are given the application/sbuml mime type.  On some Apache servers this is as simple as including the line "AddType application/sbuml sbuml" in a .htaccess file in a directory above the link-*.sbuml file.

If the website or snapshot is moved, the sbuml--prepare-snapshots-for-posting script can recreate the link-*.sbuml recursively for a whole subdirectory by making "-r" the second parameter.  It is most convinent if you can run the script directly on the machine that hosts the website.

 Printable Version