[PR #85] [MERGED] Project refactor #782

Closed
opened 2026-02-25 20:36:42 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/benbusby/whoogle-search/pull/85
Author: @benbusby
Created: 5/29/2020
Status: Merged
Merged: 6/2/2020
Merged by: @benbusby

Base: developHead: project-refactor-1


📝 Commits (10+)

  • 9f435bf Major refactor of requests and session management
  • 8fa87c0 Added ability to save/load configs by name
  • ffd54a5 Merge remote-tracking branch 'origin/master' into project-refactor-1
  • e0c8835 Result formatting and removal of unused elements
  • d375e6d Minor change to button label
  • 60a1cf2 Fixed issue with "de-pickling" of flask session
  • b73579a Switched to pickling saved configs
  • cdd5e1a Updated ad/sponsored content filter and conf naming
  • 7afb5ed Version bump to 0.2.0
  • af1ec88 Fixed request.send return style

📊 Changes

16 files changed (+390 additions, -196 deletions)

View changed files

📝 .gitignore (+2 -0)
📝 app/__init__.py (+15 -3)
📝 app/filter.py (+107 -76)
📝 app/request.py (+11 -28)
📝 app/routes.py (+73 -70)
📝 app/static/js/controller.js (+35 -0)
📝 app/templates/header.html (+2 -2)
📝 app/templates/index.html (+9 -11)
app/utils/__init__.py (+0 -0)
app/utils/misc.py (+20 -0)
app/utils/routing_utils.py (+69 -0)
📝 requirements.txt (+2 -1)
📝 setup.py (+1 -1)
test/test_misc.py (+36 -0)
📝 test/test_results.py (+3 -3)
📝 test/test_routes.py (+5 -1)

📄 Description

Introduces a lot of improvements and functionality changes:

  • Request library switched from pycurl to requests, which by default has much better support for non-latin character sets
  • Key generation updated to regenerate element and text keys separately
    • Element keys are used for encrypting paths to external image/audio/etc elements, and are regenerated after all outside elements have been served
    • Text keys are used for encrypting relative links within the app (i.e. switching from search results to news results) and are regenerated with each search request
  • Updated entire app to use individual sessions per client, to allow for individual user configuration
    • Partially addresses a topic brought up in #60, where a user wanted the ability to share their whoogle instance with others, but without worrying about anyone changing their config settings
    • Accordingly, the /config route has been updated so that configs can now be saved/loaded by name on a per user basis as needed. These are stored in parallel to the session values within the config volume, so all named/saved configs will persist across reboots of the app.
  • Added passthrough for external audio elements
  • Refactored filtering of result set to include the question section and the search correction field

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/benbusby/whoogle-search/pull/85 **Author:** [@benbusby](https://github.com/benbusby) **Created:** 5/29/2020 **Status:** ✅ Merged **Merged:** 6/2/2020 **Merged by:** [@benbusby](https://github.com/benbusby) **Base:** `develop` ← **Head:** `project-refactor-1` --- ### 📝 Commits (10+) - [`9f435bf`](https://github.com/benbusby/whoogle-search/commit/9f435bf8fefd1319b69ad46b967ba914df393d6f) Major refactor of requests and session management - [`8fa87c0`](https://github.com/benbusby/whoogle-search/commit/8fa87c0d1f7fd4199acf05e620d26329d38d36bf) Added ability to save/load configs by name - [`ffd54a5`](https://github.com/benbusby/whoogle-search/commit/ffd54a53ae88acaed273e24335c5d6a6ff27894e) Merge remote-tracking branch 'origin/master' into project-refactor-1 - [`e0c8835`](https://github.com/benbusby/whoogle-search/commit/e0c88359f577bcc82ba4c323991a728b3a4114a5) Result formatting and removal of unused elements - [`d375e6d`](https://github.com/benbusby/whoogle-search/commit/d375e6d5de7b8d2e95d83aeadf28bd5ca9b83a41) Minor change to button label - [`60a1cf2`](https://github.com/benbusby/whoogle-search/commit/60a1cf24b963bc8884e01eab646fe80f085e7b92) Fixed issue with "de-pickling" of flask session - [`b73579a`](https://github.com/benbusby/whoogle-search/commit/b73579a11df451710ca99be378662686ea4b7d56) Switched to pickling saved configs - [`cdd5e1a`](https://github.com/benbusby/whoogle-search/commit/cdd5e1a78ef4894d1556e57473fe9286d4b56b4e) Updated ad/sponsored content filter and conf naming - [`7afb5ed`](https://github.com/benbusby/whoogle-search/commit/7afb5ed4b29d92be038d408017cd0ec12532a74d) Version bump to 0.2.0 - [`af1ec88`](https://github.com/benbusby/whoogle-search/commit/af1ec882ec0abedae9bec8cb622e682c0736a9d6) Fixed request.send return style ### 📊 Changes **16 files changed** (+390 additions, -196 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+2 -0) 📝 `app/__init__.py` (+15 -3) 📝 `app/filter.py` (+107 -76) 📝 `app/request.py` (+11 -28) 📝 `app/routes.py` (+73 -70) 📝 `app/static/js/controller.js` (+35 -0) 📝 `app/templates/header.html` (+2 -2) 📝 `app/templates/index.html` (+9 -11) ➕ `app/utils/__init__.py` (+0 -0) ➕ `app/utils/misc.py` (+20 -0) ➕ `app/utils/routing_utils.py` (+69 -0) 📝 `requirements.txt` (+2 -1) 📝 `setup.py` (+1 -1) ➕ `test/test_misc.py` (+36 -0) 📝 `test/test_results.py` (+3 -3) 📝 `test/test_routes.py` (+5 -1) </details> ### 📄 Description Introduces a lot of improvements and functionality changes: - Request library switched from `pycurl` to `requests`, which by default has much better support for non-latin character sets - Key generation updated to regenerate element and text keys separately - Element keys are used for encrypting paths to external image/audio/etc elements, and are regenerated after all outside elements have been served - Text keys are used for encrypting relative links within the app (i.e. switching from search results to news results) and are regenerated with each search request - Updated entire app to use individual sessions per client, to allow for individual user configuration - Partially addresses a topic brought up in #60, where a user wanted the ability to share their whoogle instance with others, but without worrying about anyone changing their config settings - Accordingly, the `/config` route has been updated so that configs can now be saved/loaded by name on a per user basis as needed. These are stored in parallel to the session values within the config volume, so all named/saved configs will persist across reboots of the app. - Added passthrough for external audio elements - Fixes #82 - Refactored filtering of result set to include the question section and the search correction field - Fixes #84 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 20:36:42 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/whoogle-search#782
No description provided.