Skip to content

Instantly share code, notes, and snippets.

@steeve
Last active October 6, 2015 14:25
Show Gist options
  • Save steeve/cb73b28d0c0fea5af0f2 to your computer and use it in GitHub Desktop.
Save steeve/cb73b28d0c0fea5af0f2 to your computer and use it in GitHub Desktop.
func main() {
l := legifrance.NewLegiFrance(codeRoot)
for _, codeId := range legifrance.Codes[1:] {
code, err := l.Code(codeId)
if err != nil {
fmt.Fprintf(os.Stderr, "Unable to open %s: %s", codeId, err)
}
for article := range code.Articles() {
fmt.Printf("\rProcessing %s: %d articles", article.Text.Title.Title, i)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment