﻿<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="text" xml:lang="en">docbook2odf</title>
  <link type="application/atom+xml" href="https://d.moonfire.us/tags/docbook2odf/atom.xml" rel="self" />
  <link type="text/html" href="https://d.moonfire.us/tags/docbook2odf/" rel="alternate" />
  <updated>2026-06-05T17:38:36Z</updated>
  <id>https://d.moonfire.us/tags/docbook2odf/</id>
  <author>
    <name>D. Moonfire</name>
  </author>
  <rights>Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International</rights>
  <entry>
    <title>A lot of little things going on</title>
    <link rel="alternate" href="https://d.moonfire.us/blog/2014/03/10/a-lot-of-little-things-going-on/" />
    <updated>2014-03-10T05:00:00Z</updated>
    <id>https://d.moonfire.us/blog/2014/03/10/a-lot-of-little-things-going-on/</id>
    <category term="programming" scheme="https://d.moonfire.us/categories/" label="Programming" />
    <category term="writing" scheme="https://d.moonfire.us/categories/" label="Writing" />
    <category term="commissions" scheme="https://d.moonfire.us/tags/" label="Commissions" />
    <category term="docbook2odf" scheme="https://d.moonfire.us/tags/" label="docbook2odf" />
    <category term="mfgames-writing-make" scheme="https://d.moonfire.us/tags/" label="MfGames Writing Make" />
    <category term="sand-and-ash" scheme="https://d.moonfire.us/tags/" label="Sand and Ash" />
    <category term="sand-and-blood" scheme="https://d.moonfire.us/tags/" label="Sand and Blood" />
    <category term="sand-and-bone" scheme="https://d.moonfire.us/tags/" label="Sand and Bone" />
    <content type="html">&lt;p&gt;I think if I had to come up with a word to describe the last week, I'd go with "scattered." I still have too many projects open at the moment, but I'm limping along because of other obligations.&lt;/p&gt;
&lt;h2&gt;Writing&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;I need to process the edits for &lt;a href="http://d.moonfire.us/blog/tag/sand-and-blood/"&gt;Sand and Blood&lt;/a&gt;. They are reasonably extensive, but the "Track Changes" caused Libreoffice to choke. That means I have to switch over to Windows and Microsoft Word to integrate them, which makes it just that much harder.&lt;/li&gt;
&lt;li&gt;I'm mostly done with &lt;a href="http://d.moonfire.us/blog/tag/sand-and-love/"&gt;Sand and Ash&lt;/a&gt; except for a short stack of feedback from the writing group. Once I get through those, I'm going to let it marinate for a little bit before finding/reusing an editor.&lt;/li&gt;
&lt;li&gt;Because the writing group didn't have enough submissions, I (foolishly) started working on &lt;a href="http://d.moonfire.us/tag/sand-and-bone/"&gt;Sand and Bone&lt;/a&gt;, the third and final book of the series.&lt;/li&gt;
&lt;li&gt;I also submitted a short story for an anthology I was asked for. That will show up this Thursday, which gives me a day to integrate feedback and get it in before the deadline.&lt;/li&gt;
&lt;li&gt;I still have a commission that I keep not finding the time to do. I did tell the commissioner that I was going to be overloaded for a few more weeks, so this isn't critical. I just don't like procrastination.&lt;/li&gt;
&lt;li&gt;I'm still trying to get the swearing and insult stuff done, but I got distracted by reformatting my conlang's dictionary into YAML.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Support&lt;/h2&gt;
&lt;p&gt;Outside of writing, I had a little bit of IT support at home. SMWM's laptop stopped booting on Tuesday. After messing around for an hour or so, it looks like she trashed her hard drive again. I was bemoaning the lack of SSD of an appropriate size when a coworker said that there were 750 GB SSDs on sale. So, I snatched up a 750 and a 250 (for myself since my computer was also locking up) and installed them on Friday. Unfortunately, I forgot to check my hard drive size so I ended up going from a 320 to a 250. Which is fine, I had too much crud on my computer.&lt;/p&gt;
&lt;h2&gt;Development&lt;/h2&gt;
&lt;p&gt;Somehow, in the middle of reinstalling my entire laptop, I also did a little bit of work with &lt;a href="https://github.com/dmoonfire/docbook2odf/tree/drem-2.1.0"&gt;docbook2odf&lt;/a&gt; 2.1.0 and &lt;a href="https://github.com/dmoonfire/mfgames-writing-make/"&gt;mfgames-writing-make&lt;/a&gt;. It now generates an error-free Smashwords documents and fixes most of the outstanding issues. That means that I don't have to do any manual editing on the resulting document before uploading to Smashwords.&lt;/p&gt;
&lt;p&gt;This means that in a single command (make all), I generate the print-ready PDF in A5, the Kindle MOBI, the Smashwords Microsoft Word document, and an epubcheck-verified EPUB. And the PDF handles proper hyphenation for my conlang, drop capitals and epigraphs, and even building the "also by" section.&lt;/p&gt;
&lt;p&gt;The system is still badly organic, but it "works for me." Eventually, I'll get it cleaned up, but I have so many other things, I'm limping along with this system until I can do something else. But, still nice to be able to have everything in 10 seconds and know there won't be any errors (in the technical side).&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Second sprint week of docbook2odf development</title>
    <link rel="alternate" href="https://d.moonfire.us/blog/2013/12/15/second-sprint-week-of-docbook2odf-development/" />
    <updated>2013-12-15T06:00:00Z</updated>
    <id>https://d.moonfire.us/blog/2013/12/15/second-sprint-week-of-docbook2odf-development/</id>
    <category term="programming" scheme="https://d.moonfire.us/categories/" label="Programming" />
    <category term="author-intrusion" scheme="https://d.moonfire.us/tags/" label="Author Intrusion" />
    <category term="docbook2odf" scheme="https://d.moonfire.us/tags/" label="docbook2odf" />
    <content type="html">&lt;p&gt;So, after a week of working on it, I think &lt;a href="https://github.com/dmoonfire/docbook2odf"&gt;docbook2odf&lt;/a&gt; is pretty much at a stable point to use for a while. I'm not quite calling it v2.0.0, but it is almost there. Maybe use "beta" for now, but I would like to have it a bit more functional before calling it a version.&lt;/p&gt;
