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

Make add command save webpages to disk #39

Merged
merged 6 commits into from
Mar 5, 2019

Conversation

thomastanck
Copy link

@thomastanck thomastanck commented Mar 3, 2019

Resolves #22.

Next part after this is to allow loading of local webpages into the WebView.

Summary of changes

  • Added ArticleStorage and related classes to manage saving articles to disk. No articles are kept in memory. Instead, a Path can be obtained in order to load the article required into a WebView.
  • Modified UserPrefs and Model accordingly to include the right paths and methods for ArticleStorage.
  • Refactored URLs used for Network tests into TypicalEntries.
  • Added unit and integration tests.
  • Connected article saving to the add command.

@coveralls
Copy link

coveralls commented Mar 4, 2019

Pull Request Test Coverage Report for Build 168

  • 45 of 50 (90.0%) changed or added relevant lines in 7 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 93.893%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/main/java/seedu/address/storage/DataDirectoryArticleStorage.java 17 22 77.27%
Totals Coverage Status
Change from base Build 153: -0.1%
Covered Lines: 1522
Relevant Lines: 1621

💛 - Coveralls

Copy link

@rlrh rlrh left a comment

Choose a reason for hiding this comment

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

Very nice work!

Just a question: why do we not store the downloaded files with a .htm or .html extension?

@thomastanck
Copy link
Author

@rlrh thanks for the review!

I left it out for the moment as that wasn't necessary to meet the requirements and also because I would prefer if the extension on the url matched the extension saved (may not always be .html). It also complicates things when there is no extension.

@thomastanck thomastanck merged commit 2a88de8 into CS2103-AY1819S2-W10-1:master Mar 5, 2019
@thomastanck thomastanck changed the title Add command save webpages to disk Make add command save webpages to disk Mar 5, 2019
@thomastanck thomastanck deleted the save-webpages branch March 5, 2019 07:34
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.

None yet

4 participants