PageRenderTime 47ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/blog/2012/02/formatting-revisited.html

https://github.com/imrehg/website
HTML | 74 lines | 65 code | 9 blank | 0 comment | 0 complexity | 498d8c0490e71f6c1016d4a60f09f315 MD5 | raw file
  1. {% extends "_blog.html" %}
  2. <meta name="journal" content="True" />
  3. {% block file_metadata %}
  4. <meta name="post_id" content="4542" />
  5. <meta name="post_date" content="2012-02-13" />
  6. <meta name="author_id" content="wilson.g" />
  7. <meta name="title" content="Formatting Revisited" />
  8. <meta name="category" content="content" />
  9. <meta name="category" content="versions/version-5-0" />
  10. {% endblock file_metadata %}
  11. {% block content %}
  12. <p><a href="http://dseifried.wordpress.com/">David Seifreid</a> has been working for the past week to combine <a href="http://imakewebthings.github.com/deck.js/">deck.js</a>, a Javascript-plus-CSS slideshow package, with the <a href="https://github.com/dz0ny/AudioJS">AudioJS</a> audio player, so that we can re-do slides as pure HTML5 (instead of using PNGs exported from PowerPoint). At the same time, I'm trying to turn the course notes into long-form prose (what used to be called a "book") for people who prefer reading at leisure. How should all this content be managed? My <a href="{{root_path}}/blog/2012/01/never-mind-the-content-what-about-the-format.html">previous post</a> on 21st Century teaching formats described what I'd eventually like, but the tool I want doesn't exist yet, so what can be done now?</p>
  13. <p>We will have:</p>
  14. <ol>
  15. <li><em>metadata</em>, such as keywords and topic guides;</li>
  16. <li><em>slides</em>containing
  17. <ul>
  18. <li>vector diagrams,</li>
  19. <li>raster images,</li>
  20. <li>point-form text, and</li>
  21. <li>code samples</li>
  22. </ul>
  23. </li>
  24. <li><em>audio narration</em> synced with the slides;</li>
  25. <li><em>tranascripts</em> of the narration; and</li>
  26. <li><em>prose</em> (the "book" stuff), which may include the same code samples and figures.</li>
  27. </ol>
  28. <p>I know from experience that the transcripts of the audio will be a starting point for the book-form material, but the latter will be longer. We'll therefore have four parallel streams of data: slides, audio, narration (as text), and the book. That suggests something like this (using the topic/concept distinction I discussed <a href="{{root_path}}/blog/2012/01/terminology.html">a couple of weeks ago</a>):</p>
  29. <pre>&lt;section class="topic"&gt;
  30. &lt;section class="metadata"&gt;
  31. keywords, notes to instructors, etc.
  32. &lt;/section&gt;
  33. &lt;audio src="..." /&gt;
  34. &lt;section class="concept"&gt;
  35. &lt;section class="slide" popcorn-slideshow="start time in seconds"&gt;
  36. Slide (or several slides if we're using progressive highlighting on a single logical slide).
  37. &lt;/section&gt;
  38. &lt;section class="transcript"&gt;
  39. Text transcript of the slide (or group of closely-related slides).
  40. &lt;/section&gt;
  41. &lt;section class="book"&gt;
  42. Long-form prose discussion of the same concept.
  43. &lt;/section&gt;
  44. &lt;/section&gt;
  45. &lt;section class="concept"&gt;
  46. ...as above...
  47. &lt;/section&gt;
  48. &lt;/section&gt;</pre>
  49. <p>Diagrams and images will be stored in external files and <code>href</code>'d in&mdash;I've played with putting the SVG directly in the document, but in practice, people are going to use different tools to edit the two anyway. I'd like to use inclusions for code fragments, so that they don't have to be duplicated in the slide and book sections, but there's no standard way to do text inclusion in HTML (which is odd when you think about it, given that other media are usually included by reference instead of by value).</p>
  50. <p>The advantages of this format that I see are:</p>
  51. <ol>
  52. <li>Anyone can edit it without special tools.</li>
  53. <li>It's mergeable: provided people stick to a few rules about indentation and the like, it'll be a simple text merge (which is a <em>lot</em> easier than merging PowerPoint slides or the like).</li>
  54. <li>We can re-skin it using CSS and a bit of Javascript. (For example, the default web view won't show the transcript or book form, just the slides and audio.)</li>
  55. <li>It's accessible to people with visual handicaps (since related content is side-by-side and complete).</li>
  56. <li>We can compile it to produce web-only or print-only versions using XSLT or the like if we want to.</li>
  57. </ol>
  58. <p>Things I don't like:</p>
  59. <ol>
  60. <li>I really would like to store code snippets in external files and <code>href</code> them as if they were diagrams or images. We can do that with a simple script, but then what you're editing and what you're looking at in your previewer (browser) will be separated by a compilation step, which in my experience always results in headaches.</li>
  61. <li>Different authors' HTML editing tools will indent things differently, so we'll need to provide some sort of normalizer for them to run before doing an update or commit. It's not a big deal, but again, experience teaches that it will lead to a constant background annoyance level ("Whoops, sorry, I forgot to clean up before I committed that change").</li>
  62. </ol>
  63. <p>We <em>could</em> use a wiki-like syntax for notes, and rely on something like <a href="http://sphinx.pocoo.org/">Sphinx</a> to convert that to what we need. This is the route the authors of <a href="http://scipy-lectures.github.com/">these SciPy lectures</a> have taken, and while it's intriguing, I don't see how to support the parallel streams we want without some serious hackage. It would also tie any processing tools we build to an idiosyncratic format (reStructuredText); HTML5 might be more typing, but it can also be crunched by almost any language people are likely to use straight out of the box.</p>
  64. <p>Thoughts?</p>
  65. {% endblock content %}