Control exported file name?

19 views
Skip to first unread message

Die Vampire

unread,
Aug 14, 2021, 8:50:47 AM8/14/21
to yWriter

Hi,

I'm new to yWriter and am evaluating whether it will work in my context: The exported output is meant to go into a software project.

A requirement is the export of plain-text files, one for each scene. I was happy to find that the export option "To Text (Individual Scenes)" works perfectly, except for one issue... the files are all named using the scheme "Exp_Ch1_Sc1.txt". Seeing as I need to reference scenes by their file name from within the text, that file naming scheme is not going to work for me.

Is there any way to control the names of the exported files? Something like "Chapter_SceneName.txt" would be perfect.

Thanks!

Simon Haynes

unread,
Aug 14, 2021, 8:51:50 AM8/14/21
to ywr...@googlegroups.com
Take a look at my yGen2 software. It does exactly what you need.


--
You received this message because you are subscribed to the Google Groups "yWriter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ywriter+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ywriter/2ce04dca-6afb-44cc-b6b2-25848a50af9fn%40googlegroups.com.


--

--
Visit Spacejock Software, the home of yWriter, FCharts and more
Visit spacejock.com.au for my articles on writing and publishing novels.

Die Vampire

unread,
Aug 14, 2021, 9:07:57 AM8/14/21
to yWriter
Hi Simon,

Thanks for the quick reply!

I installed yGen2 and gave it a quick go, but I'm not quite sure it's what I'm looking for. The text output from yWriter is perfectly fine for my needs, as are all the other novel-writing related features. My issue is really just about the file names the exporter creates. If yWriter doesn't offer control over the file name, then I suppose I can write a little tool (or perhaps use yGen?) to rename the files according to some contained meta data.

Thanks again!

Simon Haynes

unread,
Aug 14, 2021, 9:14:01 AM8/14/21
to ywr...@googlegroups.com
You can include the output from yWriter into yGen templates, with the full path and filename, then compile from yGen to the named text files you need. That's how I generate HTML web pages from individual chapters of my novels, with yGen adding the headers, footers, css code, etc.

yGen can compile from the commandline too so you can automate everything with a batch file.



Peter T.

unread,
Aug 14, 2021, 10:54:50 AM8/14/21
to yWriter
On Saturday, August 14, 2021 at 2:50:47 PM UTC+2 dievamp...@gmail.com wrote:

Hi,

I'm new to yWriter and am evaluating whether it will work in my context: The exported output is meant to go into a software project.

A requirement is the export of plain-text files, one for each scene. I was happy to find that the export option "To Text (Individual Scenes)" works perfectly, except for one issue... the files are all named using the scheme "Exp_Ch1_Sc1.txt". Seeing as I need to reference scenes by their file name from within the text, that file naming scheme is not going to work for me.

That sounds interesting. Is your software project some kind of hypertext reader?
The schematically generated file names have the great advantage of being unique. Could the linking possibly be done indirectly, i.e. via a lookup table, or a dictionary?
By the way, you can get a list with all chapter and scene titles in the correct order under project > Export project > Scene descriptions

If you are good at programming, you can easily extract scene text and metadata directly from the yw7-xml file and process it as you like. For many programming languages there is a DOM parser that does most of the work.

Cheers, 
Peter
 
Reply all
Reply to author
Forward
0 new messages