Skip to content

Instantly share code, notes, and snippets.

@gchristian
gchristian / parsepdf.py
Last active May 24, 2021 18:24
parse pdf into smaller pdfs based on key value
#separate pdf based on a phrase that can be used to delineate break points and names files by first word after that break point
import PyPDF2
import pdfplumber
if __name__ == '__main__':
pdf_path = 'MBA Report Creator.pdf'
pdf_break_point = 'Student_Number '
base_pdf = PyPDF2.PdfFileReader(pdf_path)
new_pdf = PyPDF2.PdfFileWriter()
@mrkrndvs
mrkrndvs / export-named-sheet-as-csv.gs
Last active January 27, 2024 00:02 — forked from mderazon/export-to-csv.gs
Google apps script to export an individual sheet as csv file
/*
* script to export data of the named sheet as an individual csv files
* sheet downloaded to Google Drive and then downloaded as a CSV file
* file named according to the name of the sheet
* original author: Michael Derazon (https://gist.github.com/mderazon/9655893)
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "Download Primary Time File", functionName: "saveAsCSV"}];
@mderazon
mderazon / export-to-csv.gs
Last active April 2, 2024 22:25
Google apps script to export to individual csv files all sheets in an open spreadsheet
/*
* script to export data in all sheets in the current spreadsheet as individual csv files
* files will be named according to the name of the sheet
* author: Michael Derazon
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "export as csv files", functionName: "saveAsCSV"}];
ss.addMenu("csv", csvMenuEntries);