The little things give you away... A collection of various small helper stuff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
766 B

  1. #!/bin/bash
  2. scriptpath="$(cd "$(dirname "$0")"; pwd -P)"
  3. "${scriptpath}/snscrape-extract" | while read -r service line
  4. do
  5. if [[ "${service}" == "facebook:" ]]
  6. then
  7. echo "printf '%s\n' ${line} | parallel -n 1 -k -j 4 $(printf "%q" "${scriptpath}")/snscrape-facebook-user"
  8. elif [[ "${service}" == "twitter-hashtag:" ]]
  9. then
  10. echo "printf '%s\n' ${line} | parallel -n 1 -k -j 3 $(printf "%q" "${scriptpath}")/snscrape-twitter-hashtag"
  11. elif [[ "${service}" == "twitter-user:" ]]
  12. then
  13. echo "printf '%s\n' ${line} | parallel -n 1 -k -j 3 $(printf "%q" "${scriptpath}")/snscrape-twitter-user"
  14. elif [[ "${service}" == "instagram:" ]]
  15. then
  16. echo "for user in ${line}; do $(printf "%q" "${scriptpath}")/snscrape-${service:0:-1}-user "'"${user}"; done'
  17. fi
  18. done