Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Google Custom Search (GCS) and add 2024Q4 report #148

Merged
merged 35 commits into from
Jan 9, 2025
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
6cfacd2
add/update processed gcs data
TimidRobot Dec 13, 2024
f05b713
add totals_by_country and totals_by_langauage
TimidRobot Dec 13, 2024
3f5a441
improve argument and error handling
TimidRobot Dec 13, 2024
525aa37
improve argument and error handling
TimidRobot Dec 13, 2024
62e6f9e
improve argument and error handling
TimidRobot Dec 13, 2024
b1a0fba
use supplied logger and improve info message
TimidRobot Dec 13, 2024
f314773
refactor to include updates to flow (--enable-save, --enable-git), hi…
TimidRobot Dec 13, 2024
0713b37
add plot_totals_by_product
TimidRobot Dec 18, 2024
ba7093f
improve Google Custom Search (GCS) fetch accuracy with quotes and lin…
TimidRobot Dec 18, 2024
ce68a8a
update data following accuracy improvements
TimidRobot Dec 19, 2024
2c0f4fa
Merge branch 'improve-gcs-accuracy' into moar-gcs
TimidRobot Dec 19, 2024
a73aa36
Refactor for clarity and to be more "pythonic"
TimidRobot Dec 19, 2024
955a29e
separate caption text and entry text
TimidRobot Dec 19, 2024
24741cf
add GCS intro and references
TimidRobot Dec 19, 2024
99bc996
rename processed data sets. add current, old, retired. rmove top 25
TimidRobot Dec 21, 2024
713b0c4
update reporting plot styles and add gcs current, old, retired
TimidRobot Dec 21, 2024
c2e9a4a
re-enable plots
TimidRobot Dec 21, 2024
2c61cf5
update processed data
TimidRobot Dec 23, 2024
00c8814
refactor GCS report
TimidRobot Dec 23, 2024
0d5fffd
Merge branch 'main' into moar-gcs
TimidRobot Dec 23, 2024
f9bf303
update processed data with more accurate gcs data
TimidRobot Dec 23, 2024
a117c6a
fix spelling mistake
TimidRobot Dec 23, 2024
711ecb6
improve naming and add plots
TimidRobot Dec 23, 2024
a734985
Merge branch 'main' into moar-gcs
TimidRobot Jan 6, 2025
5a1e162
add and fix support for specifying quarter
TimidRobot Jan 6, 2025
52e1a02
rename report to be more generic
TimidRobot Jan 6, 2025
ae0433f
add support for specifying quarter and usage section
TimidRobot Jan 6, 2025
c7a763d
rename functions for easier sorting
TimidRobot Jan 6, 2025
5ed2a7d
sort functions
TimidRobot Jan 6, 2025
ee3f5f8
move plotting code to shared library
TimidRobot Jan 6, 2025
000b7a3
remove extra space
TimidRobot Jan 6, 2025
c757504
add 2024Q4 report
TimidRobot Jan 6, 2025
0647329
Impove terms and wording
TimidRobot Jan 9, 2025
dbf9ef1
provide more context for Approved for Free Cultural Works
TimidRobot Jan 9, 2025
f8b3cca
fix data paths
TimidRobot Jan 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
improve argument and error handling
TimidRobot committed Dec 13, 2024

Verified

This commit was signed with the committer’s verified signature.
TimidRobot Timid Robot Zehta
commit 3f5a4417f572ccf5c8a02094908a9d27e2d652c3
8 changes: 6 additions & 2 deletions scripts/1-fetch/gcs_fetch.py
Original file line number Diff line number Diff line change
@@ -82,7 +82,10 @@ def parse_arguments():
action="store_true",
help="Development mode: avoid hitting API (generate fake data)",
)
return parser.parse_args()
args = parser.parse_args()
if not args.enable_save and args.enable_git:
parser.error("--enable-git requires --enable-save")
return args


def get_search_service():
@@ -289,7 +292,8 @@ def main():
LOGGER.error(e.message)
sys.exit(e.exit_code)
except SystemExit as e:
LOGGER.error(f"System exit with code: {e.code}")
if e.code != 0:
LOGGER.error(f"System exit with code: {e.code}")
sys.exit(e.code)
except KeyboardInterrupt:
LOGGER.info("(130) Halted via KeyboardInterrupt.")