Commit 7e3d61a4 authored by Code for France's avatar Code for France Committed by Johan Richer
Browse files

initial commit

parents
Pipeline #1 failed with stages
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
This diff is collapsed.
# Open Débat
Ces scripts servent à récupérer l'ensemble des propositions publiées sur le site granddebat.fr afin de permettre :
- une analyse automatisées de ces données et du contenu des propositions
- un archivage
## Scripts
### granddebat.sh
Récupère la liste des propositions, par pages de 100.
Il génère :
- fichiers id-THEME.txt : liste des id des propositions
- détail des propositions (un fichier json par proposition) dans le dossier proposals/THEME
Exemple :
./granddebat.sh [ecologie|fiscalite|services|democratie]
### granddebat_proposal.sh
Récupère le détail d'une proposition à partir de son id.
Il est appelé par granddebat.sh
### Données à caractère personnel
Bien que les auteurs des contributions soient pseudonymisés, leurs contributions elles-mêmes peuvent contenir des données à caractère personnel.
Il est par ailleurs rappelé dans la page "Politique de confidentialité" du site granddebat.fr:
*Nous vous rappelons que les traitements portant sur des données à caractère personnel rendues publiques par la personne concernée ne sont pas soumis à l’interdiction de principe au traitement de données sensibles par la loi (Art. 8, II, 4° de la loi Informatiques et Libertés de 1978).*
This diff is collapsed.
curl -s 'https://granddebat.fr/graphql/internal' -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0' -H 'Accept: application/json' -H 'Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3' --compressed -H 'Referer: https://granddebat.fr/projects/la-transition-ecologique/collect/participez-a-la-recherche-collective-de-solutions-1/proposals/biodiversite' -H 'content-type: application/json' -H 'origin: https://granddebat.fr' -H 'DNT: 1' -H 'Connection: keep-alive' --data '{"operationName":"ProposalPageQuery","query":"query ProposalPageQuery(\n $proposalId: ID!\n $hasVotableStep: Boolean!\n $stepId: ID!\n $isAuthenticated: Boolean!\n) {\n viewer @include(if: $isAuthenticated) {\n ...ProposalPageTabs_viewer\n ...ProposalPageHeader_viewer_4ESFbG\n id\n }\n step: node(id: $stepId) @include(if: $hasVotableStep) {\n __typename\n ...ProposalPageHeader_step_39ngnn\n ...ProposalPageTabs_step\n id\n }\n proposal: node(id: $proposalId) {\n __typename\n ...ProposalDraftAlert_proposal\n ...ProposalPageAlert_proposal\n ...ProposalPageTabs_proposal\n ...ProposalPageHeader_proposal_39ngnn\n id\n }\n}\n\nfragment ProposalPageTabs_viewer on User {\n ...ProposalPageContent_viewer_4ESFbG\n}\n\nfragment ProposalPageHeader_viewer_4ESFbG on User {\n ...ProposalVoteButtonWrapperFragment_viewer_Q37Wz @include(if: $hasVotableStep)\n}\n\nfragment ProposalPageHeader_step_39ngnn on ProposalStep {\n ...ProposalVoteButtonWrapperFragment_step\n ...ProposalVoteModal_step_39ngnn\n}\n\nfragment ProposalPageTabs_step on ProposalStep {\n ...ProposalPageContent_step\n form {\n usingCategories\n usingThemes\n id\n }\n}\n\nfragment ProposalDraftAlert_proposal on Proposal {\n publicationStatus\n}\n\nfragment ProposalPageAlert_proposal on Proposal {\n publicationStatus\n trashedReason\n}\n\nfragment ProposalPageTabs_proposal on Proposal {\n id\n ...ProposalPageFollowers_proposal\n ...ProposalPageEvaluation_proposal\n ...ProposalFusionList_proposal\n ...ProposalPageMetadata_proposal\n ...ProposalPageLastNews_proposal\n ...ProposalPageBlog_proposal\n ...ProposalPageContent_proposal\n ...ProposalPageAdvancement_proposal\n ...ProposalPageVoteThreshold_proposal\n allVotes: votes(first: 0) {\n totalCount\n }\n news {\n totalCount\n }\n currentVotableStep {\n __typename\n ...ProposalPageVoteThreshold_step\n id\n voteThreshold\n voteType\n }\n votableSteps {\n __typename\n id\n title\n }\n viewerCanSeeEvaluation\n allFollowers: followers(first: 0) {\n totalCount\n }\n}\n\nfragment ProposalPageHeader_proposal_39ngnn on Proposal {\n id\n ...UnpublishedLabel_publishable\n ...ProposalVoteButtonWrapperFragment_proposal_Q37Wz\n ...ProposalVoteModal_proposal_2r3fA4 @include(if: $isAuthenticated)\n ...ProposalFollowButton_proposal_39ngnn\n title\n theme {\n title\n id\n }\n author {\n username\n displayName\n media {\n url\n id\n }\n id\n }\n createdAt\n publishedAt\n updatedAt\n publicationStatus\n url\n project {\n opinionCanBeFollowed\n id\n }\n form {\n isProposalForm\n id\n }\n}\n\nfragment UnpublishedLabel_publishable on Publishable {\n id\n published\n notPublishedReason\n publishableUntil\n}\n\nfragment ProposalVoteButtonWrapperFragment_proposal_Q37Wz on Proposal {\n id\n estimation\n viewerHasVote(step: $stepId) @include(if: $isAuthenticated)\n ...ProposalVoteButton_proposal_Q37Wz\n}\n\nfragment ProposalVoteModal_proposal_2r3fA4 on Proposal {\n id\n viewerHasVote(step: $stepId)\n}\n\nfragment ProposalFollowButton_proposal_39ngnn on Proposal {\n id\n viewerIsFollowing @include(if: $isAuthenticated)\n viewerFollowingConfiguration @include(if: $isAuthenticated)\n}\n\nfragment ProposalVoteButton_proposal_Q37Wz on Proposal {\n id\n viewerHasVote(step: $stepId) @include(if: $isAuthenticated)\n viewerVote(step: $stepId) @include(if: $isAuthenticated) {\n id\n ...UnpublishedTooltip_publishable\n }\n}\n\nfragment UnpublishedTooltip_publishable on Publishable {\n id\n published\n notPublishedReason\n}\n\nfragment ProposalPageFollowers_proposal on Proposal {\n id\n followers(first: 20) {\n edges {\n cursor\n node {\n id\n ...UserBox_user\n __typename\n }\n }\n pageInfo {\n hasPreviousPage\n hasNextPage\n endCursor\n startCursor\n }\n totalCount\n }\n}\n\nfragment ProposalPageEvaluation_proposal on Proposal {\n id\n viewerIsAnEvaluer\n form {\n evaluationForm {\n description\n questions {\n __typename\n id\n title\n number\n private\n position\n required\n helpText\n jumps {\n id\n always\n origin {\n __typename\n id\n }\n destination {\n __typename\n id\n title\n number\n }\n conditions {\n __typename\n id\n operator\n question {\n __typename\n id\n title\n }\n ... on MultipleChoiceQuestionLogicJumpCondition {\n value {\n id\n title\n }\n }\n }\n }\n description\n type\n ... on MultipleChoiceQuestion {\n isOtherAllowed\n randomQuestionChoices\n validationRule {\n type\n number\n }\n choices(allowRandomize: true) {\n id\n title\n description\n color\n image {\n id\n url\n }\n }\n }\n }\n id\n }\n id\n }\n evaluation {\n version\n responses {\n __typename\n question {\n __typename\n id\n }\n ... on ValueResponse {\n value\n }\n ... on MediaResponse {\n medias {\n id\n name\n size\n url\n }\n }\n }\n }\n}\n\nfragment ProposalFusionList_proposal on Proposal {\n id\n mergedFrom {\n id\n url\n title\n }\n mergedIn {\n id\n url\n title\n }\n}\n\nfragment ProposalPageMetadata_proposal on Proposal {\n ...ProposalDetailEstimation_proposal\n ...ProposalDetailLikers_proposal\n id\n theme {\n title\n id\n }\n estimation\n likers {\n id\n }\n category {\n name\n id\n }\n district {\n name\n id\n }\n reference\n}\n\nfragment ProposalPageLastNews_proposal on Proposal {\n news {\n totalCount\n edges {\n node {\n ...AnswerBody_answer\n title\n authors {\n vip\n id\n }\n id\n }\n }\n }\n}\n\nfragment ProposalPageBlog_proposal on Proposal {\n news {\n totalCount\n edges {\n node {\n ...Post_post\n id\n }\n }\n }\n}\n\nfragment ProposalPageContent_proposal on Proposal {\n id\n ...ProposalDeleteModal_proposal\n ...ProposalEditModal_proposal\n ...ProposalVoteButtonWrapperFragment_proposal_Q37Wz\n author {\n id\n slug\n }\n form {\n contribuable\n id\n }\n address\n body\n summary\n media {\n url\n id\n }\n ...ProposalPageComments_proposal\n ...ProposalReportButton_proposal_39ngnn\n publicationStatus\n title\n url\n currentVotableStep {\n __typename\n id\n open\n }\n responses {\n __typename\n ...ProposalResponse_response\n }\n}\n\nfragment ProposalPageAdvancement_proposal on Proposal {\n ...ProposalDetailAdvancement_proposal\n}\n\nfragment ProposalPageVoteThreshold_proposal on Proposal {\n id\n votes {\n totalCount\n }\n}\n\nfragment ProposalPageVoteThreshold_step on Step {\n id\n ... on CollectStep {\n voteThreshold\n }\n ... on SelectionStep {\n voteThreshold\n }\n}\n\nfragment ProposalDetailAdvancement_proposal on Proposal {\n id\n status {\n name\n color\n id\n }\n selections {\n step {\n id\n position\n }\n status {\n name\n color\n id\n }\n }\n progressSteps {\n title\n startAt\n endAt\n id\n }\n}\n\nfragment ProposalDeleteModal_proposal on Proposal {\n id\n title\n}\n\nfragment ProposalEditModal_proposal on Proposal {\n id\n form {\n ...ProposalForm_proposalForm\n id\n }\n publicationStatus\n ...ProposalForm_proposal\n ...ProposalDraftAlert_proposal\n}\n\nfragment ProposalPageComments_proposal on Proposal {\n id\n form {\n id\n commentable\n }\n}\n\nfragment ProposalReportButton_proposal_39ngnn on Proposal {\n id\n author {\n id\n }\n viewerHasReport @include(if: $isAuthenticated)\n}\n\nfragment ProposalResponse_response on Response {\n question {\n __typename\n id\n title\n number\n private\n position\n required\n helpText\n jumps {\n id\n always\n origin {\n __typename\n id\n }\n destination {\n __typename\n id\n title\n number\n }\n conditions {\n __typename\n id\n operator\n question {\n __typename\n id\n title\n }\n ... on MultipleChoiceQuestionLogicJumpCondition {\n value {\n id\n title\n }\n }\n }\n }\n description\n type\n ... on MultipleChoiceQuestion {\n isOtherAllowed\n randomQuestionChoices\n validationRule {\n type\n number\n }\n choices(allowRandomize: true) {\n id\n title\n description\n color\n image {\n id\n url\n }\n }\n }\n }\n ... on ValueResponse {\n value\n }\n ... on MediaResponse {\n medias {\n ...ProposalMediaResponse_medias\n id\n }\n }\n}\n\nfragment ProposalMediaResponse_medias on Media {\n id\n name\n size\n url\n}\n\nfragment ProposalForm_proposalForm on ProposalForm {\n id\n description\n suggestingSimilarProposals\n step {\n id\n }\n districts(order: ALPHABETICAL) {\n id\n name\n }\n categories(order: ALPHABETICAL) {\n id\n name\n }\n questions {\n __typename\n id\n title\n number\n private\n position\n required\n helpText\n jumps {\n id\n always\n origin {\n __typename\n id\n }\n destination {\n __typename\n id\n title\n number\n }\n conditions {\n __typename\n id\n operator\n question {\n __typename\n id\n title\n }\n ... on MultipleChoiceQuestionLogicJumpCondition {\n value {\n id\n title\n }\n }\n }\n }\n description\n type\n ... on MultipleChoiceQuestion {\n isOtherAllowed\n randomQuestionChoices\n validationRule {\n type\n number\n }\n choices(allowRandomize: true) {\n id\n title\n description\n color\n image {\n id\n url\n }\n }\n }\n }\n usingDistrict\n districtMandatory\n districtHelpText\n usingThemes\n themeMandatory\n usingCategories\n categoryMandatory\n categoryHelpText\n usingAddress\n titleHelpText\n summaryHelpText\n themeHelpText\n illustrationHelpText\n descriptionHelpText\n addressHelpText\n proposalInAZoneRequired\n isProposalForm\n usingDescription\n descriptionMandatory\n usingSummary\n usingIllustration\n}\n\nfragment ProposalForm_proposal on Proposal {\n id\n title\n body\n summary\n address\n publicationStatus\n category {\n id\n }\n theme {\n id\n }\n district {\n id\n }\n responses {\n __typename\n question {\n __typename\n id\n }\n ... on ValueResponse {\n value\n }\n ... on MediaResponse {\n medias {\n id\n name\n size\n url\n }\n }\n }\n media {\n id\n name\n size\n url\n }\n}\n\nfragment Post_post on Post {\n abstract\n url\n media {\n url\n id\n }\n publishedAt\n title\n createdAt\n themes {\n title\n url\n id\n }\n authors {\n id\n url\n vip\n displayName\n }\n}\n\nfragment AnswerBody_answer on AnswerOrPost {\n ... on Answer {\n body\n createdAt\n author {\n displayName\n media {\n url\n id\n }\n url\n id\n }\n }\n ... on Post {\n title\n createdAt\n body\n authors {\n id\n vip\n displayName\n }\n }\n}\n\nfragment ProposalDetailEstimation_proposal on Proposal {\n estimation\n}\n\nfragment ProposalDetailLikers_proposal on Proposal {\n id\n likers {\n id\n }\n ...ProposalDetailLikersLabel_proposal\n ...ProposalDetailLikersModal_proposal\n}\n\nfragment ProposalDetailLikersLabel_proposal on Proposal {\n id\n likers {\n id\n }\n}\n\nfragment ProposalDetailLikersModal_proposal on Proposal {\n id\n likers {\n id\n displayName\n biography\n url\n username\n vip\n media {\n url\n id\n }\n }\n}\n\nfragment UserBox_user on User {\n ...UserPreview_user\n}\n\nfragment UserPreview_user on User {\n ...UserNotConfirmedLabel_user\n url\n displayName\n username\n contributionsCount\n media {\n url\n id\n }\n}\n\nfragment UserNotConfirmedLabel_user on User {\n isEmailConfirmed\n}\n\nfragment ProposalPageContent_step on ProposalStep {\n id\n ...ProposalVoteButtonWrapperFragment_step\n}\n\nfragment ProposalVoteButtonWrapperFragment_step on ProposalStep {\n id\n title\n votesLimit\n voteType\n open\n ...VoteButtonOverlay_step\n}\n\nfragment VoteButtonOverlay_step on ProposalStep {\n id\n votesLimit\n}\n\nfragment ProposalVoteModal_step_39ngnn on ProposalStep {\n id\n votesRanking\n votesHelpText\n ... on RequirementStep {\n requirements {\n viewerMeetsTheRequirements @include(if: $isAuthenticated)\n reason\n totalCount\n }\n }\n form {\n isProposalForm\n id\n }\n ...RequirementsForm_step_39ngnn\n ...ProposalsUserVotesTable_step\n viewerVotes(orderBy: {field: POSITION, direction: ASC}) @include(if: $isAuthenticated) {\n ...ProposalsUserVotesTable_votes\n totalCount\n edges {\n node {\n id\n }\n }\n }\n}\n\nfragment RequirementsForm_step_39ngnn on RequirementStep {\n requirements {\n edges {\n node {\n __typename\n id\n viewerMeetsTheRequirement @include(if: $isAuthenticated)\n ... on DateOfBirthRequirement {\n viewerDateOfBirth @include(if: $isAuthenticated)\n }\n ... on FirstnameRequirement {\n viewerValue @include(if: $isAuthenticated)\n }\n ... on LastnameRequirement {\n viewerValue @include(if: $isAuthenticated)\n }\n ... on PhoneRequirement {\n viewerValue @include(if: $isAuthenticated)\n }\n ... on CheckboxRequirement {\n label\n }\n }\n }\n }\n}\n\nfragment ProposalsUserVotesTable_step on ProposalStep {\n id\n votesRanking\n ...ProposalUserVoteItem_step\n}\n\nfragment ProposalsUserVotesTable_votes on ProposalVoteConnection {\n edges {\n node {\n id\n ...ProposalUserVoteItem_vote\n anonymous\n proposal {\n id\n title\n }\n }\n }\n}\n\nfragment ProposalUserVoteItem_vote on ProposalVote {\n ...UnpublishedLabel_publishable\n published\n createdAt\n proposal {\n id\n title\n url\n ...ProposalDetailEstimation_proposal\n }\n}\n\nfragment ProposalUserVoteItem_step on ProposalStep {\n id\n open\n voteType\n votesRanking\n}\n\nfragment ProposalVoteButtonWrapperFragment_viewer_Q37Wz on User {\n id\n proposalVotes(stepId: $stepId) @include(if: $isAuthenticated) {\n totalCount\n creditsLeft\n }\n}\n\nfragment ProposalPageContent_viewer_4ESFbG on User {\n id\n ...ProposalVoteButtonWrapperFragment_viewer_Q37Wz @include(if: $hasVotableStep)\n}\n","variables":{"proposalId":"'$1'","hasVotableStep":false,"stepId":"","count":32,"cursor":null,"isAuthenticated":false}}'
stepId,theme
Q29sbGVjdFN0ZXA6OTgxZmM3MDUtMWNlMC0xMWU5LTk0ZDItZmExNjNlZWIxMWUx,ecologie
Q29sbGVjdFN0ZXA6ZjhlYWUxYmMtMWNlMC0xMWU5LTk0ZDItZmExNjNlZWIxMWUx,fiscalite
Q29sbGVjdFN0ZXA6MjNmY2UwNjMtMWNlMS0xMWU5LTk0ZDItZmExNjNlZWIxMWUx,services
Q29sbGVjdFN0ZXA6OTNhODAyZmQtMWNkZC0xMWU5LTk0ZDItZmExNjNlZWIxMWUx,democratie
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment