Repository navigation
feat: add badword and elevateword CSV upload/download commands - #57
Merged
Merged
Conversation
Add `badword upload|download` and `elevateword upload|download` for the CSV import and export endpoints of the Fess admin API. - upload asks for confirmation unless --yes; the import merges into the existing words and Fess runs it in the background, so success means the file was accepted - download writes to standard output or --file (--force to overwrite) - upload is refused client-side on Fess 15.6 to 15.8, as for dict upload - share the multipart upload and download code with the dict commands - document the CSV format and the import semantics in the skill references
marevol
force-pushed
the
feat/badword-elevateword-csv
branch
from
November 15, 2026 09:53
4fabb30 to
63d5910
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the CSV import/export endpoints of the Fess admin API that fessctl had no command for:
fessctl badword upload <file> [--yes]/fessctl badword download [--file PATH] [--force]fessctl elevateword upload <file> [--yes]/fessctl elevateword download [--file PATH] [--force]The multipart upload and the file download helpers in the client are shared with the existing dictionary upload/download. Like
dict upload, the upload is refused client-side on Fess 15.6 to 15.8, where the server cannot read the multipart request (POST is accepted from 15.9).Server behaviour worth knowing (documented in
badword.md/elevateword.md):uploadreturning success means the file was accepted. The import merges with existing words instead of replacing them.--deletes that word; only the first column is read, and the import does not understand CSV quoting although the export quotes every field, so words containing,or"do not round-trip.Tests
--force, missing file and existing target file (reported in the requested output format, before any download), multipart field names, unicode); they fail without the change.Stacked on the previous PR in this series.