Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{time-locale} variable formatting #1669

Closed
ryan-id opened this issue Jan 28, 2025 · 3 comments
Closed

{time-locale} variable formatting #1669

ryan-id opened this issue Jan 28, 2025 · 3 comments

Comments

@ryan-id
Copy link

ryan-id commented Jan 28, 2025

I am seeing issues with the {time-locale} template variable for file names. I noticed that the variable has changed in the last few months. It used to produce the time separated by "_" like the example in the documentation shows (e.g. "00_38_26") but is now using full-width colons ":". In looking through past downloads I found another variation on files from November to December that was in this: "(12_16_2024 12|42|27 PM)". Was this change intended?

Here is the template I am using:
SingleFile/{url-hostname-domain}/%if-empty<{page-title}|No title> ({date-locale} {time-locale}).html

Here is the filename for downloading Apple's homepage:
Apple (1_28_2025 2:49:37 PM).html

I am on a Mac and have observed this issue in Chrome and Firefox.

I know that the full-width characters are due to compatibility, as noted in the known issues. I am unsure if using colons was an intensional change from the previously used underscores "_" which are still in the documentation.

Environment

  • OS: MacOS Sonoma
  • Browser: Firefox & Chrome
  • Version: 1.22.77
@gildas-lormeau
Copy link
Owner

gildas-lormeau commented Jan 28, 2025

I confirm the | issue is a bug and should have been fixed, it looks like the fix did not work though... Could you please export the settings from the options page and give me the values of filenameReplacedCharacters and filenameReplacementCharacters? The problem is that these 2 arrays are not coherent.

@ryan-id
Copy link
Author

ryan-id commented Jan 28, 2025

"filenameReplacedCharacters": [
"~",
"+",
"?",
"%",
"*",
":",
"|",
""",
"<",
">",
"\\",
"\u0000-\u001f",
"�"
],

"filenameReplacementCharacters": [
"~",
"+",
"?",
"%",
"*",
":",
"|",
""",
"<",
">",
"\"
]

@gildas-lormeau
Copy link
Owner

gildas-lormeau commented Jan 29, 2025

I'm sorry, I misread your issue. The | seems actually fixed (as expected) and it looks like the arrays are OK.

You can simply replace filenameReplacementCharacters with the value below in order to always replace : with _, and import the modified settings in the options page.

"filenameReplacementCharacters": [
"~",
"+",
"?",
"%",
"*",
"_",
"|",
""",
"<",
">",
"\"
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants