summaryrefslogtreecommitdiff
path: root/src/weepinbell
AgeCommit message (Collapse)Author
6 daysmigration: rehash -> re-normalize #81eltrac
calculating hash using old unnormalized URLs will most likely produce the same old invalid hash, this commit normalizes URLs first and then calculate new hash, updating old URLs as well.
6 daysmigration: rehash during migrate-db #81eltrac
10 daysutils.digest: remove unused codeeltrac
10 daystest, webhook: tidy up webhook; add testseltrac
- (send-webhook) does not need to validate URLs; (trigger) already does that; replace validation logic with :pre conditional - (make-request) does not need to fallback to empty string when event-key is nil. it should never be nil.
10 daystest, downloader: tidy up downloader and add testseltrac
- simplify (.mkdirs parent-dir) and with (io/make-parents file) - should return false when HTTP request fails, not nil - check if corrputed file exitsts before deleting it - add tests
10 daystest, migration: test edn-jf2ify; test throwable handling during migrationeltrac
10 daysjf2/spec: allow missing name; wm-properties are arrays; rsvp is string not URLeltrac
11 daysall: use JF2 as a single source of truth, compile ↵eltrac
microformats/JSON-LD/<meta> to JF2 (#80) closes #75 This is a large squash commit. For details, see https://codeberg.org/eltrac/weepinbell/pulls/80
2026-10-24storage/h2: optimize H2 database performanceeltrac
- use LEFT JOIN instead of making multiple queries - put insert/update inside transactions - add indexes - fix configuration description
2026-10-24storage: query result is always in chronological order #79eltrac
2026-10-24retriever: fix not parsing numeric string to number before paging #79eltrac
2026-10-23storage: migrate from SQLite to H2eltrac
add ADR-0002 about migrating to H2
2026-10-23migration: catch Exceptions while migrating database #76eltrac
2026-10-21core: add embeded nREPL servereltrac
2026-10-19core, migration: add migrate-db, from edn to sqliteeltrac
2026-10-18receiver: use http response utilities to replace response mapseltrac
fix test cases
2026-10-16storage: create parent directories for SQLite .dbeltrac
2026-10-16Implement SQLite storage #7 (#73)eltrac
- new config `:storage-type` (default `:edn`, also support `:sqlite`) - `LICENSE` change: add exceptions to `next.jdbc` (which uses EPL) Reviewed-on: https://codeberg.org/eltrac/weepinbell/pulls/73
2026-10-16test: improve coverage #28eltrac
- storage-test: worker should handle other storage operations if some of them throws Exception - storage-test: microformats and proxied-photo should be stored as is - microformats-test: use-prop shuold handle both string and keyword typed keys - comment unused http client functions
2026-10-15test: test concurrent proceesor; assert config option typeseltrac
2026-10-15core: allow configuring minimal log level, default :infoeltrac
- refactored weepinbell.core/start-system. moved config loading outside start-system, loaded in -main function. - use :log-level in config and set timbre :min-level in -main
2026-10-15test: remove http request retries from testseltrac
2026-10-15processor: concurrently starts multiple pipeline loopseltrac
2026-10-14processor, storage: clear queues before shutting down proceesor and storage ↵eltrac
worker
2026-10-14processor: log before write; logging afterwards doesn't mean write is completedeltrac
2026-10-14core, storage: add storage worker that handles writes asynchronously and ↵eltrac
thread-safely fix
2026-10-13retriever: no reducing empty microformatseltrac
2026-10-13retriever: fix mftype inferring not working with multi valueseltrac
2026-10-13handler: fix JSON response missing proper Content-Typeeltrac
- wrap-defaults middleware should be placed outside of wrap-json-response, otherwise Content-Type would be in correct - remove unused static resources
2026-10-13style: cljfmt everythingeltrac
2026-10-13wrapper: fix not downloading photo with relative urlseltrac
2026-10-13retriever, test: refactor retriever; accurate MF type matchingeltrac
- microformats type inferring is more accurate - before: check if microformats h-entry has a type key (:like-of, :in-reply-to...) - now: check if such key's value equals to target URL, so it makes sure this like/reply/repost/rsvp is sent to this target - use ring.util.http-response to simplify response - `?mftype=` filter no longer depends on microformats reduction - retriever.clj is overall cleaner
2026-10-13utils.url: fix not removing trailing slash of a root path URLeltrac
2026-10-13test: add basic test suite for storage layereltrac
also remove post-conditional assertion from edn-storage/use-store, since tests have that covered
2026-10-11retriever: fix mftype filter not working because type mismatcheltrac
microformats type in original response body (not converted to string by middleware) is a keyword, not a string. comparing a keyword to a string is always false.
2026-10-11proceesor, storage: better error handling; no interrupting pipelineeltrac
- print clear stack trace using timbre when capturing exceptions - don't pass nil to url/normalize; if url/normalize gets a nil, instead of NPE, it now returns an empty string - capture exceptions in processor pipeline to keep it from dying - http.downloader now checks response status instead of blindly downloading anything
2026-10-10retriever: improve page partitioner robustnesseltrac
- fix page partitioning function not handling Long as a valid page number - better error handling when partitioning API page frames this is a temporary fix. retriever needs refactoring.
2026-10-10test: cover config, core, webserver; add edge cases in existing testseltrac
- test loading and merging config - test start-system and graceful shutdown - test /endpoint and /api/send - test receiver handling nil input - test webserver startup and graceful shutdown
2026-10-10config, core: use WEEPINBELL_CONFIG env var to set custom config file patheltrac
- config/load-config now accepts one arg, which is the config file path - core uses WEEPINBELL_CONFIG env, fallback to "config.edn"
2026-10-10receiver: should not call normalize if source/target is nileltrac
if source or target is nil, it would not return an error message but will throw an uncaught exception java.lang.NullPointerException: Cannot invoke "String.length()" because "this.input" is null this is fixed by nil-guarding normalize function call
2026-10-10edn_storage, handler, core: decouple stroage conformity responsibilityeltrac
- handler and core no longer care if storage is a valid vtable - use-store assert storage is valid before it was returned - AssertionError should be spotted while testing
2026-10-09mf.searcher: find-type now recursively search in childreneltrac
add recursive find-type tests
2026-10-09verifier, http.client: retry timeout HTTP requestseltrac
- add weepinbell.http.client/with-retry macro - retry only requests that returns :error with type TimeoutException - retry is done asynchronously - with-retry should return a Future - retry verifier requesting source and target, 3 times with 5 seconds backoff
2026-10-08handler, fe: add /api/send as an alias of /endpointeltrac
frontend uses /api/send instead of configurable /endpoint
2026-10-08config, storage: replace clojure.edn with fast-edn for speedeltrac
2026-10-08fe: backend should be frontend-agnosticeltrac
2026-10-07handler: add /api/count #48eltrac
2026-10-07test, verifier, utils: fix failed testseltrac
- some namespaces tests require did not get renamed - url/extract might throw AssertionError if input contains non-HTTP(S) urls. it should not check schemes. - verifier doesn't need to filter non-HTTP(S) urls since they will return false anyway, and plus it makes localhost urls in tests fail
2026-10-07handler: pluggable services in API routes/handlerseltrac
2026-10-07processor, webserver: move two main subsystems to own dir and make facadeseltrac
add docstrings format code