unitedstates / uscode

A working parser for the US Code's hierarchy, and a work-in-progress parser for the full content.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Structure script should download and cache

konklone opened this issue · comments

Make it so the only step to get the US Code's structure is to run the script, with no arguments.

If there's no folder, or an empty one, for that year/uscprelim, download everything. If there are files, have it default to assuming that the present files are complete. A --download flag will force a redownload of all material. Should still be able to use wget, just piped out from Python.

Done. If the directory exists for that year on disk, it will use whatever's in that folder (cache by default). Pass a --force flag to force a re-download of that year's content. wget runs with a -q flag to suppress output, since the only STDOUT output is supposed to be JSON, so don't be surprised not to see the download in progress while it's happening.