exporting scenes

26 views
Skip to first unread message

Matthias Hoefler

unread,
Jun 25, 2023, 6:13:15 PM6/25/23
to yWriter
I have a project where I'd like to be able to export the scene name as a header for each scene. I managed to get yWriter to export all my scenes from a single chapter to a rich text document with *** as a header for each one.

It seems to me I want to dl and install the "yWriter-Convert" LibreOffice extension. Am I right in thinking that will get me what I want? Are there directions as to how to do that? I looked at the readme and other places and was sort of lost as to what I was looking at. I know Python is a language and that's about as far as my programming skills go. I've installed extensions before, but only with directions to get me there.

Thanks for your help.

Matthias Hoefler

Peter T.

unread,
Jun 26, 2023, 4:11:05 AM6/26/23
to yWriter

On Monday, June 26, 2023 at 12:13:15 AM UTC+2 Matthias Hoefler wrote:
I have a project where I'd like to be able to export the scene name as a header for each scene.[...]

It seems to me I want to dl and install the "yWriter-Convert" LibreOffice extension. Am I right in thinking that will get me what I want? Are there directions as to how to do that?

The yw-cnv LibreOffice extension inserts scene titles as comments right at the scene beginnings, so you can easily navigate to them via the Navigator (F5). 
It offers a choice of export variants as described in the help pages. However, there's no option for a full manuscript with scene titles as headings, I'm afraid. 

There is actually a solution with the yw2html HTML converter. You can define HTML templates by yourself in order to design your export using almost every data stored in your yWriter project. You get an HTML document that can be loaded e,g, into LibreOffice Writer and converted into ODT or DOCX format (be sure to open it with Writer, and not with the Web editor component). I guess, you can also use Word  for further processing, if you aren't a LibreOffice user. 

The yw2html distribution provides pre-made sample templates you can modify. In your case, i propose the "manuscript" template. 
Just make two changes: 

In chapter_template_html:

<h2>$Title</h2>

In scene_template_html:

<h3>$Title</h3>
<p>$SceneContent</p>


This will generate second level headings for the chapters and third level headings for the scenes. 

Good luck, 
Peter

Peter T.

unread,
Jun 26, 2023, 4:41:56 AM6/26/23
to yWriter
On Monday, June 26, 2023 at 12:13:15 AM UTC+2 Matthias Hoefler wrote:
 I know Python is a language and that's about as far as my programming skills go. I've installed extensions before, but only with directions to get me there.

To use yw-cnv or yw2html you don't need any Python programming knowledge. Maybe you have stumbled on the source code pages which are only for developers. You can find the download and installation instructions on the project homepages.

Both programs mentioned are written in Python and need a Python 3 interpreter to run. The LibreOffice extension uses the one that is part of LibreOffice, so no further installation is necessary. The yw2html script on the other hand needs a Python 3 installation on your PC, which is free.

By the way, there are two typos in my post above, sorry. The files to change are named chapter_template.html and scene_template.html
Reply all
Reply to author
Forward
0 new messages