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

Fix various issues #188

Merged
merged 9 commits into from
Jun 7, 2021
Merged

Fix various issues #188

merged 9 commits into from
Jun 7, 2021

Conversation

pabs3
Copy link
Contributor

@pabs3 pabs3 commented May 4, 2021

If nessecary I can split this up into multiple pull requests,
but then there will be some conflicts between them.

pabs3 added 7 commits May 3, 2021 17:44
This avoids problems related to URL encoding.

Obsoletes: hartator#116
Suggested-by: codespell, spellintian
This avoids the messages breaking JSON parsing when
the output is being redirected to a file and parsed.
This avoids producing JSON that is not parsable.
@m3nu
Copy link

m3nu commented Jun 4, 2021

Works great. Used this branch when I needed to use this project. 👍

Hope this can be merged soon to keep the original repo relevant.

Copy link
Owner

@hartator hartator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay in checking things out.

Thanks @pabs3 for the work and all the typos fixed. It works great! ❤️

@@ -42,7 +42,7 @@ It will download the last version of every file present on Wayback Machine to `.
-x, --exclude EXCLUDE_FILTER Skip downloading of urls that match this filter
(use // notation for the filter to be treated as a regex)
-a, --all Expand downloading to error files (40x and 50x) and redirections (30x)
-c, --concurrency NUMBER Number of multiple files to dowload at a time
-c, --concurrency NUMBER Number of multiple files to download at a time
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -62,7 +62,7 @@ Example:

-s, --all-timestamps

Optional. This option will download all timestamps/snapshots for a given website. It will uses the timepstamp of each snapshot as directory.
Optional. This option will download all timestamps/snapshots for a given website. It will uses the timestamp of each snapshot as directory.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -169,7 +169,7 @@ Example:

-c, --concurrency NUMBER

Optional. Specify the number of multiple files you want to download at the same time. Allows to speed up the download of a website significantly. Default is to download one file at a time.
Optional. Specify the number of multiple files you want to download at the same time. Allows one to speed up the download of a website significantly. Default is to download one file at a time.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thank you for all the typo corrections.

@@ -46,7 +46,7 @@ option_parser = OptionParser.new do |opts|
options[:all] = true
end

opts.on("-c", "--concurrency NUMBER", Integer, "Number of multiple files to dowload at a time", "Default is one file at a time (ie. 20)") do |t|
opts.on("-c", "--concurrency NUMBER", Integer, "Number of multiple files to download at a time", "Default is one file at a time (ie. 20)") do |t|
Copy link
Owner

@hartator hartator Jun 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

file_timestamp = line[0..13].to_i
file_url = line[15..-2]
get_all_snapshots_to_consider.each do |file_timestamp, file_url|
next unless file_url.include?('/')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

end
if page_index
parameters += "&page=#{page_index}"
parameters.push(["page", page_index])
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -70,7 +70,7 @@ def tidy_bytes(force = false)
if is_unused || is_restricted
bytes[i] = tidy_byte(byte)
elsif is_cont
# Not expecting contination byte? Clean up. Otherwise, now expect one less.
# Not expecting continuation byte? Clean up. Otherwise, now expect one less.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@hartator hartator merged commit 66ff4d9 into hartator:master Jun 7, 2021
@hartator
Copy link
Owner

hartator commented Jun 7, 2021

@pabs3 @m3nu I've published a new Gem version that includes these changes: 2.3.0.

@pabs3
Copy link
Contributor Author

pabs3 commented Jun 7, 2021 via email

@hartator
Copy link
Owner

hartator commented Jun 7, 2021

Excellent, thanks for that. I was thinking of packaging the project for
to Debian at some point. Would you be OK with that?

Sure, go for it. 👍

@pabs3 pabs3 deleted the fixes branch June 7, 2021 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants