{"id":595,"date":"2017-04-24T22:19:12","date_gmt":"2017-04-24T22:19:12","guid":{"rendered":"http:\/\/www.piglets.org\/blog\/?p=595"},"modified":"2017-04-24T22:31:28","modified_gmt":"2017-04-24T22:31:28","slug":"pretty-printing-c-archives-from-emails","status":"publish","type":"post","link":"https:\/\/www.piglets.org\/blog\/2017\/04\/24\/pretty-printing-c-archives-from-emails\/","title":{"rendered":"Pretty Printing C++ Archives from Emails"},"content":{"rendered":"<p>I'm just putting this here because I nearly managed to lose it. This is a part of a pretty unvarnished BASH script for a very specific purpose, taking an email file containing a ZIP of submitted C++ code from students. This script produces pretty printed PDFs of the source files named after each author to facilitate marking and annotation. It's not a thing of beauty. I think I'll probably write a new cleaner version in future.<\/p>\n<pre class=\"lang:sh decode:true\">#!\/bin\/bash\r\n# \r\n# A script to take C++ files in coursework and produce pretty printed PDF\r\n# listings named with the author information.\r\n#\r\n# It takes a ZIP file of .cpp and .h files and produces a ZIP file of PDFs\r\n#\r\n\r\n# Requires\r\n#   enscript\r\n#   ps2pdf\r\n#   munpack\r\n\r\n#\r\n# Called for each file to be encoded\r\n#\r\npretty_print_file()\r\n{\r\n  # Extract the Author JavaDoc information\r\n  author=<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.piglets.org\/blog\/wp-content\/ql-cache\/quicklatex.com-09fb5aaf9cfcf788cb7a0144ca5883e9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#99;&#97;&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"29\" style=\"vertical-align: -4px;\"\/>1 | sed -n -e 's\/^.*@[Aa]uthor <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.piglets.org\/blog\/wp-content\/ql-cache\/quicklatex.com-6bbee176f5e99b093ce5754610f65df6_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#46;&#42;\" title=\"Rendered by QuickLaTeX.com\" height=\"9\" width=\"12\" style=\"vertical-align: 0px;\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.piglets.org\/blog\/wp-content\/ql-cache\/quicklatex.com-bcffa8344145997e0861be2dd611324c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#47;&#92;&#49;&#47;&#103;&#112;&#39;&#41; &#32;&#32;&#35;&#32;&#65;&#110;&#100;&#32;&#116;&#104;&#101;&#32;&#108;&#111;&#99;&#97;&#108;&#32;&#112;&#97;&#114;&#116;&#32;&#111;&#102;&#32;&#116;&#104;&#101;&#32;&#101;&#109;&#97;&#105;&#108;&#32;&#97;&#100;&#100;&#114;&#101;&#115;&#115; &#32;&#32;&#97;&#117;&#116;&#104;&#111;&#114;&#95;&#115;&#110;&#105;&#112;&#61;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"429\" style=\"vertical-align: -5px;\"\/>(cat <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.piglets.org\/blog\/wp-content\/ql-cache\/quicklatex.com-85a5fe5b418db5efcd0d5237cf220448_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#49;&#32;&#124;&#32;&#115;&#101;&#100;&#32;&#45;&#110;&#32;&#45;&#101;&#32;&#39;&#115;&#47;&#94;&#46;&#42;&#64;&#091;&#65;&#97;&#093;&#117;&#116;&#104;&#111;&#114;&#46;&#42;&#60;&#60;&#105;&#109;&#103;&#32;&#115;&#114;&#99;&#61;&#34;&#104;&#116;&#116;&#112;&#115;&#58;&#47;&#47;&#119;&#119;&#119;&#46;&#112;&#105;&#103;&#108;&#101;&#116;&#115;&#46;&#111;&#114;&#103;&#47;&#98;&#108;&#111;&#103;&#47;&#119;&#112;&#45;&#99;&#111;&#110;&#116;&#101;&#110;&#116;&#47;&#113;&#108;&#45;&#99;&#97;&#99;&#104;&#101;&#47;&#113;&#117;&#105;&#99;&#107;&#108;&#97;&#116;&#101;&#120;&#46;&#99;&#111;&#109;&#45;&#54;&#98;&#98;&#101;&#101;&#49;&#55;&#54;&#102;&#53;&#101;&#57;&#57;&#98;&#48;&#57;&#51;&#99;&#101;&#53;&#55;&#53;&#52;&#54;&#49;&#48;&#102;&#54;&#53;&#100;&#102;&#54;&#95;&#108;&#51;&#46;&#112;&#110;&#103;&#34;&#32;&#99;&#108;&#97;&#115;&#115;&#61;&#34;&#113;&#108;&#45;&#105;&#109;&#103;&#45;&#105;&#110;&#108;&#105;&#110;&#101;&#45;&#102;&#111;&#114;&#109;&#117;&#108;&#97;&#32;&#113;&#117;&#105;&#99;&#107;&#108;&#97;&#116;&#101;&#120;&#45;&#97;&#117;&#116;&#111;&#45;&#102;&#111;&#114;&#109;&#97;&#116;&#34;&#32;&#97;&#108;&#116;&#61;&#34;&#46;&#42;&#34;&#32;&#116;&#105;&#116;&#108;&#101;&#61;&#34;&#82;&#101;&#110;&#100;&#101;&#114;&#101;&#100;&#32;&#98;&#121;&#32;&#81;&#117;&#105;&#99;&#107;&#76;&#97;&#84;&#101;&#88;&#46;&#99;&#111;&#109;&#34;&#32;&#104;&#101;&#105;&#103;&#104;&#116;&#61;&#34;&#57;&#34;&#32;&#119;&#105;&#100;&#116;&#104;&#61;&#34;&#49;&#50;&#34;&#32;&#115;&#116;&#121;&#108;&#101;&#61;&#34;&#118;&#101;&#114;&#116;&#105;&#99;&#97;&#108;&#45;&#97;&#108;&#105;&#103;&#110;&#58;&#32;&#48;&#112;&#120;&#59;&#34;&#47;&#62;&#64;&#46;&#42;\" title=\"Rendered by QuickLaTeX.com\" height=\"130\" width=\"582\" style=\"vertical-align: -5px;\"\/>\/\\1\/gp')\r\n\r\n  # How many lines did we get back?\r\n  lines=<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.piglets.org\/blog\/wp-content\/ql-cache\/quicklatex.com-3d58abaefae7f44a179c2a77cb47e466_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#101;&#99;&#104;&#111;&#32;&#34;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"48\" style=\"vertical-align: -4px;\"\/>author_snip\" | wc -l)\r\n\r\n  # If we got no author info\r\n  if [ <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.piglets.org\/blog\/wp-content\/ql-cache\/quicklatex.com-91a8efa0ac491f389e2f5f3ab73f084f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#108;&#105;&#110;&#101;&#115;&#32;&#45;&#101;&#113;&#32;&#34;&#48;&#34;&#32;&#093; &#32;&#32;&#32;&#32;&#116;&#104;&#101;&#110; &#32;&#32;&#32;&#32;&#32;&#32;&#97;&#117;&#116;&#104;&#111;&#114;&#61;&#34;&#110;&#111;&#45;&#97;&#117;&#116;&#104;&#111;&#114;&#34; &#32;&#32;&#32;&#32;&#32;&#32;&#97;&#117;&#116;&#104;&#111;&#114;&#95;&#115;&#110;&#105;&#112;&#61;&#34;&#110;&#111;&#45;&#97;&#117;&#116;&#104;&#111;&#114;&#34; &#32;&#32;&#102;&#105;  &#32;&#32;&#35;&#32;&#73;&#102;&#32;&#119;&#101;&#32;&#103;&#111;&#116;&#32;&#110;&#111;&#32;&#97;&#117;&#116;&#104;&#111;&#114;&#32;&#105;&#110;&#102;&#111;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32; &#32;&#32;&#105;&#102;&#32;&#091;&#32;&#45;&#122;&#32;&#34;\" title=\"Rendered by QuickLaTeX.com\" height=\"40\" width=\"571\" style=\"vertical-align: -5px;\"\/>author_snip\" ]\r\n    then\r\n      author=\"no-author\"\r\n      author_snip=\"no-author\"\r\n  fi\r\n\r\n  # if we got too many\r\n  if [ <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.piglets.org\/blog\/wp-content\/ql-cache\/quicklatex.com-c0e307c321d612f6224a94d7c5b3d767_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#108;&#105;&#110;&#101;&#115;&#32;&#45;&#103;&#101;&#32;&#34;&#50;&#34;&#32;&#093; &#32;&#32;&#32;&#32;&#116;&#104;&#101;&#110; &#32;&#32;&#32;&#32;&#32;&#32;&#97;&#117;&#116;&#104;&#111;&#114;&#61;&#34;&#109;&#117;&#108;&#116;&#105;&#112;&#108;&#101;&#45;&#97;&#117;&#116;&#104;&#111;&#114;&#115;&#34; &#32;&#32;&#32;&#32;&#32;&#32;&#97;&#117;&#116;&#104;&#111;&#114;&#95;&#115;&#110;&#105;&#112;&#61;&#34;&#109;&#117;&#108;&#116;&#105;&#112;&#108;&#101;&#45;&#97;&#117;&#116;&#104;&#111;&#114;&#115;&#34; &#32;&#32;&#102;&#105;  &#32;&#32;&#101;&#99;&#104;&#111;&#32;&#34;&#70;&#105;&#108;&#101;\" title=\"Rendered by QuickLaTeX.com\" height=\"58\" width=\"582\" style=\"vertical-align: -1px;\"\/>1, Author <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.piglets.org\/blog\/wp-content\/ql-cache\/quicklatex.com-98183b1458897cf8dd1e4579c26729f5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#97;&#117;&#116;&#104;&#111;&#114;&#32;&#40;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"59\" style=\"vertical-align: -4px;\"\/>author_snip)\"\r\n  output=<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.piglets.org\/blog\/wp-content\/ql-cache\/quicklatex.com-72a292d506f2a154bfefb4129b73376c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#97;&#117;&#116;&#104;&#111;&#114;&#95;&#115;&#110;&#105;&#112;&#45;\" title=\"Rendered by QuickLaTeX.com\" height=\"17\" width=\"99\" style=\"vertical-align: -4px;\"\/>1\r\n  output+=\".pdf\"\r\n  echo \"Encoding <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.piglets.org\/blog\/wp-content\/ql-cache\/quicklatex.com-64c3233f4ebf25ba73b981d1b915d85b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#111;&#117;&#116;&#112;&#117;&#116;&#46;&#46;&#46;&#34; &#32;&#32;&#101;&#110;&#115;&#99;&#114;&#105;&#112;&#116;&#32;&#45;&#113;&#32;&#45;&#45;&#99;&#111;&#108;&#111;&#114;&#61;&#49;&#32;&#45;&#67;&#32;&#45;&#114;&#32;&#45;&#69;&#99;&#112;&#112;&#32;&#45;&#102;&#67;&#111;&#117;&#114;&#105;&#101;&#114;&#56;&#32;&#45;&#111;&#32;&#45;\" title=\"Rendered by QuickLaTeX.com\" height=\"17\" width=\"552\" style=\"vertical-align: -4px;\"\/>1 | ps2pdf - parsed-output\/<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.piglets.org\/blog\/wp-content\/ql-cache\/quicklatex.com-f88bea87b06d02862790dab1239cf18e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#111;&#117;&#116;&#112;&#117;&#116; &#125;  &#35; &#35;&#32;&#85;&#115;&#97;&#103;&#101;&#32;&#105;&#110;&#102;&#111; &#35; &#105;&#102;&#32;&#091;&#32;&#33;&#32;&#45;&#102;\" title=\"Rendered by QuickLaTeX.com\" height=\"39\" width=\"146\" style=\"vertical-align: -5px;\"\/>1 ]\r\n  then\r\n    echo \"Usage: unpack_coursework &lt;email_file&gt;\"\r\n    exit\r\nfi\r\n\r\n# Make a temporary directory and copy the email file into it.\r\necho \"Creating temporary directory...\"\r\ndir=`mktemp -d`\r\necho <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.piglets.org\/blog\/wp-content\/ql-cache\/quicklatex.com-0047ae972a31a2c3dae712b6641dc61c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#100;&#105;&#114; &#99;&#112;\" title=\"Rendered by QuickLaTeX.com\" height=\"17\" width=\"41\" style=\"vertical-align: -4px;\"\/>1 <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.piglets.org\/blog\/wp-content\/ql-cache\/quicklatex.com-e0420ddb46be53c4a096aff852d8a5be_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#100;&#105;&#114; &#35;&#32;&#77;&#111;&#118;&#101;&#32;&#116;&#111;&#32;&#116;&#104;&#97;&#116;&#32;&#100;&#105;&#114;&#101;&#99;&#116;&#111;&#114;&#121; &#112;&#117;&#115;&#104;&#100;\" title=\"Rendered by QuickLaTeX.com\" height=\"17\" width=\"236\" style=\"vertical-align: -4px;\"\/>dir\r\n\r\n# Unpack the email\r\necho \"Unpacking email...\"\r\nmunpack <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.piglets.org\/blog\/wp-content\/ql-cache\/quicklatex.com-5a0d1f541cc21d24425ccc619227ed72_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#49;  &#35;&#32;&#67;&#114;&#101;&#97;&#116;&#101;&#32;&#97;&#32;&#100;&#105;&#114;&#101;&#99;&#116;&#111;&#114;&#121;&#32;&#105;&#110;&#116;&#111;&#32;&#119;&#104;&#105;&#99;&#104;&#32;&#116;&#111;&#32;&#100;&#114;&#111;&#112;&#32;&#116;&#104;&#101;&#32;&#112;&#114;&#101;&#116;&#116;&#121;&#32;&#112;&#114;&#105;&#110;&#116;&#101;&#100;&#32;&#111;&#117;&#116;&#112;&#117;&#116; &#109;&#107;&#100;&#105;&#114;&#32;&#112;&#97;&#114;&#115;&#101;&#100;&#45;&#111;&#117;&#116;&#112;&#117;&#116;  &#35;&#32;&#78;&#111;&#116;&#32;&#115;&#111;&#32;&#101;&#108;&#101;&#103;&#97;&#110;&#116;&#44;&#32;&#98;&#117;&#116;&#32;&#101;&#120;&#116;&#114;&#97;&#99;&#116;&#32;&#97;&#110;&#121;&#32;&#46;&#99;&#112;&#112;&#32;&#97;&#110;&#100;&#32;&#46;&#104;&#32;&#115;&#111;&#117;&#114;&#99;&#101;&#32;&#102;&#114;&#111;&#109;&#32;&#114;&#101;&#115;&#117;&#108;&#116;&#105;&#110;&#103;&#32;&#90;&#73;&#80;&#115; &#101;&#99;&#104;&#111;&#32;&#34;&#85;&#110;&#112;&#97;&#99;&#107;&#105;&#110;&#103;&#32;&#97;&#110;&#121;&#32;&#122;&#105;&#112;&#115;&#46;&#46;&#46;&#34; &#102;&#111;&#114;&#32;&#102;&#32;&#105;&#110;&#32;&#42;&#46;&#122;&#105;&#112; &#100;&#111; &#32;&#32;&#117;&#110;&#122;&#105;&#112;&#32;&#45;&#67;&#106;\" title=\"Rendered by QuickLaTeX.com\" height=\"103\" width=\"583\" style=\"vertical-align: -3px;\"\/>f *.cpp\r\n  unzip -Cj <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.piglets.org\/blog\/wp-content\/ql-cache\/quicklatex.com-5fc04e940ee0bb9fb512709bc4375fc6_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#102;&#32;&#42;&#46;&#104; &#100;&#111;&#110;&#101;  &#35;&#32;&#80;&#114;&#111;&#100;&#117;&#99;&#101;&#32;&#97;&#110;&#32;&#97;&#117;&#116;&#104;&#111;&#114;&#32;&#114;&#101;&#110;&#97;&#109;&#101;&#100;&#44;&#32;&#112;&#114;&#101;&#116;&#116;&#121;&#32;&#112;&#114;&#105;&#110;&#116;&#101;&#100;&#32;&#80;&#68;&#70;&#32;&#102;&#111;&#114;&#32;&#101;&#97;&#99;&#104;&#32;&#104;&#101;&#97;&#100;&#101;&#114;&#32;&#102;&#105;&#108;&#101; &#115;&#104;&#111;&#112;&#116;&#32;&#45;&#115;&#32;&#103;&#108;&#111;&#98;&#115;&#116;&#97;&#114; &#101;&#99;&#104;&#111;&#32;&#34;&#80;&#97;&#114;&#115;&#101;&#32;&#46;&#104;&#32;&#102;&#105;&#108;&#101;&#115;&#46;&#46;&#46;&#34; &#102;&#111;&#114;&#32;&#102;&#32;&#105;&#110;&#32;&#42;&#46;&#104; &#100;&#111; &#32;&#32;&#112;&#114;&#101;&#116;&#116;&#121;&#95;&#112;&#114;&#105;&#110;&#116;&#95;&#102;&#105;&#108;&#101;\" title=\"Rendered by QuickLaTeX.com\" height=\"63\" width=\"582\" style=\"vertical-align: -6px;\"\/>f\r\ndone\r\n\r\n# And the same for source files\r\necho \"Parse .cpp files...\"\r\nfor f in *.cpp\r\ndo\r\n  pretty_print_file <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.piglets.org\/blog\/wp-content\/ql-cache\/quicklatex.com-4305bf2576f74b02e0faafd4f8d12833_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#102; &#100;&#111;&#110;&#101;  &#35;&#32;&#80;&#117;&#108;&#108;&#32;&#116;&#111;&#103;&#101;&#116;&#104;&#101;&#114;&#32;&#97;&#108;&#108;&#32;&#116;&#104;&#101;&#32;&#112;&#114;&#101;&#116;&#116;&#121;&#32;&#112;&#114;&#105;&#110;&#116;&#101;&#100;&#32;&#99;&#111;&#110;&#116;&#101;&#110;&#116;&#32;&#105;&#110;&#116;&#111;&#32;&#97;&#32;&#110;&#101;&#119;&#32;&#90;&#73;&#80; &#101;&#99;&#104;&#111;&#32;&#34;&#90;&#105;&#112;&#112;&#105;&#110;&#103;&#32;&#112;&#97;&#114;&#115;&#101;&#100;&#32;&#111;&#117;&#116;&#112;&#117;&#116;&#46;&#46;&#46;&#34; &#99;&#100;\" title=\"Rendered by QuickLaTeX.com\" height=\"60\" width=\"584\" style=\"vertical-align: -3px;\"\/>dir\/parsed-output\r\nzip parsed-output *.pdf\r\ncd ..\r\n\r\n# Back to the directory we started in.\r\npopd\r\n\r\n# Copy the parsed ZIP to the current directory for inspection and marking\r\ncp <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.piglets.org\/blog\/wp-content\/ql-cache\/quicklatex.com-40e21a92ba89f471f22a285b1dfb0d25_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#100;&#105;&#114;&#47;&#112;&#97;&#114;&#115;&#101;&#100;&#45;&#111;&#117;&#116;&#112;&#117;&#116;&#47;&#112;&#97;&#114;&#115;&#101;&#100;&#45;&#111;&#117;&#116;&#112;&#117;&#116;&#46;&#122;&#105;&#112;&#32;&#46;  &#35;&#32;&#67;&#108;&#101;&#97;&#110;&#117;&#112; &#101;&#99;&#104;&#111;&#32;&#34;&#68;&#101;&#108;&#101;&#116;&#105;&#110;&#103;&#32;&#116;&#101;&#109;&#112;&#111;&#114;&#97;&#114;&#121;&#32;&#100;&#105;&#114;&#101;&#99;&#116;&#111;&#114;&#121;&#46;&#46;&#46;&#34; &#35;&#101;&#99;&#104;&#111;\" title=\"Rendered by QuickLaTeX.com\" height=\"38\" width=\"407\" style=\"vertical-align: -3px;\"\/>dir\r\nrm -rf $dir\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I'm just putting this here because I nearly managed to lose it. This is a part of a pretty unvarnished BASH script for a very specific purpose, taking an email file containing a ZIP of submitted C++ code from students. This script produces pretty printed PDFs of the source files named after each author to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"vkexunit_cta_each_option":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[7,125],"tags":[218,217,222,219,16,126,220,221],"class_list":["post-595","post","type-post","status-publish","format-standard","hentry","category-11-free-software","category-higher-education","tag-bash","tag-c","tag-coursework","tag-enscript","tag-free-software","tag-higher-education","tag-pretty-print","tag-students"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"jetpack_shortlink":"https:\/\/wp.me\/p52I4w-9B","_links":{"self":[{"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/posts\/595","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/comments?post=595"}],"version-history":[{"count":1,"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/posts\/595\/revisions"}],"predecessor-version":[{"id":596,"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/posts\/595\/revisions\/596"}],"wp:attachment":[{"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/media?parent=595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/categories?post=595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.piglets.org\/blog\/wp-json\/wp\/v2\/tags?post=595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}