-
Notifications
You must be signed in to change notification settings - Fork 1
Command Line Interface
- You must also have EXSCLAIM installed.
To use the CLI, open a command line interpreter (bash, zsh, Windows PowerShell, etc). You can use the following commands:
- exsclaim query
- exsclaim install-deps
Similar to exsclaim run
from the original version,
this command to run the exsclaim pipeline.
To run, type in:
$ exsclaim query /path/to/query.json
Where /path/to/query.json
is the path (absolute or relative) to a Query JSON file.
Each of the tools, Journal Scraper, Figure Separator, Caption Distributor, and HTML Scraper can be run given their flags.
Tool | Short-hand Flag | Long-hand Flag |
---|---|---|
Journal Scraper | -js |
--journal_scraper |
Figure Separator | -fs |
--figure_separator |
Caption Distributor | -cd |
--caption_distributor |
HTML Scraper | -hs |
--html_scraper |
An example run is
$ exsclaim query my_search.json --journal_scraper --figure_separator -hs
If no tool arguments are provided, then EXSCLAIM will automatically add the Journal Scraper, Figure Separator and Caption Distributor.
EXSCLAIM! 2.0 can also compress the results into a single file after the run has completed.
To do this, add --compress {compression_type}
where {compression_type}
specifies what compression algorithm and file type are used to compress the data.
The choices must align with Python's shutil.make_archive function.
The accepted values are currently:
- zip (.zip)
- tar (.tar)
- gztar (.tar.gz)
- bztar (.bz2)
- xztar (.tar.xz)
Any changes can be found using the documentation for shutil.get_archive_formats.
The compression location can be set using the --compress_location {location}
flag, where location is the file path (absolute or relative) that the volume will be written to.
It is important to note that the extension should be removed when you use this flag, as the shutil module will determine it based on the algorithm.
If this option is not chosen, then the compressed file will be in the parent directory of the results directory.
$ exsclaim query /path/to/json --compress gztar --compress_location /home/username/my_compressed_files
This will install any dependencies that EXSCLAIM! might need to run. Note, *NIX users may need to be in sudo mode to install some libraries.