Closed mikkovedru closed 10 months ago
Thank you for the suggestion. Unfortunately, this feature is almost impossible to implement in a reliable way.
To implement this feature, the editor would need to interpret again the filename template with the page data. The problem is that some data is lost. For example, it's impossible to determine the value of {visit-date-iso}
when editing a saved page. It also applies to some other variables like {referrer}
.
The real issue, from my point of view, is the lack of filesystem APIs in extensions that allowing for example to overwrite the saved page. This is because browser vendors refuse to implement APIs that would allow extensions to work easily with the filesystem, for security reasons, which is somewhat understandable, as the good old hierarchical filesystem is a bit of an old-fashioned and overly permissive technology.
I don't know anything about this thing, so I will just throw some general ideas in the air without knowing how good/bad they are.
(number)
in case the file with the same name already exists? Where is this information stored (by whom) and what is the difference (file name vs. dir name), that restricts usage in the latter case?yt-dlp
type of organization in which I can name my file anyhow I want, but I can open the video file in MediaInfo
and I will see all the relevant information like URL or Description. Amazing!
og:url
, sometimes twitter:app:url:googleplay
, sometimes apple-itunes-app
with the content app-id=663592361, app-argument=https://duckduckgo.com/?q=singlefile+%22visit+date%22+vs+%22save+date%22&t=lm&smartbanner=1
, etc. And sometimes there will be no information at all! And we are talking about the most critical info - the original URL, which is a must for the purpose SingleFile is being used (collect information in case the original URL will break, but need to have the original URL in order to see if the link was broken).SingleFile-
prefix){referrer}
. If they are missing, then use MIGRATION_DEFAULT_VARIABLES_VALUES
. But in general, I don't think that it is a problem at all (and I am very privacy-minded) and that this feature is necessarily even needed.I implemented the proposition 2. It's a basic implementation which embeds only the data used to determine the value of the filename from the template. The feature will be disabled by default. You'll have to enable the option File name > save the filename template data into the page
option to enable it. It will work with the annotation editor but also if you save again an archive opened from the filesystem. The feature will be available in the next version.
For other comments not directly related to the current issue, please create another issue(s) summarizing your ideas.
This is amazing! Thank you so much, Gildas! :1st_place_medal:
Describe the bug Annotation tool saves modified page in the wrong directory
To Reproduce Steps to reproduce the behavior:
"WWW-INBOX/{visit-date-iso} ({url-hostname}) {page-title}.html"
~/Downloads/WWW-INBOX/
but in~/Downloads/
.Expected behavior The modified file should be saved in the same directory as the opened file.
Environment