quick and dirty mod: added filename and directory structure, to#1
Open
lury wants to merge 2 commits intoindeox:masterfrom
Open
quick and dirty mod: added filename and directory structure, to#1lury wants to merge 2 commits intoindeox:masterfrom
lury wants to merge 2 commits intoindeox:masterfrom
Conversation
separate different webpages, and add pagename, dimmensions and time to
filenames
added debug output to show files location:
*******************
Files saved to:
output/example.com/example.com.1280x1024-2014-02-04T01:05:20.735Z-abovethefold.{css,js}
abovethefold.js
Outdated
There was a problem hiding this comment.
You could keep the path structure of the address and use fs.makeTree to mimic it in the folder structure. This would help keep the output directory nice and structured.
Author
There was a problem hiding this comment.
don't you think that's a bit too much?
i'd rather keep this in a file name, because it'd make life harder to follow directory structure, and if you'd send someone the file, path would be lost.
Anyway, i've noticed that fs.makeDirectory is actually creating parent directories - try this out without "output" dir created in advance, and you'll end up with /output/example.com/ anyway.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
separate different web pages, and add pagename, dimensions and time to filenames
command: phantomjs abovethefold.js http://example.com
result:
files saved to:
additional files for the same site are saved to the same directory.
added debug output to show files location: