diff options
-rw-r--r-- | README | 37 |
1 files changed, 21 insertions, 16 deletions
@@ -1,26 +1,31 @@ | |||
1 | Guile bindings for GNUnet | 1 | * gnunet-guile |
2 | ————————————————————————— | ||
3 | 2 | ||
4 | Work in progress! | 3 | Install recent gnunet using the following command: |
5 | 4 | ||
6 | To try the stub gnunet-search clone, you must have a working GNUnet | 5 | $ guix package -f guix.scm |
7 | configuration. Edit the file `examples/search.scm` and modify the line | ||
8 | 6 | ||
9 | (define config-file "~/.gnunet/gnunet.conf") | 7 | Then use the usual cli dance: |
10 | 8 | ||
11 | to match your current GNUnet configuration file. | 9 | $ ./bootstrap && ./configure && make |
12 | 10 | ||
13 | Then, go inside the bindings directory and run `search.scm` as a | 11 | You must first run gnunet services with the following command: |
14 | script. For instance, to run a search on the keywords "foo" and "bar": | ||
15 | 12 | ||
16 | $ cd guix/gnunet/ | 13 | $ gnunet-arm -c etc/p2.conf -s |
17 | $ examples/search.scm "foo" "bar" | ||
18 | 14 | ||
19 | This will start a 5 seconds search on the given keywords. Here’s the | 15 | Then you can publish a file with the following command: |
20 | output when exactly one find matches the keyword “foo”: | ||
21 | 16 | ||
22 | gnunet-download -o "foo.txt" gnunet://fs/chk/M976V69FDSQDH74AORDDLB… | 17 | $ echo "Héllo, world!" > hello |
18 | $ ./pre-inst-env ./gnunet-guile publish etc/p2.conf hello hello | ||
23 | 19 | ||
24 | You can also check your bindings with the command: | 20 | This will publish the hello file under the hello keyword. |
25 | 21 | ||
26 | $ ./run-tests.scm | 22 | You can download it using the URI given in the output for instance: |
23 | |||
24 | $ ./pre-inst-env ./gnunet-guile download etc/p2.conf gnunet://fs/chk/QBZFVRKCKAW95XW5ZB33QKHNR25S5SV3JWC0RKZ53DKH1J6B0YRC0F185KVPWPRB0M8PZDYK8QMDRM0F56RNQ94NSA2E8YVRZWQQQ4G.RHKB5KF1G8SRV610AMSJ7K5XH66T3F5J53JW2BWFXJXJXGB919AJRYF6FD2HKSKT6QDN2BF3D1XS307WY3DBS92FN7WX9HQQ1MP3P40.15 out.txt | ||
25 | |||
26 | You can lookup the files that are tagged as 'hello' with the following | ||
27 | commmand: | ||
28 | |||
29 | $ ./pre-inst-env ./gnunet-guile search etc/p2.conf hello | ||
30 | |||
31 | Use Ctrl+C to kill the search command. \ No newline at end of file | ||