Coder Social home page Coder Social logo

web-download's Issues

Delete file if wget error 8

When wget returns an error code of 8, it means that a PDF file has been created with the indicated name but that the file was not in fact downloaded. This makes it look like the download was a success, but if the file is clicked on, it cannot be opened. Therefore, the PDF should be deleted if wget has an error code of 8.

Remove the GUI

PySimpleGUI has added an annual cost. MAGIL confirmed that they can operate the script from the command line instead.

Don't change current directory for saving files

Currently, make_seed_folder() changes the current directory to the seed folder, so PDFs can be saved to the current directory. This has caused problems with other scripts during testing where it is unclear what the directory should be for a valid test.

Include the seed folder as part of the path for saving the PDF so that the current directory is not important.

Make unit tests for functions

For now, while we aren't changing the script, having manual testing instructions is sufficient. If we begin more active development, start by making unit tests for all of the functions.

Challenge: the script is accessing the most recent crawl of the websites, so we need to update the test input each time for ones that are using the Archive-It API. The websites would be the same, but the files would not be.

Use python library instead of wget

Installing wget on MAGIL workstations was complicated due to them not having administrator access to their machines. Using the python requests or urllib libraries might be simpler.

Make function for error testing

Script tests if each of the arguments is present and an expected value. If it is possible with threading, doing this in a function would make for simpler code and make it easier to test.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.