From fe027a363e96e3144713fc9e80bdaaa52d7253f0 Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Mon, 20 Jul 2015 17:15:16 -0400 Subject: [PATCH] added readme updates, and example on attribution.py --- README.md | 11 ++++++++++- attribution.py | 16 ++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 93744d2..5013cc8 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,13 @@ Attribution report is a report that compares a data dump from Salesforce, and a ## Running -To run, either run dist/AttributionReport.exe, or run dist.mac/AttributionReport.app \ No newline at end of file +To run, either run dist/AttributionReport.exe, or run dist.mac/AttributionReport.app + + +## Building + +You can build this for a Mac by running: +``` $ python setup.py py2app --dist-dir dist.mac ``` + +or you can build this for a PC by running: +``` pyinstaller main.py --name=AttributionReport -F ``` diff --git a/attribution.py b/attribution.py index eeead94..07cf239 100644 --- a/attribution.py +++ b/attribution.py @@ -217,3 +217,19 @@ class AttributionReport(object): subprocess.call(["explorer", self.output_dir], shell=True) else: subprocess.call(["open", self.output_dir]) + + +if __name__ == '__main__': + app = AttributionReport(months=6,footer_length=6) + print "setup App" + app.set_dataframe_deposit("/Users/tyrelsouza/Dropbox (Addgene)/Addgene Shared/Dev/Attribution Report/deposit_data.csv") + print "set Deposit DF" + app.set_dataframe_sf("/Users/tyrelsouza/Dropbox (Addgene)/Addgene Shared/Dev/Attribution Report/salesforce_report.xlsx") + print "Set Salesforce DF" + app.set_output_dir("/Users/tyrelsouza/Dropbox (Addgene)/Addgene Shared/Dev/Attribution Report/Output/") + print "set output directory" + app.run() + print "App Run" + app.save() + print "App Save" +