This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Download conversations from a Help Scout mailbox and save to CSV file. | |
Be sure to replace the App ID and Secret in the authorization call as well | |
as the Mailbox ID in the conversations API call. | |
Python: 3.9.0 | |
""" | |
import csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script: WordPress Plugin Reviews Scraper | |
# Author: Frank Corso | |
# Date Created: 08/16/2019 | |
# Last Modified: 05/23/2020 | |
# Python Version: 3.6.5 | |
# There are waits built in to avoid putting strain on the wp.org servers. | |
# However, any amount of scraping adds to server load. | |
# So, please avoiding running this script on plugins with lots of reviews | |
# and try to only run this script once and not on any repeating schedule. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import pandas as pd | |
import typer | |
def main(file: str, to_format: str, size: int = typer.Argument(40000)): | |
""" | |
CSV Chunkifier uses Typer. Pass an existing CSV file, the name for the new files, and | |
size of each chunk to the command. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script: Site Crawl - Domain Search | |
# Author: Frank Corso | |
# Date Created: 09/14/2020 | |
# Last Modified: 09/14/2020 | |
# Python Version: 3.6.5 | |
# Crawls a supplied url (hopefully your own) and searches for instances of links to a different supplied domain. | |
# i.e. Crawls site on https://example-one.com looking for any links to example-two.com. | |
# Avoid crawling for a link that is in your header or footer as this will capture all of those too. | |
# To run, use `python domain-search.py` and then supply the site to be crawled in `https://example-one.com` format. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script: EDD Customer License Calculations | |
# Author: Frank Corso | |
# Date Created: 04/06/2020 | |
# Last Modified: 07/21/2020 | |
# Python Version: 3.6.5 | |
# Takes exports of licenses from EDD and turns it into a CSV of customers with total number of licenses, | |
# total number of sites, active licenses, and total active sites. This is meant as a stepping stone for | |
# further analysis. | |
# To use, have CSVs of licenses for each download in EDD in a 'licenses' directory with each |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script: EDD Per Download License Calculations | |
# Author: Frank Corso | |
# Date Created: 04/05/2020 | |
# Last Modified: 07/16/2020 | |
# Python Version: 3.6.5 | |
# Takes exports of licenses from EDD and turns it into a CSV of totals and averages. | |
# To use, have CSVs of licenses for each download in EDD in a 'licenses' directory with each | |
# saved as edd-export-licenses-(download-slug).csv | |
# Put this script above that directory. In terminal, run python license_calculations.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Converts an XML generated from exporting | |
# sessions on a WordCamp site to a CSV file | |
# Use CMD/Powershell/Terminal to enter: | |
# python wordcamp-sessions-xml-to-csv.py | |
import xml.etree.ElementTree as ET | |
import csv | |
# Get the filenames | |
file_name = input("What is the XML file to convert? ") |