{"id":4106,"date":"2014-11-29T13:13:57","date_gmt":"2014-11-29T18:13:57","guid":{"rendered":"http:\/\/nickm.com\/post\/?p=4106"},"modified":"2019-07-01T17:29:14","modified_gmt":"2019-07-01T21:29:14","slug":"megawatt","status":"publish","type":"post","link":"https:\/\/nickm.com\/post\/2014\/11\/megawatt\/","title":{"rendered":"Megawatt"},"content":{"rendered":"<p><a href=\"http:\/\/nickm.com\/poems\/megawatt.pdf\" style=\"float:right; margin-left:8px\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/nickm.com\/post\/wp-content\/stuff\/megawatt_cover.png\" alt=\"Megawatt cover\" width=\"227\" height=\"366\"\/><\/a><i>The fruits of my National Novel Generation Month (NaNoGenMo) labors are now online; <a href=\"http:\/\/nickm.com\/code\/megawatt.py\">the <i>Megawatt<\/i> generator<\/a> is available as a single 350-line Python file, while the novel it deterministically generates can be obtained <a href=\"http:\/\/nickm.com\/poems\/megawatt.pdf\">as a PDF, megawatt.pdf<\/a> or <a href=\"http:\/\/nickm.com\/poems\/megawatt.epub\">in epub format, megawatt.epub.<\/a> From the program&#8217;s docstring and from the preface to the book:<\/i><\/p>\n<p><i>Megawatt<\/i> is the title of both a computer program, the source code<br \/>\nto which you may be reading, and the output of this program, which in<br \/>\nmany ways is like a standard novel and which you may instead be reading.<br \/>\nThis note appears at the beginning of both.<\/p>\n<p>The program <i>Megawatt<\/i> is based on passages from Samuel Beckett\u2019s novel <i>Watt,<\/i> first published in 1953 but written much earlier, when Beckett was aiding the French Resistance during World War II.<\/p>\n<p>The novel <i>Megawatt<\/i> leaves aside all of the more intelligible language of Beckett\u2019s novel and is based, instead, on that which is most systematic and inscrutable. It does not just recreate these passages, although with minor changes the <i>Megawatt<\/i> code can be used to do so. In the new novel, rather, they are intensified by generating, using the same methods that Beckett used, significantly more text than is found in the already excessive <i>Watt<\/i>.<\/p>\n<p><b><i>(Please note: The following information is handy if you want to, for instance, modify the program and generate a PDF or epub yourself. You don&#8217;t need to do this to read the novel. You can download it in <a href=\"http:\/\/nickm.com\/poems\/megawatt.pdf\">PDF: megawatt.pdf<\/a> or in <a href=\"http:\/\/nickm.com\/poems\/megawatt.epub\">epub format: megawatt.epub.<\/a>)<\/i><\/b><\/p>\n<p>To produce the novel in markdown format, run megawatt.py (a Python 2<br \/>\nprogram) with TextBlob (a text processing library) installed.<\/p>\n<p>% python megawatt.py &gt; megawatt.text<\/p>\n<p>To produce PDF and epub documents, use pandoc:<\/p>\n<p>% pandoc -V geometry:paperwidth=5.5in \\<br \/>\n-V geometry:paperheight=8.25in \\<br \/>\n-V geometry:margin=.7in -o megawatt.pdf \\<br \/>\nmegawatt.text<br \/>\n% echo &#8216;% Megawatt&#8217; &gt; info.txt<br \/>\n% echo &#8216;% Nick Montfort&#8217; &gt;&gt; info.txt<br \/>\n% pandoc -o megawatt.epub info.txt megawatt.text<\/p>\n<p><i>Megawatt<\/i> was written\/generated for the second NaNoGenMo (National<br \/>\nNovel Generation Month) in November 2014, and is free software.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The fruits of my National Novel Generation Month (NaNoGenMo) labors are now online; the Megawatt generator is available as a single 350-line Python file, while the novel it deterministically generates can be obtained as a PDF, megawatt.pdf or in epub format, megawatt.epub. From the program&#8217;s docstring and from the preface to the book: Megawatt is &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/nickm.com\/post\/2014\/11\/megawatt\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Megawatt&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[40,138,169,168,30],"class_list":["post-4106","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-fiction","tag-generation","tag-megawatt","tag-nanogenmo","tag-story-generation"],"_links":{"self":[{"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/posts\/4106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/comments?post=4106"}],"version-history":[{"count":11,"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/posts\/4106\/revisions"}],"predecessor-version":[{"id":4776,"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/posts\/4106\/revisions\/4776"}],"wp:attachment":[{"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/media?parent=4106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/categories?post=4106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nickm.com\/post\/wp-json\/wp\/v2\/tags?post=4106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}