wget-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

wget2 | Added --convert-file-only handling (!456)


From: Archit Pandey
Subject: wget2 | Added --convert-file-only handling (!456)
Date: Mon, 28 Oct 2019 06:12:54 +0000


Archit Pandey created a merge request: 
https://gitlab.com/gnuwget/wget2/merge_requests/456

Project:Branches: archit-p/wget2:add-convert-file-only to gnuwget/wget2:master
Author:    Archit Pandey



This merge request closes https://gitlab.com/gnuwget/wget2/issues/438
### Design
* The variable `bool convert_file_only` was added to `struct config`.
* `config.convert_file_only` is checked while parsing html files for links
* new function `static void convert_file_only` was added to `src/wget.c`. 
     * design borrowed from `static void convert_links`
     * finds the filenames part of the local file and the linked file, if 
there's a difference it updates the linked file.

#### Test-Case
* `tests/test-convert-file-only.c` checks for whether a updated local filename 
with option `-E` is reflected in the linked file when using 
`--convert-file-only`.

### Possible Flaws
* There is currently no check in the code to ensure only one of 
`--convert-file-only` or `--convert-links` are used.
* Test case might be very limited. (are use-cases for --convert-file-only also 
limited?)

### References
https://lists.gnu.org/archive/html/bug-wget/2015-06/msg00043.html

### Approver's checklist:

* [ ] The author has submitted the FSF Copyright Assignment and is listed in 
AUTHORS
* [ ] There is a test suite reasonably covering new functionality or 
modifications
* [ ] Function naming, parameters, return values, types, etc., are consistent 
with existing code
* [ ] This feature/change has adequate documentation added (if appropriate)
* [ ] No obvious mistakes / misspelling in the code

-- 
Reply to this email directly or view it on GitLab: 
https://gitlab.com/gnuwget/wget2/merge_requests/456
You're receiving this email because of your account on gitlab.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]