Schema

Google, Microsoft, and Yahoo have gotten together to adapt a collection of microformats that will make it possible for folks who produce and publish content to the web to make searching that content more meaningful:

> Most webmasters are familiar with HTML tags on their pages. Usually, HTML tags tell the browser how to display the information included in the tag. For example, `

Avatar

` tells the browser to display the text string “Avatar” in a heading 1 format. However, the HTML tag doesn’t give any information about what that text string means — “Avatar” could refer to the a hugely successful 3D movie, or it could refer to a type of profile picture—and this can make it more difficult for search engines to intelligently display relevant content to a user.

> Schema.org provides a collection of shared vocabularies webmasters can use to mark up their pages in ways that can be understood by the major search engines: Google, Microsoft, and Yahoo!

> You use the schema.org vocabulary, along with the microdata format, to add information to your HTML content. While the long term goal is to support a wider range of formats, the initial focus is on Microdata. This guide will help get you up to speed with microdata and schema.org, so that you can start adding markup to your web pages.

Syntax Highlighting in Word

I am working on my paper for the computational folkloristics panel at AFS this year. My goal is to apply some of the network theory and visualization methods I learned at the NEH Institute on Networks and Networking in the Humanities do the intellectual history of folklore studies. I thought an interesting phenemonenon to tackle would be the emergence of performance studies as a paradigm. That is, what does a paradigm shift look like from the point of view of a network? What did it look like in folklore studies?

To do this work I am interacting with JSTOR’s *Data for Research* program, and I am trying to keep notes as I go. Because this will eventually be something I want to share with others, I am keeping my notes in Word — if only because I can control the presentation much more readily. For the XML with which I am working to be more readable, it could use some syntax highlighting, a feature I count on in my text editor, Textmate, but which is not available in Word … unless, of course, you happen upon on-line sites which will do the work for you.

