republique

helper scripts for www.republique-numerique.fr
git clone https://a3nm.net/git/republique/
Log | Files | Refs | README

dump_all.sh (450B)


      1 #!/bin/bash
      2 # dump all opinions and versions to $1/
      3 
      4 DIR="$( cd "$( dirname "$0" )" && pwd )"
      5 cd "$DIR"
      6 
      7 DEST="$1"
      8 mkdir -p "$DEST/opinions" "$DEST/versions"
      9 
     10 ./dump.sh "https://www.republique-numerique.fr/api/opinions" \
     11   "$DEST/opinions" 1 100 title
     12 
     13 # actually, /opinions/$i/versions seems to contain all versions
     14 # no matter the opinion
     15 ./dump.sh "https://www.republique-numerique.fr/api/opinions/61/versions" \
     16   "$DEST/versions" 1 100 title 
     17