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

mhtml parsing #35

Closed
benjamingr opened this issue Dec 18, 2018 · 14 comments
Closed

mhtml parsing #35

benjamingr opened this issue Dec 18, 2018 · 14 comments
Labels

Comments

@benjamingr
Copy link

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

@rahiel
Copy link
Owner

rahiel commented Dec 18, 2018

Cool, but we don't need converting of MHTML files.

@rahiel rahiel closed this as completed Dec 18, 2018
@rahiel rahiel added the invalid label Dec 18, 2018
@sterbalr
Copy link

I really wish you included this functionality in the extension.

@rahiel
Copy link
Owner

rahiel commented Dec 18, 2018

@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?

@sterbalr
Copy link

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.

@rahiel
Copy link
Owner

rahiel commented Dec 18, 2018

Why do you need to rename the archives? Can't you find a MHTML reader/viewer for iOS instead?

@sterbalr
Copy link

Dropbox provides a private place for me on the web and they don't seem to want to implement a mhtml viewer.

@rahiel
Copy link
Owner

rahiel commented Dec 18, 2018

Either way, this functionality is outside the scope of this extension.

@sterbalr
Copy link

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?

@benjamingr
Copy link
Author

@sterbalr you can use fast-mhtml to do this, since it's very new I'd love it if more people get involved :)

@rahiel
Copy link
Owner

rahiel commented Dec 19, 2018

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 #26 to include choosing the file extension as an option.

@benjamingr
Copy link
Author

@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)

@rahiel
Copy link
Owner

rahiel commented Dec 19, 2018

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.

@benjamingr
Copy link
Author

@rahiel ah, then it makes no sense - it's just a rename

@sterbalr
Copy link

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)

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

No branches or pull requests

3 participants