&lt;p&gt;&lt;!--more--&gt;&lt;/p&gt;
&lt;h1&gt;Reasons&lt;/h1&gt;
&lt;p&gt;The main reason for doing this was three-fold:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I wanted to take my Markdown/DocBook 5 system and generate things cleanly for the writing group. I mostly had this, but there were a few things that were broken in that system (lists), so getting that working would make my life easier.&lt;/li&gt;
&lt;li&gt;I needed to simplify generation of &lt;a href="http://smashwords.com/"&gt;Smashwords&lt;/a&gt; documents. Though I'm not fond of it, Smashwords uses a Word document to do all their work. Getting something that simplifies the process would take out the effort to make those books. Having it part of my normal generation of EPUB, MOBI, and PDFs just makes it that much easier.&lt;/li&gt;
&lt;li&gt;I wanted to have something that generated Standard Manuscript Format (SMF) for submissions. This actually does it, and I made a dedicated style for generating SMF including putting in the address on the first lines, estimated word counts (a placeholder for now), and even the newlines. Overall, it does a fairly good imitation of SMF.
&lt;ul&gt;
&lt;li&gt;I defaulted to "Courier New" because I like the font, but it is easy to switch to "Times New Roman"&lt;/li&gt;
&lt;li&gt;Scene breaks are easily changed because I couldn't find consensus on how to do it. I stuck with "#" centered, but you could easily change that to "*" or "# # #" or something else.&lt;/li&gt;
&lt;li&gt;I also made it easier to add/remove "END" at the end of the piece.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;At the moment, the current HEAD does all this for every element I have in a book or story in my Git repository. Now, I don't use anything more than chapters and scene breaks (&lt;d:bridgehead otherrenderas="break" /&gt;), but I did put in something for epigraphs and attributions. It even embeds graphical covers into the ODF document.&lt;/p&gt;
&lt;h1&gt;Status&lt;/h1&gt;
&lt;p&gt;At the moment, the new branch (currently HEAD on master) is a complete rewrite using namespace-aware stylesheets. I think the problem another developer had was using non-namespaced documents, so I wrote some Perl scripts to create both versions from the same source. I also added a lot of examples and documentation to show various features. And also to make sure it works.&lt;/p&gt;
&lt;p&gt;The items that aren't done, and what I considered needed for v2 are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;verbatim.xsl
&lt;ul&gt;
&lt;li&gt;screen, programlisting, synopsis&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;synop.xsl (programming inlines)
&lt;ul&gt;
&lt;li&gt;varname, filename, constant, guilabel, guibutton, guimenu&lt;/li&gt;
&lt;li&gt;accel&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;section.xsl
&lt;ul&gt;
&lt;li&gt;above/d:subtitle&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;notes.xsl (slides)&lt;/li&gt;
&lt;li&gt;info.xsl
&lt;ul&gt;
&lt;li&gt;Formatting of authors, names, copyrights&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;block.xsl
&lt;ul&gt;
&lt;li&gt;d:blockquote&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;tables.xsl
&lt;ul&gt;
&lt;li&gt;handling tables&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;slides.xsl
&lt;ul&gt;
&lt;li&gt;handling slides&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;paragraph.xsl
&lt;ul&gt;
&lt;li&gt;d:formalpara (has d:title)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;inline.xsl
&lt;ul&gt;
&lt;li&gt;d:email&lt;/li&gt;
&lt;li&gt;d:uri&lt;/li&gt;
&lt;li&gt;d:credit&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;bibliography.xsl
&lt;ul&gt;
&lt;li&gt;Lots of stuff&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Changes&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Reimplemented most of the stylesheets in namespace-aware
&lt;ul&gt;
&lt;li&gt;Moved old version into 'old-xsl/' for research purposes&lt;/li&gt;
&lt;li&gt;About 80% of the old code is implemented in new version&lt;/li&gt;
&lt;li&gt;Switched to a slightly different method for doing styles and overrides&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Changed 'docbook2odf' to allow for single-file selections
&lt;ul&gt;
&lt;li&gt;The old 'opf.xsl' is embedded into the executable&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Started to provide some standard formats, such as Standard Manuscript Format.&lt;/li&gt;
&lt;li&gt;Modified image processing to fit more with the content and viewport formulas.
&lt;ul&gt;
&lt;li&gt;Allow scaling of images with only one dimension specified.&lt;/li&gt;
&lt;li&gt;Allow for images to be anchored to a character or page.&lt;/li&gt;
&lt;li&gt;Now only picks one supported image and allows for text fallback.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Switched to use common functionality of the other docbook-xsl-ns namespaces.
&lt;ul&gt;
&lt;li&gt;Requires these stylesheets to be called in a relative directory.&lt;/li&gt;
&lt;li&gt;TOC generation is controlled via the $generate.toc params.&lt;/li&gt;
&lt;li&gt;Added custom rule for TOC generation at the end (to support ebook creation).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Added headers and footers into the stylesheets.&lt;/li&gt;
&lt;li&gt;Added &lt;d:cover /&gt; processing to allow embedding of cover images.&lt;/li&gt;
&lt;li&gt;Added processing (via Makefile) to generate non-namespaced versions.&lt;/li&gt;
&lt;li&gt;Added examples (both namespace and non-namespace) of various features.&lt;/li&gt;
&lt;li&gt;Added &lt;d:legalnotice /&gt; processing to create legal pages for ebooks.&lt;/li&gt;
&lt;li&gt;Nested quotes work properly.&lt;/li&gt;
&lt;li&gt;Examples use 'jing' to verify they match DocBook 5 RNG schema.&lt;/li&gt;
&lt;li&gt;Normalized on "d:" for DocBook namespace, uses exclude-prefix to match docbook-xsl-ns.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Future Plans&lt;/h1&gt;
&lt;p&gt;I want to fix the features that existed in the old version. That part is one of my priorities, but it will take a little bit since I actually need to write a bit more for the rest of December. Plus, I have lots of other projects, but I'll get them slowly in there.&lt;/p&gt;
&lt;p&gt;The original writers of this seem to have abandoned it. I'd like to have a different license (MIT) instead of the original GPL-2 but I don't know if I can do that. I sent an email, we'll see if they respond.&lt;/p&gt;
&lt;p&gt;Eventually, I think I got the basics that I could eventually write a "direct to docx" version. That will be MIT licensed and I'll make it so I can roll it into &lt;a href="https://github.com/dmoonfire/author-intrusion-ts"&gt;Author Intrusion&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Working on docbook2odf</title>
    <link rel="alternate" href="https://d.moonfire.us/blog/2013/12/09/working-on-docbook2odf/" />
    <updated>2013-12-09T06:00:00Z</updated>
    <id>https://d.moonfire.us/blog/2013/12/09/working-on-docbook2odf/</id>
    <category term="programming" scheme="https://d.moonfire.us/categories/" label="Programming" />
    <category term="docbook2odf" scheme="https://d.moonfire.us/tags/" label="docbook2odf" />
    <content type="html">&lt;p&gt;As usual, my week for personal projects has been pretty much defined as Monday to Sunday (I really should put Sunday on the right-most of my calendars). I finished a novel over the Thanksgiving holiday and my typical burnout of 1-2 weeks is holding up nicely.&lt;/p&gt;
