chickadee » fcp

fcp

Description

fcp is a very minimal and somewhat simplistic interface to the Freenet FCP library. Freenet documentation can be found here Freenet and FCP is documented hereFCPv2.

Author

Matt Welland is the author of the fcp chicken egg. Freenet and the Freenet client protocol (FCPv2) were written by Ian Clarke and others.

Repository

The fossil repository for the fcp source code is hosted by Kiatoa: https://www.kiatoa.com/fossils/freenet.

Requirements

You will need to install Freenet on the same machine where the fcp calls are made. If Freenet is running on another machine you'll need to configure it accordingly.

Parameters

verbosity

verbosity numberprocedure

Turn up the noise. Default is 0 (minimal feedback but still some on std-out).

Procedures

retrieve-file

retrieve-file URI dir fileprocedure

Download the content of URI into file in dir. See Freenet documentation for URI format and information.

insert-file

insert-file dir file #!optional URIprocedure

Insert file residing in dir into Freenet. A URI will be returned. To insert SSK, USK and KSK (I believe KSK will work) provide the URI.

gen-ssk

gen-sskprocedure

Create a URI to use in insert-file. Returns the private and publish URI strings along with other info in an alist.

Example

(insert-file "/tmp" "ten-habits.pdf")
....................
"CHK@ugLEKvesBPC0c5bKbh86N9omjaMF4a-JUdzifYc9wPE,kj4d7bUEqmXFthm8rbG69UKqpLrxLM7e2n6LJMAVpPE,AAMC--8/ten-habits.pdf"
(retrieve-file "CHK@ofHXEz3mHZpOeBVryuq0cSupwgxLxfbzNn9FwjQzRDs,VK54VUNcV7DfDKupp7ugDojwtJNV-iPXwwV6OWLvnmM,AAMC--8/quick-beef-noodle-pho.pdf" "/tmp" "quick-beef-noodle-pho.pdf")
Progress: retrieved 0 out of 1 and 1 (false)
Progress: retrieved 0 out of 1 and 1 (false)
Progress: retrieved 1 out of 1 and 1 (false)
Progress: retrieved 1 out of 800 and 1608 (true)
#t

App

fcpapp
Usage: fcpapp cmd [options]
  retrieve URI destpath/file   : get a file
  insert path/file             : insert file
  insert path/file SSK         : insert file using SSK
  genssk                       : create an SSK

License

 Copyright (c) 2022, Matt Welland
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions
 are met:
 1. Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.
 2. Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution.
 3. The name of the authors may not be used to endorse or promote products
    derived from this software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
 IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Version history

Version 0.4

Version 0.2

Contents »