How to automatically rename attached HTML files

I'm running version 7.0.1-beta.3 for Windows. The **automatic** renaming mechanism functions reliably for PDF source files, but not for HTML sources, such as on-line blog entries and newspaper articles that I use extensively in my work. In such cases I have to right-click on the associated Snapshot entry in the list and invoke the Rename File command. This feature works well, but setting it up to run automatically would be a huge improvement.

I have tried to use the hidden preference "pref. extensions.zotero.autoRenameFiles.fileTypes" to resolve the problem. Its default value on my machine is ""application/pdf,application/epub+zip,image/". I haven't been able to find any documentation about how I might be able to edit this value to meet the challenge that I have encountered. If that is what I need to do.

Surely others on this list have faced the same challenge. I would appreciate any assistance that they might be able to provide.
  • edited August 16, 2024
    [Merged into this thread]

    In my previous post under a similar but not exactly the same title, I wrote that " I have tried to use the hidden preference "pref. extensions.zotero.autoRenameFiles.fileTypes" .

    I should have written that "I have tried to use the hidden preference "extensions.zotero.autoRenameFiles.fileTypes"
  • text/html should work, but we'll add "HTML" as an option in the settings. Now that Zotero 7 supports webpage annotation, we're working on some changes to help make it possible to treat snapshots as first-class attachments like PDFs.
  • Thank you dstillman. Could you please be a little more explicit in your mention of "text/html"? Do I need to change the current setting of the relevant hidden preference and, if so, in what way? Pending a future release of Z that incorporates the snapshot-freindly enhancements that the team is working on, of course.
  • edited August 16, 2024
    Yes, you can add text/html to the end of the hidden pref, after a comma. That's a comma-separated list of content types (or content-type prefixes) to be renamed, and text/html is the one for snapshots.

    (I haven't tested this, but it should work.)
  • Unfortunately, it's not working at this end. I've tested it as thoroughly as I can, and still the html file is not renamed. The problem may lie in some issue with the syntax of the string. I've tried two variants, "application/pdf,application/epub+zip,text/html" &
    "application/pdf,application/epub+zip,image/,text/html" - without the quotes of course.

    What's next?
  • This is still an issue for me. As I understand it, when captured, both html files, that of the main item and that of the snapshot, should be renamed according to the file template that I've specified in the General settings. And that is what happens when I use the "Rename File from Parent metadata" command in the context menu of the snapshot. Both file names are changed. The extra step is required.

    As instructed, (I think) I've changed the value of the "extensions.zotero.autoRenameFiles.fileTypes" hidden preference to "application/pdf,application/epub+zip,text/html", without the quotes of course.

    I would really appreciate your assistance in resolving this glitch.
  • Confirming that adding text/html to the extensions.zotero.autoRenameFiles.fileTypes hidden preference has no effect
Sign In or Register to comment.