Skip to content

Commit

Permalink
ignore motions and resolutions by default
Browse files Browse the repository at this point in the history
  • Loading branch information
RouxRC committed Sep 16, 2018
1 parent ba1d36b commit 85ca49b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/tlfp-parse-many
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ args = [arg for arg in sys.argv[1:] if '--' not in arg]
API_DIRECTORY = args[0] if len(args) > 0 else 'data'

verbose = "--quiet" not in sys.argv
include_motions = '--include-motions' in sys.argv
include_resolutions = '--include-resolutions' in sys.argv

already_done = {}
for jsondos in glob.glob(os.path.join(API_DIRECTORY, '*/viz/procedure.json')):
Expand All @@ -20,6 +22,9 @@ for jsondos in glob.glob(os.path.join(API_DIRECTORY, '*/viz/procedure.json')):

for url in sys.stdin:
url = url.strip()
if (("dossier-legislatif/ppr" in url and not include_resolutions) or
("dossier-legislatif/motionpjl" in url and not include_motions)):
continue
if url in already_done:
if verbose:
print()
Expand Down

1 comment on commit 85ca49b

@mdamien
Copy link
Member

Choose a reason for hiding this comment

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

This won't work for AN urls, it should be in parse_one in my opinion in the future

Please sign in to comment.