{"id":133,"date":"2023-09-30T13:07:13","date_gmt":"2023-09-30T13:07:13","guid":{"rendered":"https:\/\/www.cyram.org\/blog\/?p=133"},"modified":"2023-09-30T16:20:08","modified_gmt":"2023-09-30T16:20:08","slug":"document-renderer-release","status":"publish","type":"post","link":"https:\/\/www.cyram.org\/blog\/?p=133","title":{"rendered":"Document Renderer Release"},"content":{"rendered":"<div class=\"boldgrid-section\">\n<div class=\"container\">\n<div class=\"row\">\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\n<p class=\"\">I&#8217;ve open sourced a simple python script I made that takes my novel <a href=\"https:\/\/github.com\/cyramic\/cyrender\">and generates a word document<\/a> each time I update it. Why do I do this? Well, I find on my phone that most document editors (Google Docs, Microsoft Word, etc) can be a bit annoying to use for me. When I&#8217;m writing, I don&#8217;t want any prompts about being offline, and I don&#8217;t want anything to tell me I&#8217;ve spelled things wrong. Anything that gets in the way serves to distract me.&nbsp; How do I get around this? Well, I write plain text documents using a program I first learned how to use in the 90s: Nano. It was similar to other programs I learned how to use when I first learned about computers (namely <a href=\"https:\/\/en.wikipedia.org\/wiki\/Pine_(email_client)\">Pine<\/a>&nbsp;and the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Lynx_(web_browser)\">lynx web browser<\/a>), but it was simpler than <a href=\"https:\/\/en.wikipedia.org\/wiki\/Vi\">Vi<\/a> for my needs (though I use that occasionally too).&nbsp;&nbsp;<\/p>\n<figure id=\"attachment_145\" aria-describedby=\"caption-attachment-145\" style=\"width: 980px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/nano.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-145 size-full\" title=\"nanoeditor\" src=\"https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/nano.png\" alt=\"\" width=\"980\" height=\"435\" srcset=\"https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/nano.png 980w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/nano-300x133.png 300w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/nano-768x341.png 768w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/nano-250x111.png 250w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/nano-550x244.png 550w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/nano-800x355.png 800w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/nano-406x180.png 406w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/nano-676x300.png 676w\" sizes=\"auto, (max-width: 980px) 100vw, 980px\" \/><\/a><figcaption id=\"caption-attachment-145\" class=\"wp-caption-text\">Nano<\/figcaption><\/figure>\n<p class=\"\">Pretty low-tech, right? Some times low tech can mean it&#8217;s a good thing. It has the following benefits:<\/p>\n<ul class=\"\">\n<li>It gets out of my way<\/li>\n<li>It never has notification popups<\/li>\n<li>It never has crashed in all the time I&#8217;ve used it.<\/li>\n<li>The UI has basically not changed in over 20 years<\/li>\n<li>It&#8217;s free<\/li>\n<li>The UI has a black background and white text which I find is the easiest for me to read.<\/li>\n<li>It makes the best use of my phone&#8217;s screen limited space<\/li>\n<li>Toolbars containing things I&#8217;ll never use aren&#8217;t present<\/li>\n<li>There&#8217;s no prompts for misspelled words or grammar, meaning I don&#8217;t get distracted. I can write my first draft without feeling I need to stop.<\/li>\n<li>I can use the same program on my phone, my linux computer, my windows computer, and even on my old modded Wii.<\/li>\n<\/ul>\n<p class=\"\">Sure, I could do a lot of this with word or Google Docs, or Scrivener, or whatever. I&#8217;ve tried all of those programs, but for some reason this works best for me, so I&#8217;m sticking with it for now.&nbsp; The only downsides?<\/p>\n<ul class=\"\">\n<li>No cloud storage or automatic backups<\/li>\n<li>Not the easiest platform to edit words already written<\/li>\n<li>Creates a division between my writing and the word documents I send to editors, etc. (But, I&#8217;ve found, this part isn&#8217;t necessarily a bad thing)<\/li>\n<\/ul>\n<p class=\"\">To combat this, I fill in the gaps with <a href=\"https:\/\/git-scm.com\/\">git<\/a>\/<a href=\"https:\/\/github.com\/\">github<\/a>.&nbsp; This allows me to keep things I&#8217;ve written backed up, and even version controlled. I have saved every edit I&#8217;ve ever made to the document and can visually see those changes over time. Each line has notes about when it was added, and the reason I added or edited last. I can look at a line, and see the entire history of it with notes I&#8217;ve written. I use this for work all the time, so it fits in much better with what I&#8217;m used to doing anyway.<\/p>\n<figure id=\"attachment_134\" aria-describedby=\"caption-attachment-134\" style=\"width: 774px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/blame.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-134\" src=\"https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/blame.png\" alt=\"git blame screenshot\" width=\"774\" height=\"308\" srcset=\"https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/blame.png 1253w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/blame-300x119.png 300w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/blame-1024x408.png 1024w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/blame-768x306.png 768w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/blame-250x100.png 250w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/blame-550x219.png 550w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/blame-800x319.png 800w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/blame-452x180.png 452w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/blame-753x300.png 753w\" sizes=\"auto, (max-width: 774px) 100vw, 774px\" \/><\/a><figcaption id=\"caption-attachment-134\" class=\"wp-caption-text\">Git blame, which lists when each line of the document was created and the comment that matches that change<\/figcaption><\/figure>\n<p class=\"\">I originally didn&#8217;t think this would be useful, but as I&#8217;ve improved editing, I&#8217;ve found this is quite useful and interesting to see how each paragraph has evolved and changed over the course of my book&#8217;s life.<\/p>\n<figure id=\"attachment_141\" aria-describedby=\"caption-attachment-141\" style=\"width: 890px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/commit_history.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-141\" src=\"https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/commit_history-1024x285.png\" alt=\"Git diff\" width=\"890\" height=\"247\" srcset=\"https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/commit_history-1024x285.png 1024w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/commit_history-300x84.png 300w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/commit_history-768x214.png 768w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/commit_history-1536x428.png 1536w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/commit_history-1600x446.png 1600w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/commit_history-250x70.png 250w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/commit_history-550x153.png 550w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/commit_history-800x223.png 800w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/commit_history-646x180.png 646w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/commit_history-1077x300.png 1077w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/commit_history-1795x500.png 1795w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/commit_history.png 1845w\" sizes=\"auto, (max-width: 890px) 100vw, 890px\" \/><\/a><figcaption id=\"caption-attachment-141\" class=\"wp-caption-text\">You can look at each change you&#8217;ve done in a side by side comparison.<\/figcaption><\/figure>\n<p class=\"\">The routine I go through when editing a book:<\/p>\n<ol class=\"\">\n<li>Create an issue in Github issue tracker<\/li>\n<li>Create a branch<\/li>\n<li>Edit my novel to &#8220;solve&#8221; that issue (e.g. merge two characters together)<\/li>\n<li>Merge my changes back into the document<\/li>\n<li>When I&#8217;m ready, I run the script mentioned at the start of the article to turn this into a word document<\/li>\n<li>I then, do a grammar and spelling check, making changes in the original text files (this is the most annoying part) until the document is ready to send off to friends\/editors, etc<\/li>\n<li>I get feedback, and then return to the text files again.<\/li>\n<\/ol>\n<figure id=\"attachment_136\" aria-describedby=\"caption-attachment-136\" style=\"width: 688px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/graph.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-136 size-large\" src=\"https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/graph-1024x463.png\" alt=\"Git graph (history of changes)\" width=\"688\" height=\"311\" srcset=\"https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/graph-1024x463.png 1024w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/graph-300x136.png 300w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/graph-768x347.png 768w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/graph-250x113.png 250w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/graph-550x248.png 550w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/graph-800x361.png 800w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/graph-398x180.png 398w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/graph-664x300.png 664w, https:\/\/www.cyram.org\/blog\/wp-content\/uploads\/2023\/09\/graph.png 1078w\" sizes=\"auto, (max-width: 688px) 100vw, 688px\" \/><\/a><figcaption id=\"caption-attachment-136\" class=\"wp-caption-text\">This shows a history of the changes and a small example in the middle of a branch where you can have multiple copies of your book at the same time.<\/figcaption><\/figure>\n<p class=\"\">The reason I&#8217;ve found this to be good is that it separates the process I use to create novels. The text documents are for editing, and the word docs are for sharing and publishing. By design I can&#8217;t have that fine-grained history and control with word documents, but text files aren&#8217;t something I&#8217;m going to send off to a publisher either.&nbsp; It forces me to to treat each edit as a process. If I didn&#8217;t have that, then I would struggle as it would be easy to miss steps or get distracted. With this, I know that I need to follow each edit to its conclusion and I can do several edits at the same time without worrying that they&#8217;ll cause problems.<\/p>\n<p class=\"\">Writing a novel is a huge task and can seem overwhelming most of the time. By forcing myself to break things down into small tasks, and to have a detailed history easily visible of my edits, it keeps me motivated for longer.<\/p>\n<p class=\"\">Are there better ways to do this? Almost definitely. But for me, this is working fine so I&#8217;ll keep going using this method for now.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve open sourced a simple python script I made that takes my novel and generates a word document each time&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"bgseo_title":"Python Rendering Script Released","bgseo_description":"Released my python rendering script that takes novels separated into different text files and combines them into a single word document (docx).","bgseo_robots_index":"index","bgseo_robots_follow":"follow","_exactmetrics_skip_tracking":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-133","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/www.cyram.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cyram.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cyram.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cyram.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cyram.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=133"}],"version-history":[{"count":9,"href":"https:\/\/www.cyram.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/133\/revisions"}],"predecessor-version":[{"id":146,"href":"https:\/\/www.cyram.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/133\/revisions\/146"}],"wp:attachment":[{"href":"https:\/\/www.cyram.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cyram.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cyram.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}