This project includes Python scripts to export data from the Hourglass app, process it, and create Excel files for importing into the Secretary app. Follow the steps below to execute the scripts and generate the required Excel files.
-
Python: Ensure Python 3.x is installed on your system.
-
Python Packages: You need
pandas
andopenpyxl
libraries. Install them using pip:pip install pandas openpyxl
-
Data Files: Make sure you have the following JSON files in the same directory:
dados.json
(Contains data for both publishers and reports)
There are two main scripts provided:
export_publishers.py
: Extracts publisher data fromdados.json
and generates an Excel file.export_reports.py
: Extracts report data fromdados.json
and generates an Excel file.
Ensure the following files are in the same directory:
dados.json
(Your source data file)export_publishers.py
(Script for processing publisher data)export_reports.py
(Script for processing report data)
This script will process the publisher data and create an Excel file named publishers_data.xlsx
.
python export_publishers.py
This script will process the publisher data and create an Excel file named publishers_data.xlsx
.
python export_publishers.py
This script will process the report data and create an Excel file named reports_data.xlsx
.
python export_reports.py
After running both scripts, you will have two Excel files:
publishers_data.xlsx
reports_data.xlsx
These files can now be imported into the Secretary app.
This script processes publisher data from dados.json
and creates an Excel file with the following columns:
- A: Empty
- B:
firstname
- C:
middlename
- D:
lastname
- E: Empty
- F: Status values (2 for "Regular Pioneer", 1 for "Continuous Auxiliary Pioneer")
- G: Appointment type (
1
for "MS",0
otherwise) - H: Appointment type (
1
for "Elder",0
otherwise) - I: Empty
- J: Empty
- K: Empty
- L: Birthdate in "DD/MM/YYYY" format
- M: Baptism date in "DD/MM/YYYY" format
- N: Gender (
1
for "Male",0
otherwise) - O: Cellphone numbers extracted
- P-Q-S-U-V-W: Empty
- R: Email
This script processes report data from dados.json
and creates an Excel file with the following columns:
- A: Full name (
firstname middlename lastname
) - B: Year
- C: Month
- D: Placements (0 if null)
- E: Videoshowings (0 if null)
- F: Minutes divided by 60
- G: Empty
- H: Credithours (0 if null)
- I: Return visits (0 if null)
- J: Studies (0 if null)
- K: Pioneer status (2 for "Regular", 1 for "Auxiliary", 0 if null)
- M: Remarks (empty if null)
- Ensure all JSON data is correctly formatted.
- Verify that the file paths and names are correct.
- If you encounter any issues, check the error messages for clues.
This project is licensed under the MIT License - see the LICENSE file for details.