&lt;p&gt;I decided to work on &lt;a href="https://github.com/dmoonfire/docbook2odf/tree/drem-docbook-xsl-ns"&gt;docbook2odf&lt;/a&gt;. This probably isn't the smartest thing in the world, but my spacebar is broken (I'm using Control-V to type spaces or slamming it to trigger it; a new one is ordered). We were also doing a three-day intensive development at work, which meant I wasn't going to have the creativity for programming on &lt;a href="http://mfgames.com/author-intrusion"&gt;Author Intrusion&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;There were a couple of reasons that I wanted to work on docbook2odf. The biggest is that I use it to produce the RTF submissions to the writing group. Some recent changes broke that and I needed to figure out why (I use XML namespaces in my documents, another person doesn't). I also wanted to get it to generate &lt;a href="http://smashwords.com/"&gt;Smashwords&lt;/a&gt; documents to simplify my submissions. That also lead into having a Standard Manuscript Format generated directly from my writing system to make it easier to submit in general.&lt;/p&gt;
&lt;p&gt;(I will also probably be able to take these ideas and integrate them into Author Intrusion later.)&lt;/p&gt;
&lt;p&gt;I branched this off from my normal work, but I think it's going to be rolled into the "new release" for it. Mostly, I rewrote the entire thing using slightly different techniques and based on the old one. I had a lot of trouble groking the original, and going line-by-line has really helped with comprehension of what is XSLT and what is Perl (not the languages, the components of docbook2odf). It also builds off of the standard DocBook stylesheets instead of doing its own thing (common libraries, lookups, etc.)&lt;/p&gt;
&lt;p&gt;I'm about 50% of the way completed with duplicating the old functionality plus adding a lot more elements that I use for writing. I figured another week should give me something pretty solid to squash as version 2.0. Overall, it can format 90% of an ebook novel correctly (legal page, chapters, table of contents). It is still missing some minor things (&lt;d:cover&gt; support, recto/verso pages, documentation, proper TOC).&lt;/d:cover&gt;&lt;/p&gt;
&lt;p&gt;I'm also going to write to the original creator (who I think has abandoned it) and asked if they mind if I relicense the entire thing as MIT instead of GPL. It would make it easier for Author Intrusion.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>A relaxing weekend</title>
    <link rel="alternate" href="https://d.moonfire.us/blog/2013/11/11/a-relaxing-weekend/" />
    <updated>2013-11-11T06:00:00Z</updated>
    <id>https://d.moonfire.us/blog/2013/11/11/a-relaxing-weekend/</id>
    <category term="programming" scheme="https://d.moonfire.us/categories/" label="Programming" />
    <category term="writing" scheme="https://d.moonfire.us/categories/" label="Writing" />
    <category term="docbook2odf" scheme="https://d.moonfire.us/tags/" label="docbook2odf" />
    <category term="prpltwtr" scheme="https://d.moonfire.us/tags/" label="prpltwtr" />
    <category term="sand-and-ash" scheme="https://d.moonfire.us/tags/" label="Sand and Ash" />
    <category term="sand-and-blood" scheme="https://d.moonfire.us/tags/" label="Sand and Blood" />
    <content type="html">&lt;p&gt;So, another lovely weekend has come and gone. It ended up being more productive than I expected, mainly because SMWM and EDM spent the weekend in a hotel or relatives. As a "gift," I was given some alone time which usually means obsessing about various projects.&lt;/p&gt;
