@@ -162,11 +162,57 @@ To write a query to a JSON file, run the serializer:
162162 CLI Use
163163=======
164164
165+ The CLI reads a query from an input file, converts it from a specified source format
166+ to a target format, and writes the converted query to an output file.
167+
168+ To translate a search query on the command line, run
169+
170+ .. code-block :: bash
171+
172+ search-query-translate --from colrev_web_of_science \
173+ --input input_query.txt \
174+ --to colrev_pubmed \
175+ --output output_query.txt
176+
177+ Arguments
178+ ---------
179+
180+ - ``--from `` (required):
181+ The source query format.
182+ Example: ``colrev_web_of_science ``
183+
184+ - ``--input `` (required):
185+ Path to the input file containing the original query.
186+
187+ - ``--to `` (required):
188+ The target query format.
189+ Example: ``colrev_pubmed ``
190+
191+ - ``--output `` (required):
192+ Path to the file where the converted query will be written.
193+
194+
195+
196+ Example
197+ -------
198+
199+ Suppose you have a Web of Science search query saved in ``input_query.txt `` and you want to convert it to a PubMed-compatible format. Run:
200+
201+ .. code-block :: bash
202+
203+ search-query-translate --from colrev_web_of_science \
204+ --input input_query.txt \
205+ --to colrev_pubmed \
206+ --output output_query.txt
207+
208+ The converted query will be saved in ``output_query.txt ``.
209+
165210Linters can be run on the CLI:
166211
167212.. code-block :: bash
168213
169- search-file-lint search-file.json
214+ search-query-lint search-file.json
215+
170216
171217 Pre-commit Hooks
172218================
@@ -179,7 +225,7 @@ Linters can be included as pre-commit hooks by adding the following to the ``.pr
179225 - repo : https://github.com/CoLRev-Environment/search-query
180226 rev : main # or version of search-query
181227 hooks :
182- - id : search-file -lint
228+ - id : search-query -lint
183229
184230 For development and testing, use the following:
185231
@@ -188,9 +234,9 @@ For development and testing, use the following:
188234 repos :
189235 - repo : local
190236 hooks :
191- - id : search-file -lint
237+ - id : search-query -lint
192238 name : Search-file linter
193- entry : search-file -lint
239+ entry : search-query -lint
194240 language : python
195241 files : \.json$
196242
0 commit comments