Closed benjamingr closed 5 years ago
Cool, but we don't need converting of MHTML files.
I really wish you included this functionality in the extension.
@sterbalr I don't see why this should be a part of archiveror, my extension archives pages to MHTML that can already be opened by Chromium, what would this add?
I am trying to use archiveror to make static copies of my wikis that I can use with Dropbox on iOS. Renaming the files is a challenging extra step since I have to do that on the OS.
Why do you need to rename the archives? Can't you find a MHTML reader/viewer for iOS instead?
Dropbox provides a private place for me on the web and they don't seem to want to implement a mhtml viewer.
Either way, this functionality is outside the scope of this extension.
I'm not sure I need anything other than a change of the name of the file extension from mhtml to html.
How many lines of code would need to be changed?
@sterbalr you can use fast-mhtml to do this, since it's very new I'd love it if more people get involved :)
I'm not sure I need anything other than a change of the name of the file extension from mhtml to html.
How many lines of code would need to be changed?
I don't like including an extra dependency, but this change is possible. I've added a note to https://github.com/rahiel/archiveror/issues/26 to include choosing the file extension as an option.
@rahiel if you want a sticky release or to go through the code together you're welcome to use fast-mhtml
any way you'd like. You're also (happily) welcome to "steal" the relevant files (with attribution)
The issue for @sterbalr is purely with the file extension, not with the content. So it really is not necessary to integrate fast-mhtml into archiveror.
@rahiel ah, then it makes no sense - it's just a rename
Is this the line I would have to change?
function l(e){var t=e;for(t=e.replace(/[<>:"\/\|?*~]/g,"").trim();t.startsWith(".");)t=t.slice(1);return t}function u(e,t){return l(e)+""+(r=new Date,n=r.getUTCFullYear(),o=(r.getUTCMonth()+1).toString().padStart(2,"0"),a=r.getUTCDate().toString().padStart(2,"0"),i=r.getUTCHours().toString().padStart(2,"0"),c=r.getUTCMinutes().toString().padStart(2,"0"),${n}-${o}-${a}_${i}-${c}
)+"_"+t+".mhtml";
(in options.js)
Hey, I just published a fast mhtml parser that converts the mhtml files saved by Chrome to html and allows serving them.
Would love feedback and to know if it's relevant to you https://www.npmjs.com/package/fast-mhtml