&lt;h2&gt;Maintenance&lt;/h2&gt;
&lt;p&gt;The first part of the weekend resulted in me doing a lot of maintenance: mostly helping other people with their websites, shuffling some things around, and generally patching websites and fixing bugs. That took quite a few hours (about a day and a half), but things are now in pretty good shape for everyone I'm helping.&lt;/p&gt;
&lt;h2&gt;Writing&lt;/h2&gt;
&lt;p&gt;I also managed to get in two stories (1.5k words and 5k words) and worked on a third. I also sent in a submission for a shorter piece. I feel pretty good about writing at this point, almost like a writer.&lt;/p&gt;
&lt;h2&gt;Programming&lt;/h2&gt;
&lt;p&gt;I got my first merge request for one of the OSS projects I've adopted (&lt;a href="https://github.com/dmoonfire/docbook2odf/"&gt;docbook2odt&lt;/a&gt;). That was awesome, mainly because I've never had a merge request before. I botched it, of course, but I learned a lot more about handling merges with Github. And insisting that pull requests are completely isolated.&lt;/p&gt;
&lt;p&gt;I also figured out one of the nasty bugs for my work with the Pidgin Twitter client (&lt;a href="https://github.com/dmoonfire/prpltwtr"&gt;prpltwtr&lt;/a&gt;). I stumbled on the fix while attempting to write some debugging code, but apparently the JSON print routine makes a copy of the nodes... which is exactly what I needed to do. So, I found a clean way of fixing it and it "mostly" works. Probably leaks memory, but at least it runs without crashing.&lt;/p&gt;
&lt;h2&gt;Movies&lt;/h2&gt;
&lt;p&gt;I got to watch movies, though it reminded me that I really should keep up with writing about female characters in sci-fi fantasy.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Promethus: Pretty fun despite everyone being obviously stupid. The whole med-bay thing was pretty viseral and fantastic, liked it a lot.&lt;/li&gt;
&lt;li&gt;Running Man: This held up nicely, still an awesome movie.&lt;/li&gt;
&lt;li&gt;Predators: I feel in love with this movie quiet nicely.&lt;/li&gt;
&lt;li&gt;Ratatollie: Still liked it, watched it with EDM.&lt;/li&gt;
&lt;li&gt;Puss in Boots: Corny but fun. EDM actually asked for it by name, which was awesome.&lt;/li&gt;
&lt;li&gt;The Croods: I despise how the movie went from a girl learning about the world to a hard switch about the dad. Love the flame scene with the birds (the first one).&lt;/li&gt;
&lt;li&gt;Armageddon: Like this movie a lot. Most of the sound bite lines I didn't care for, but the music is lovely and I still like the tension.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I also watched five episodes of the first season of True Blood.&lt;/p&gt;
&lt;p&gt;When I'm writing alone, this is pretty much how I work. A lot of movies and TV shows while writing steadily. And somehow, in all that, I managed to do dishes twice, three loads of laundry, clean, and play parent for a night.&lt;/p&gt;
&lt;h2&gt;This Week&lt;/h2&gt;
&lt;p&gt;Next week is &lt;a href="http://www.iowa-icon.com/"&gt;ICON 38&lt;/a&gt; and I'm presenting a few chapters of &lt;a href="http://d.moonfire.us/tags/sand-and-love/"&gt;Sand and Love&lt;/a&gt; to the writing group on Thursday. So, this means nothing serious on the weekend and I have a lot of critiquing to do since I've submitted some chapters of &lt;a href="http://d.moonfire.us/blogs/tags/sand-and-blood/"&gt;Sand and Blood&lt;/a&gt; to the writing workshop.&lt;/p&gt;
</content>
  </entry>
</feed>
