| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A parser for the US Code's structure, and a work-in-progress parser for the US Code's full content.
Create a virtual environment:
virtualenv virt
source virt/bin/activate
pip install -r requirements.txtTo output the hierarchy of the US Code to STDOUT, in JSON:
./run structureThe script will first download the
Options:
Example:
[
{
"level": "title",
"name": "GENERAL PROVISIONS",
"number": "1",
"subparts": [
{
"level": "chapter",
"name": "RULES OF CONSTRUCTION",
"number": "1",
"subparts": [
{
"citation": "usc/1/1",
"level": "section",
"name": "Words denoting number, gender, and so forth",
"number": "1"
},
{
"citation": "usc/1/2",
"level": "section",
"name": "\u201cCounty\u201d as including \u201cparish\u201d, and so forth",
"number": "2"
},
...
]
}
]
}
]To get at the content of the Code:
Run the debug script with the title as the first argument and the offset of the parsed node in the parsed title (yes, that makes no sense--just enter a number, like 3).
source virt/bin/activate # if not already activated
./run debug title=[title] offset=[offset]So to view title 11, section 1, which is the definitions section of the bankruptcy code, run:
./run debug title=11 offset=3This project is dedicated to the public domain. As spelled out in CONTRIBUTING:
The project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.
All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.
| Back | FazBrowse Home | New Git URL |