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

How to limit the max length of filename when using CLI #810

Closed
scruel opened this issue Nov 12, 2021 · 3 comments
Closed

How to limit the max length of filename when using CLI #810

scruel opened this issue Nov 12, 2021 · 3 comments

Comments

@scruel
Copy link
Contributor

@scruel scruel commented Nov 12, 2021

Is your feature request related to a problem? Please describe.
Nope.

Describe the solution you'd like
Provide an argument to set the max length of filename.


By the way, will template accepts such format to define common property of the final filename?
{page-title:100} -> page-title max length is 100.
Or
{page-title:{max-len: 100}}

THX.

@gildas-lormeau
Copy link
Owner

@gildas-lormeau gildas-lormeau commented Nov 13, 2021

Using --filename-max-length should work actually.

@scruel
Copy link
Contributor Author

@scruel scruel commented Nov 14, 2021

Using --filename-max-length should work actually.

It works, but it not an option from --help command.

And sometimes I will get the error:

TypeError: window.singlefile is undefined URL: https://www.baidu.com
Stack: undefined

single-file https://www.baidu.com --back-end=webdriver-gecko --browser-headless=false
-> Got 百度一下,你就知道 (2021-11-14 上午11_22_12).html
single-file https://www.baidu.com --back-end=webdriver-gecko --browser-headless=false --filename-max-length=5
-> Got ….html
single-file https://www.baidu.com --back-end=webdriver-gecko --browser-headless=false --filename-max-length=10
-> Got 百….html

@scruel
Copy link
Contributor Author

@scruel scruel commented Nov 14, 2021

Is your feature request related to a problem? Please describe. Nope.

Describe the solution you'd like Provide an argument to set the max length of filename.

By the way, will template accepts such format to define common property of the final filename? {page-title:100} -> page-title max length is 100. Or {page-title:{max-len: 100}}

THX.

#814
I've created an issue for 'By the way' part.

scruel added a commit to scruel/SingleFile that referenced this issue Nov 14, 2021
scruel added a commit to scruel/SingleFile that referenced this issue Nov 14, 2021
scruel added a commit to scruel/SingleFile that referenced this issue Nov 14, 2021
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
2 participants