Skip to content
Snippets Groups Projects
Commit 9029b530 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

DOC: Updated documentation a bit.

parent 27d59126
No related branches found
No related tags found
1 merge request!4MAINT: be more specific with output
...@@ -34,7 +34,7 @@ For testing: ...@@ -34,7 +34,7 @@ For testing:
3. Start an empty (!) CaosDB instance (with the mounted extroot). The 3. Start an empty (!) CaosDB instance (with the mounted extroot). The
database will be cleared during testing, so it's important to use database will be cleared during testing, so it's important to use
an empty instance. an empty instance.
4. Run `test.sh`. 4. Run `test.sh`. Note that this may modify content of the `integrationtest/extroot/` directory.
## Code Formatting ## Code Formatting
`autopep8 -i -r ./` `autopep8 -i -r ./`
......
...@@ -43,7 +43,7 @@ except ModuleNotFoundError: ...@@ -43,7 +43,7 @@ except ModuleNotFoundError:
return argparse.ArgumentParser() return argparse.ArgumentParser()
def print_success(text): def print_success(text):
print("Success: "+text) print("Success: " + text)
def get_parser(): def get_parser():
......
...@@ -75,7 +75,7 @@ The crawler can be executed directly via a python script (usually called ...@@ -75,7 +75,7 @@ The crawler can be executed directly via a python script (usually called
``crawl.py``). The script prints the progress and reports potential ``crawl.py``). The script prints the progress and reports potential
problems. The exact behavior depends on your setup. However, you can problems. The exact behavior depends on your setup. However, you can
have a look at the example in the have a look at the example in the
`tests <https://gitlab.com/caosdb/caosdb-advanced-user-tools/-/blob/main/integrationtests/full_test/crawl.py>`__. `tests <https://gitlab.indiscale.com/caosdb/src/caosdb-advanced-user-tools/-/blob/main/integrationtests/crawl.py>`__.
.. Note:: The crawler depends on the CaosDB Python client, so make sure to install :doc:`pycaosdb .. Note:: The crawler depends on the CaosDB Python client, so make sure to install :doc:`pycaosdb
<caosdb-pylib:getting_started>`. <caosdb-pylib:getting_started>`.
...@@ -86,14 +86,18 @@ Typically, an invocation looks like: ...@@ -86,14 +86,18 @@ Typically, an invocation looks like:
.. code:: python .. code:: python
python3 crawl.py "/TestData/" python3 crawl.py /someplace/
In this case ``/TestData/`` identifies the path to be crawled **within .. Note:: For trying this out with the above mentioned example crawler from the integration tests,
the CaosDB file system**. You can browse the CaosDB file system by make sure that the ``extroot`` directory in the ``integrationtests`` folder is used as
CaosDB's extroot directory,and call the crawler with ``python3 crawl.py /``.
In this case ``/someplace/`` identifies the path to be crawled **within
CaosDB's file system**. You can browse the CaosDB file system by
opening the WebUI of your CaosDB instance and clicking on “File System”. opening the WebUI of your CaosDB instance and clicking on “File System”.
In the backend, ``crawl.py`` starts a CQL query In the backend, ``crawl.py`` starts a CQL query
``FIND File WHICH IS STORED AT /TestData/**`` and crawls the resulting ``FIND File WHICH IS STORED AT /someplace/**`` and crawls the resulting
files according to your customized ``CFoods``. files according to your customized ``CFoods``.
Crawling may consist of two distinct steps: 1. Insertion of files (use Crawling may consist of two distinct steps: 1. Insertion of files (use
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment