Bug 58685 - Add *option* for proposing a file name based on the content of the document on first save (comment 13 for suggested sources in priority order)
Summary: Add *option* for proposing a file name based on the content of the document o...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 61053 68671 98342 100213 104484 113951 117378 (view as bug list)
Depends on:
Blocks: UX File-Name
  Show dependency treegraph
 
Reported: 2012-12-23 16:39 UTC by Samuel Mehrbrodt (CIB)
Modified: 2019-01-12 11:02 UTC (History)
14 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Mehrbrodt (CIB) 2012-12-23 16:39:11 UTC
When saving a Text document, instead of suggesting "Untitled 1" as filename, this could be more intelligent.

The suggestion should be based the used styles in an order like this:

- Title
- Heading 1
- Text Body
- Default Style

This means, if the document has a "Title" style, suggest it as filename. If not, look for "Heading 1", etc.

It should be limited to 3-5 Words or so.
Comment 1 Jorendc 2012-12-26 12:52:37 UTC
That would be a great feature.
Thanks for reporting!

Kind regards and happy holidays,
Joren
Comment 2 Joel Madero 2014-02-27 22:55:24 UTC
In order to limit the confusion between ProposedEasyHack and EasyHack and to make queries much easier we are changing ProposedEasyHack to NeedsDevEval.

Thank you and apologies for the noise
Comment 3 Robinson Tryon (qubit) 2015-12-13 11:21:01 UTC Comment hidden (obsolete)
Comment 4 Samuel Mehrbrodt (CIB) 2016-06-06 10:52:12 UTC
*** Bug 100213 has been marked as a duplicate of this bug. ***
Comment 5 Cor Nouws 2016-06-06 11:14:49 UTC
already extensively discussed in bug 61053
Mind the thoughtful negative comments there ;)
Therefore I suggest to ad an option to allow sending our Writer files with the title "Dear Simon", "Yesterday evening I was watchting .." ;)
Comment 6 Cor Nouws 2016-06-06 11:15:23 UTC
*** Bug 61053 has been marked as a duplicate of this bug. ***
Comment 7 V Stuart Foote 2016-06-06 12:16:51 UTC
*** Bug 68671 has been marked as a duplicate of this bug. ***
Comment 8 V Stuart Foote 2016-06-06 12:17:11 UTC
*** Bug 98342 has been marked as a duplicate of this bug. ***
Comment 9 Claudius Ellsel 2016-06-06 13:02:24 UTC
So optional is ok to avoid stupid file names.

But what if the first words are formatted as a headline or if the title has been set already?

In this both cases it looks ok to me to propose them directly without an option.

There would be an hierarchy needed which String will be proposed then.
Comment 10 V Stuart Foote 2016-06-06 14:10:03 UTC
Samuel's suggestions in OP ( comment 0 )of pulling text from  specific Style are fine--certainly better than grabbing the first string encountered.

Suggest also the File -> Properties dialog: Description tab any entries made to the Title, Subject, Comments or Keywords fields (given a hierarchical preference in that order).  These fields are always picked up and incorporated into the ODF  meta.xml as "Dublin Core" DCMI (ANSI/NISO Z39.85 and ISO 15386-2009) values, i.e. dc:title, dc:subject, dc:description, and meta:keyword

Seems reasonable to parse them first as potential for automated file naming ahead of content from the document styles listed.

Also, can see some utility in improving the GUI (status bar/dialog/navigator) related to metadata manipulated via the File -> Properties dialog, especially with ongoing addition of CMIS and other "Cloud" formats.

Naming a file on initial save to ODF is just the facet here.
Comment 11 Claudius Ellsel 2016-06-06 14:41:42 UTC
I agree that the given order is good.

However my main point was that if a file has a title or heading 1 set the name will be set by default, not only as an option. (So there is an opt-out instead an opt-in in the settings for this case).
Comment 12 V Stuart Foote 2016-06-06 15:55:06 UTC
(In reply to V Stuart Foote from comment #10)
> 
> Also, can see some utility in improving the GUI (status
> bar/dialog/navigator) related to metadata manipulated via the File ->
> Properties dialog, especially with ongoing addition of CMIS and other
> "Cloud" formats.

Believe that work for linking the Properties meta fields, or for linking text from suitable styles as file names and to the UI status bar/navigator as above should also be able to address concerns of https://bugs.documentfoundation.org/show_bug.cgi?id=61053#c13 and the OP. Providing a filename "preview" to display in the inserted fields.

The "previewed" fields would of course change to the actual filename and path once the ODF document is created on save.

=-note on usage-=
Actually Fields can be placed in any location, not just Header or Footer. Set using an Insert button from a selection on the <Ctrl>+F2 Fields dialog: Document or DocInformation tabs.
Comment 13 Cor Nouws 2016-06-07 13:06:09 UTC
(In reply to Samuel Mehrbrodt (CIB) from comment #0)
> [...]
> The suggestion should be based the used styles in an order like this:
> 
> - Title
> - Heading 1
> - Text Body
> - Default Style

(In reply to V Stuart Foote from comment #10)
> [...]
> Suggest also the File -> Properties dialog: Description tab any entries made
> to the Title, Subject, Comments or Keywords fields (given a hierarchical
> preference in that order).
> [...]
> Seems reasonable to parse them first as potential for automated file naming
> ahead of content from the document styles listed.

I like that thinking as improvement on the idea. Comments I expect to be more a grab-bag, but..
Thus order could be
  Properties Title
  Properties Subject
  Properties Keywords
  Style Title
  (Style Heading 1 etc)

The expected useful information from (other) styles is IMO low, but..
Also I do not over-estimate the proper use of the mentioned keywords. And I expect organizations where the use of those is properly incorporated, have other means of name-giving (anyway, I facilitate in that ;) )

Ciao
Comment 14 Heiko Tietze 2016-09-14 11:30:32 UTC
Removing NeedsUXEval since all agree on this feature using the proposed order of properties. 

Samuel qualified this ticket initially as an EASYHACK. So please check skill, topic and add code pointers (NEEDINFO for this).
Comment 15 Samuel Mehrbrodt (CIB) 2016-09-14 11:34:58 UTC
Too complex for an easy hack, removing the keywords.
Comment 16 Maxim Monastirsky 2016-12-08 08:33:11 UTC
*** Bug 104484 has been marked as a duplicate of this bug. ***
Comment 17 Buovjaga 2017-11-20 20:07:54 UTC
*** Bug 113951 has been marked as a duplicate of this bug. ***
Comment 18 V Stuart Foote 2018-05-01 20:22:37 UTC
*** Bug 117378 has been marked as a duplicate of this bug. ***
Comment 19 david.cortes.rivera 2018-08-25 09:23:32 UTC
Would also like to see this feature, ideally trying to take the first line on the document like in MS word.
Comment 20 ibelin123 2019-01-12 11:02:49 UTC
+1 for this feature. I hope that it would allow to "take" the filename from an input field.