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

Save page without images / replace image by placeholder #839

Open
gety9 opened this issue Dec 13, 2021 · 3 comments
Open

Save page without images / replace image by placeholder #839

gety9 opened this issue Dec 13, 2021 · 3 comments

Comments

@gety9
Copy link

@gety9 gety9 commented Dec 13, 2021

Is your feature request related to a problem? Please describe.
I am using SingleFile's extension for FF and would like to be able to save page WITHOUT images
(cause most of the time they don't provide any informational value and just take lots of space)

Describe the solution you'd like
Save page as single file but instead of image have nothing or gray place holder

Describe alternatives you've considered (optional)
I tried select all text on page excluding images and then using "Save selection" but it's tricky cause often image goes right between text blocks. I also tried turning page into read mode, but then SingleFile don't work.


2 more questions which don't warrant opening separate issue.

  1. In file name template is it possible to have title without spaces? I mean to make {page-title} produce ThisIsAritcleTitle instead of This is article title?
  2. Where can i find full manual? I found lots of useful features like #736 (comment) #814 (comment) by searching issues, but they are no where in Read.me or FAQ.
@abolibibelot1980
Copy link

@abolibibelot1980 abolibibelot1980 commented Dec 17, 2021

I concur that this would be a welcome feature. (I've created an issue report about a year ago regarding the storing of identical images within the same page, I don't know if it has improved on that matter since then.)

Regarding the name template without space, I don't think so (I would guess that it would be fairly more complex to implement and it would be of "niche" interest), but it's easy to rename saved pages with any batch renaming utility (I generally use Lupas Rename which is old but streamlined and reliable, and Bulk Rename Utility for more complex cases).

@gildas-lormeau
Copy link
Owner

@gildas-lormeau gildas-lormeau commented Dec 17, 2021

This is typically why I added a way to customize the way SingleFile works via a userscript, see https://github.com/gildas-lormeau/SingleFile/wiki/How-to-execute-a-user-script-before-a-page-is-saved. For example, this script would do the job (it only removes "foreground" images though):

Array.from(document.images).forEach(image => { image.src = image.srcset = ""; })

I confirm that you cannot remove spaces easily in SingleFile itself. However I guess you could add it in the list of replaced characters (filenameReplacedCharacters), and set "" as replacement character (filenameReplacementCharacter). These are hidden options, see https://github.com/gildas-lormeau/SingleFile/wiki/Hidden-options for more information.

There is no other manual than the help page in the extension. As far as I know, the 2 features you're referring to are documented in the help page though.

@gildas-lormeau
Copy link
Owner

@gildas-lormeau gildas-lormeau commented Dec 18, 2021

Regarding the removal of spaces, an alternative could also be to run a userscript (see last example here: https://github.com/gildas-lormeau/SingleFile/wiki/How-to-execute-a-user-script-before-a-page-is-saved)

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

Successfully merging a pull request may close this issue.

None yet
3 participants