One such site is [ToHTML](http://tohtml.com/). [PlanetB](http://www.planetb.ca/2008/11/syntax-highlight-code-in-word-documents/) will also do some syntax highlighting.

Zen Coding for HTML

[Zen Coding for HTML](http://www.downloadsquad.com/2010/04/30/if-you-code-html-zen-coding-will-change-your-life/) allows you to type this:

div#page>div.logo+ul#navigation>li*5>a

and have your text editor convert it to this:

Convert HTML to text

I forgot from where I copied this script:

#!/bin/bash
# Usage: convert-html-to-md […]
# Convert the specified HTML files into Markdown text-format equivalents
# in the current working directory. The file extension will be .md.txt.
# Requires the html2text.py Python script by Aaron Swartz to convert
# from HTML to Markdown text [www.aaronsw.com/2002/html2text/].
# html2text=”${1}”shift

[while [ -n “${1}” ] ; do
# Use the contents of the title element for the filename. In case
# the title element spans multiple lines, the entire file is first
# converted to a single line before the sed pattern is applied. Any
# “unsafe” characters are then replaced with hyphens to produce a
# valid filename.
title=$(cat “${1}” | \
tr -d ‘\n\r’ | \
sed -nre ‘s/^.*(.*?)<\/title>.*$/\1\n/ip’ | \<br /> tr “\`~\!@#$%^&*()+={}|[]\\:;\”\’<>?,/ \t” ‘[-*]’)</p> <p> # If there’s no title, then just use the original filename.<br /> if [ -z “${title}” ] ; then<br /> title=$(basename “${1}” .html)<br /> fi</p> <p> # Convert the HTML to Markdown.<br /> cat “${1}” | python “${html2text}” > “${title}.md.txt”<br /> shift<br /> done]</p> </div><!-- .entry-content --> <footer class="entry-meta"> Posted on <a href="http://johnlaudun.org/20080508-convert-html-to-text/" title="12:16" rel="bookmark"><time class="entry-date" datetime="2008-05-08T12:16:18+00:00" pubdate>2008 May 8</time></a><span class="byline"> by <span class="author vcard"><a class="url fn n" href="http://johnlaudun.org/author/johnlaudun/" title="View all posts by johnlaudun" rel="author">johnlaudun</a></span></span>. <span class="sep"> | </span> <span class="tags-links"> Tagged: <a href="http://johnlaudun.org/tag/code/" rel="tag">code</a>, <a href="http://johnlaudun.org/tag/html/" rel="tag">html</a>, <a href="http://johnlaudun.org/tag/python/" rel="tag">python</a>.</span> </footer><!-- .entry-meta --> </article><!-- #post-1997 --> </div><!-- #content .site-content --> </section><!-- #primary .content-area --> <div id="secondary" class="widget-area" role="complementary"> <aside id="search-5" class="widget widget_search"> <form method="get" id="searchform" action="http://johnlaudun.org/" role="search"> <label for="s" class="assistive-text">Search</label> <input type="text" class="field" name="s" value="" id="s" placeholder="Search …" /> <input type="submit" class="submit" name="submit" id="searchsubmit" value="Search" /> </form> </aside><aside id="text-3" class="widget widget_text"> <div class="textwidget"><a href="http://johnlaudun.org/boat/" rel="attachment wp-att-7877"><img src="https://i0.wp.com/media.johnlaudun.org.s3.amazonaws.com/wordpress/media/2016/01/ACB-cover-small-103x150.jpeg?resize=103%2C150" alt="The Amazing Crawfish Boat" data-recalc-dims="1" /></a> <p style="line-height:1.1 "><small><em>The Amazing Crawfish Boat</em> is available at your favorite bookseller (both <a href="http://amzn.to/1rf9wAT">Amazon</a> and <a href="http://www.barnesandnoble.com/w/the-amazing-crawfish-boat-john-laudun/1121843205?ean=9781496804204">B&N</a>). I have also released some additional <em>free</em> materials: audio versions of some of the chapters and photos — all available for download. Details are available on the <a href="http://johnlaudun.org/boat/">book’s page</a>.</small></p></div> </aside><aside id="top-posts-2" class="widget widget_top-posts"><h1 class="widget-title">Top Posts</h1><ul> <li> <a href="http://johnlaudun.org/20131228-ipython-notebook-keyboard-shortcuts/" class="bump-view" data-bump-view="tp"> iPython Notebook Keyboard Shortcuts </a> </li> <li> <a href="http://johnlaudun.org/20150512-installing-and-setting-pip-with-macports/" class="bump-view" data-bump-view="tp"> Installing, and Setting, PIP with MacPorts </a> </li> <li> <a href="http://johnlaudun.org/20170228-open-source-tools-for-nlp/" class="bump-view" data-bump-view="tp"> Open Source Tools for NLP </a> </li> <li> <a href="http://johnlaudun.org/20121207-streaming-audio-to-an-onkyo-receiver/" class="bump-view" data-bump-view="tp"> Streaming Audio to an Onkyo Receiver </a> </li> <li> <a href="http://johnlaudun.org/20080321-word-wrap-filling-in-emacs/" class="bump-view" data-bump-view="tp"> Word-wrap (filling) in Emacs </a> </li> </ul></aside> </div><!-- #secondary .widget-area --> </div><!-- #main .site-main --> <footer id="colophon" class="site-footer" role="contentinfo"> <div class="site-info"> <a href="http://wordpress.org/" rel="generator">Proudly powered by WordPress</a> Theme: Publish by <a href="http://kovshenin.com/" rel="designer">Konstantin Kovshenin</a>. </div><!-- .site-info --> </footer><!-- #colophon .site-footer --> </div><!-- #page .hfeed .site --> <div style="display:none"> </div> <script> jQuery(document).ready(function () { jQuery.post('http://johnlaudun.org?ga_action=googleanalytics_get_script', {action: 'googleanalytics_get_script'}, function(response) { var F = new Function ( response ); return( F() ); }); }); </script><script type='text/javascript' src='http://johnlaudun.org/wordpress/wp-content/plugins/jetpack/modules/photon/photon.js?ver=20130122'></script> <script type='text/javascript' src='https://s0.wp.com/wp-content/js/devicepx-jetpack.js?ver=201750'></script> <script type='text/javascript'> /* <![CDATA[ */ var jetpackCarouselStrings = {"widths":[370,700,1000,1200,1400,2000],"is_logged_in":"","lang":"en","ajaxurl":"http:\/\/johnlaudun.org\/wordpress\/wp-admin\/admin-ajax.php","nonce":"c6aa7f68d7","display_exif":"1","display_geo":"1","single_image_gallery":"1","single_image_gallery_media_file":"","background_color":"black","comment":"Comment","post_comment":"Post Comment","write_comment":"Write a Comment...","loading_comments":"Loading Comments...","download_original":"View full size <span class=\"photo-size\">{0}<span class=\"photo-size-times\">\u00d7<\/span>{1}<\/span>","no_comment_text":"Please be sure to submit some text with your comment.","no_comment_email":"Please provide an email address to comment.","no_comment_author":"Please provide your name to comment.","comment_post_error":"Sorry, but there was an error posting your comment. Please try again later.","comment_approved":"Your comment was approved.","comment_unapproved":"Your comment is in moderation.","camera":"Camera","aperture":"Aperture","shutter_speed":"Shutter Speed","focal_length":"Focal Length","copyright":"Copyright","comment_registration":"0","require_name_email":"1","login_url":"http:\/\/johnlaudun.org\/wordpress\/wp-login.php?redirect_to=http%3A%2F%2Fjohnlaudun.org%2F20110608-schema%2F","blog_id":"1","meta_data":["camera","aperture","shutter_speed","focal_length","copyright"],"local_comments_commenting_as":"<fieldset><label for=\"email\">Email (Required)<\/label> <input type=\"text\" name=\"email\" class=\"jp-carousel-comment-form-field jp-carousel-comment-form-text-field\" id=\"jp-carousel-comment-form-email-field\" \/><\/fieldset><fieldset><label for=\"author\">Name (Required)<\/label> <input type=\"text\" name=\"author\" class=\"jp-carousel-comment-form-field jp-carousel-comment-form-text-field\" id=\"jp-carousel-comment-form-author-field\" \/><\/fieldset><fieldset><label for=\"url\">Website<\/label> <input type=\"text\" name=\"url\" class=\"jp-carousel-comment-form-field jp-carousel-comment-form-text-field\" id=\"jp-carousel-comment-form-url-field\" \/><\/fieldset>"}; /* ]]> */ </script> <script type='text/javascript' src='http://johnlaudun.org/wordpress/wp-content/plugins/jetpack/modules/carousel/jetpack-carousel.js?ver=20170209'></script> <script type='text/javascript'> /* <![CDATA[ */ var mejsL10n = {"language":"en-US","strings":{"Close":"Close","Fullscreen":"Fullscreen","Turn off Fullscreen":"Turn off Fullscreen","Go Fullscreen":"Go Fullscreen","Download File":"Download File","Download Video":"Download Video","Play":"Play","Pause":"Pause","Captions\/Subtitles":"Captions\/Subtitles","None":"None","Time Slider":"Time Slider","Skip back %1 seconds":"Skip back %1 seconds","Video Player":"Video Player","Audio Player":"Audio Player","Volume Slider":"Volume Slider","Mute Toggle":"Mute Toggle","Unmute":"Unmute","Mute":"Mute","Use Up\/Down Arrow keys to increase or decrease volume.":"Use Up\/Down Arrow keys to increase or decrease volume.","Use Left\/Right Arrow keys to advance one second, Up\/Down arrows to advance ten seconds.":"Use Left\/Right Arrow keys to advance one second, Up\/Down arrows to advance ten seconds."}}; var _wpmejsSettings = {"pluginPath":"\/wordpress\/wp-includes\/js\/mediaelement\/"}; /* ]]> */ </script> <script type='text/javascript' src='http://johnlaudun.org/wordpress/wp-includes/js/mediaelement/mediaelement-and-player.min.js?ver=2.22.0'></script> <script type='text/javascript' src='http://johnlaudun.org/wordpress/wp-includes/js/mediaelement/wp-mediaelement.min.js?ver=4.8.4'></script> <script type='text/javascript' src='http://s.gravatar.com/js/gprofiles.js?ver=2017Decaa'></script> <script type='text/javascript'> /* <![CDATA[ */ var WPGroHo = {"my_hash":""}; /* ]]> */ </script> <script type='text/javascript' src='http://johnlaudun.org/wordpress/wp-content/plugins/jetpack/modules/wpgroho.js?ver=4.8.4'></script> <script type='text/javascript' src='http://johnlaudun.org/wordpress/wp-content/themes/publish/js/small-menu.js?ver=20120206'></script> <script type='text/javascript' src='http://johnlaudun.org/wordpress/wp-includes/js/wp-embed.min.js?ver=4.8.4'></script> <script type='text/javascript' src='https://stats.wp.com/e-201750.js' async defer></script> <script type='text/javascript'> _stq = window._stq || []; _stq.push([ 'view', {v:'ext',j:'1:5.3',blog:'33779968',post:'0',tz:'-6',srv:'johnlaudun.org'} ]); _stq.push([ 'clickTrackerInit', '33779968', '0' ]); </script> </body> </html>