ArchiveBox/archivebox/plugins
Nick Sweeting e26a0f6fc0
Fix hook file overwrites in plugin directory (#1732)
Multiple hooks in the same plugin directory were overwriting each
other's stdout.log, stderr.log, hook.pid, and cmd.sh files. Now each
hook uses filenames prefixed with its hook name:
- on_Snapshot__20_chrome_tab.bg.stdout.log
- on_Snapshot__20_chrome_tab.bg.stderr.log
- on_Snapshot__20_chrome_tab.bg.pid
- on_Snapshot__20_chrome_tab.bg.sh

Updated:
- hooks.py run_hook() to use hook-specific names
- core/models.py cleanup and update_from_output methods
- Plugin scripts to no longer write redundant hook.pid files

<!-- IMPORTANT: Do not submit PRs with only formatting / PEP8 / line
length changes. -->

# Summary

<!--e.g. This PR fixes ABC or adds the ability to do XYZ...-->

# Related issues

<!-- e.g. #123 or Roadmap goal #
https://github.com/pirate/ArchiveBox/wiki/Roadmap -->

# Changes these areas

- [ ] Bugfixes
- [ ] Feature behavior
- [ ] Command line interface
- [ ] Configuration options
- [ ] Internal architecture
- [ ] Snapshot data layout on disk


<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Prevented hook file collisions by giving each hook its own stdout,
stderr, pid, and cmd filenames. This fixes mixed logs and ensures
correct cleanup and status checks when multiple hooks run in the same
plugin directory.

- **Bug Fixes**
- hooks.py: write hook-specific stdout/stderr/pid/cmd files and exclude
them from new_files; derive cmd.sh from pid for safe kill.
- core/models.py: read hook-specific logs; exclude hook output files
when computing outputs; cleanup and background detection use *.pid.
- Plugins: stop writing redundant hook.pid files; minor chrome utils
cleanup.

<sup>Written for commit 754b096193.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2025-12-30 23:36:09 -08:00
..
accessibility fix extension loading and consolidate chromium logic 2025-12-29 17:47:37 -08:00
apt improve plugin tests and config 2025-12-29 00:45:23 -08:00
archive_org improve plugin tests and config 2025-12-29 00:45:23 -08:00
brew improve plugin tests and config 2025-12-29 00:45:23 -08:00
chrome Fix hook file overwrites in plugin directory (#1732) 2025-12-30 23:36:09 -08:00
consolelog use hook-specific filenames to avoid overwrites 2025-12-31 02:00:15 +00:00
custom improve plugin tests and config 2025-12-29 00:45:23 -08:00
dom centralize chrome pid and zombie logic in chrome_utils 2025-12-29 17:57:23 -08:00
env improve plugin tests and config 2025-12-29 00:45:23 -08:00
favicon make plugin config more consistent 2025-12-29 13:21:46 -08:00
forumdl more fixes 2025-12-29 21:03:05 -08:00
gallerydl make plugin config more consistent 2025-12-29 13:21:46 -08:00
git more fixes 2025-12-29 21:03:05 -08:00
headers improve plugin tests and config 2025-12-29 00:45:23 -08:00
htmltotext improve plugin tests and config 2025-12-29 00:45:23 -08:00
infiniscroll extension test fixes 2025-12-30 18:28:14 -08:00
istilldontcareaboutcookies extension test fixes 2025-12-30 18:28:14 -08:00
mercury make plugin config more consistent 2025-12-29 13:21:46 -08:00
merkletree improve plugin tests and config 2025-12-29 00:45:23 -08:00
modalcloser extension test fixes 2025-12-30 18:28:14 -08:00
npm fix extension loading and consolidate chromium logic 2025-12-29 17:47:37 -08:00
papersdl make plugin config more consistent 2025-12-29 13:21:46 -08:00
parse_dom_outlinks fix extension loading and consolidate chromium logic 2025-12-29 17:47:37 -08:00
parse_html_urls improve plugin tests and config 2025-12-29 00:45:23 -08:00
parse_jsonl_urls improve plugin tests and config 2025-12-29 00:45:23 -08:00
parse_netscape_urls improve plugin tests and config 2025-12-29 00:45:23 -08:00
parse_rss_urls improve plugin tests and config 2025-12-29 00:45:23 -08:00
parse_txt_urls improve plugin tests and config 2025-12-29 00:45:23 -08:00
pdf centralize chrome pid and zombie logic in chrome_utils 2025-12-29 17:57:23 -08:00
pip fix extension loading and consolidate chromium logic 2025-12-29 17:47:37 -08:00
readability make plugin config more consistent 2025-12-29 13:21:46 -08:00
redirects use hook-specific filenames to avoid overwrites 2025-12-31 02:00:15 +00:00
responses use hook-specific filenames to avoid overwrites 2025-12-31 02:00:15 +00:00
screenshot centralize chrome pid and zombie logic in chrome_utils 2025-12-29 17:57:23 -08:00
search_backend_ripgrep make plugin config more consistent 2025-12-29 13:21:46 -08:00
search_backend_sonic improve plugin tests and config 2025-12-29 00:45:23 -08:00
search_backend_sqlite improve plugin tests and config 2025-12-29 00:45:23 -08:00
seo fix extension loading and consolidate chromium logic 2025-12-29 17:47:37 -08:00
singlefile new jsonl cli interface 2025-12-30 16:12:53 -08:00
ssl use hook-specific filenames to avoid overwrites 2025-12-31 02:00:15 +00:00
staticfile use hook-specific filenames to avoid overwrites 2025-12-31 02:00:15 +00:00
title improve plugin tests and config 2025-12-29 00:45:23 -08:00
twocaptcha working extension tests 2025-12-30 18:30:16 -08:00
ublock extension test fixes 2025-12-30 18:28:14 -08:00
wget new jsonl cli interface 2025-12-30 16:12:53 -08:00
ytdlp remove uneeded test 2025-12-29 13:30:25 -08:00