Autogenerating File Names

Eddie
Posts: 92

Autogenerating File Names

Thu Apr 14, 2016 8:54 am

Hello,
Many thanks for the Use title to generate the file name and Use the file name as the value of the root ID attribute check boxes, which are very useful. However...

Is there are any way of customising the pattern of the generated file name? I'm thinking of 2 things in particular:
1: Using hyphens instead of underscores.
2: adding a prefix for each topic type (e.g.: "t-" for a task topic).

Cheers,
Eddie
Radu
Posts: 5585

Re: Autogenerating File Names

Thu Apr 14, 2016 9:50 am

Hi Eddie,

Request (2) will be available in Oxygen 18.0 which we plan to release in a week or two.
For request (1) we have a registered issue to allow more flexible configuration of the generation pattern. Possibly we'll be able to do this in Oxygen 18.1 (this summer).

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Eddie
Posts: 92

Re: Autogenerating File Names

Fri Apr 15, 2016 2:23 am

Hello Radu,

Thanks for the reply. Will look forward to the new features.

Eddie.
Eddie
Posts: 92

Re: Autogenerating File Names

Wed Jun 08, 2016 4:57 am

Hello,

I've been using oXygen 18.0, trying out the filenamePrefix function.
I uncommented "filenamePrefix=" in the properties file for the default Concept, Task, Reference and Glossgroup templates with "c-", "t-", "r-" and "g-" as the respective values.
I found that oXygen adds the prefix correctly for all except Task, which adds no prefix.

I also added our own Concept, Task, Reference and Glossgroup templates with the same "filenamePrefix=" setting, and all 4 types add the prefix correctly.

Is there something different about the way the default task template is used to create files?

Cheers,
Eddie.
mihaela
Posts: 188

Re: Autogenerating File Names

Wed Jun 08, 2016 10:00 am

Hi Eddie,

There is no difference between filename prefix usage between task template and other templates.
We tried to reproduce the problem you reported but the filename prefix set on the task template is correctly used when a task is created.

However, there is a possibility to obtain this situation when you choose the "Task" template from the "Recently used" category from the "New" dialog.
The "Recently used" category actually contains a copy of the templates from the first time they are used.
Maybe you used the template, then you added the "filenamePrefix" property, then you used the old template saved in "Recently used".
If this is your case, you must choose again the template from the "DITA" category (after that, the "Recently used" category will the contain the template updated with the prefix information).

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
Eddie
Posts: 92

Re: Autogenerating File Names

Thu Jun 09, 2016 2:31 am

Thanks, Mihaela,

That's exactly what was happening and worth knowing.

Eddie.
sorin_carbunaru
Site Admin
Posts: 145

Re: Autogenerating File Names

Thu Oct 20, 2016 4:41 pm

Hello,

I am glad to announce that in the newly released oXygen 18.1 we added some more options that allow for a more customized file name generation when creating topics from the DITA Maps Manager. The options are all grouped in the File name generation rules for new topics section from the DITA preferences page. More information about the options can be found at https://www.oxygenxml.com/doc/versions/18.1/ug-editor/topics/preferences-dita.html.

Regards,
Sorin Carbunaru
oXygen XML
hutz
Posts: 10

Re: Autogenerating File Names

Wed Dec 07, 2016 1:58 pm

What is the most straight-forward way from the oXygen UI to generate my id attrbute for a root map (${cfn} in the map template)?

File > New does not seem to work still and I do not use a Project at the moment.
For topic types it's not a problem as I am doing it from the DITA Maps Manager.

Thoughts?
Radu
Posts: 5585

Re: Autogenerating File Names

Wed Dec 07, 2016 2:58 pm

Hi,

The problem with "File->New" is that it creates an untitled file, a file which is not saved anywhere so it's impossible to expand the ${cfn} editor variable when choosing this route.
Indeed creating the DITA Map from the Project view would work because it requests you to input a file path before creating the file.
Or if your DITA Map is a submap you can also create in in the DITA Maps manager by using the "Append->New topic" contextual menu action that you are using for topics.

In Oxygen 19 (we plan to release it in Spring next year) the "File->New" dialog will also allow you as an end user to choose the file name and path where to save it. If you will choose to do that instead of creating an untitled file, the ${cfn} editor variable will be properly expanded.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
hutz
Posts: 10

Re: Autogenerating File Names

Wed Dec 07, 2016 7:02 pm

Thanks for confirming the current behaviour, we will use a savehook to mitigate this until the next version.

Regards,
François
sorin_carbunaru
Site Admin
Posts: 145

Re: Autogenerating File Names

Fri Apr 07, 2017 10:01 am

Hello all,

I wanted to let you know that in the newly released oXygen 19.0, the New dialog has a Save As check box that can be used to avoid creating "untitled" documents and allows you to choose the file name and path where to save them.

All the best wishes,
Sorin Carbunaru
oXygen XML

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 1 guest