Giter Site home page Giter Site logo

pyfreenet's Introduction

README file for pyFreenet3

PyFreenet3 is a suite of command-line freenet applications, as well as a powerful Python library, for Freenet.

Contribute at https://github.com/freenet/pyFreenet

Install via::

$ pip3 install --upgrade --user pyFreenet3 (this requires python3 and python3-setuptools and python3-distutils installed)

To just upload a file into Freenet (currently only on GNU/Linux), install a Java JRE or JDK and then use::

$ fcpupload --spawn `

It starts a Freenet node, uploads the file and returns the key to access the file via Freenet.

If you need a library for Python 2, please use pyFreenet.

This pyFreenet3 release includes:

  • command-line freenet client applications, which will get installed as executable commands in your PATH, including:

    • freesitemgr - a simple yet flexible freesite management utility
    • fcpnames - utility for managing the new 'name service' layer
    • fproxyproxy - an experimental http proxy that sits on top of fproxy, and translates human-friendly site names transparently
    • fcpget - a single key fetcher
    • fcpput - a single key inserter
    • fcpupload - fcpput with more convenient defaults
    • fcpgenkey - a keypair generator
    • fcpinvertkey - generate new SSK/USK keypairs
    • fcpredirect - insert a redirect from one 'key' to another 'key'.
    • copyweb - download a page from a website with all resources.
  • python package 'fcp3' and 'freenet3', containing classes for interacting with freenet.

  • an XML-RPC server for freenet access, which can be run standalone, or easily integrated into an existing website

To get good API documentation, run::

$ epydoc -n "pyFreenet API manual" -o html fcp

When you install this package (refer INSTALL), you should end up with a command 'freesitemgr' on your PATH.

'freesitemgr' is a console-based freesite insertion utility which keeps your freesite configs and status in a single config file (~/.freesitemgr, unless you specify otherwise).

Just use 'freesitemgr add FOLDER' to upload a website into Freenet.

Invoke 'freesitemgr -h' (or if on windows, 'freesitemgr.py -h') and read the options.

release a new version::

python3 setup.py sdist; python3 -m twine upload dist/pyFreenet3-0.5.5.tar.gz

pyfreenet's People

Contributors

arnebab avatar bertm avatar blueyed avatar cacopatane avatar debbiedub avatar j16sdiz avatar mikebryant avatar nextgens avatar ratchet avatar soliloque avatar thynix avatar toad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyfreenet's Issues

freesitemgr: site is falsely marked as updated when it is not

I had an experience where my site was in the middle of inserting, I updated it and add it again, and the content listed in the config file was updated, but this content was not inserted because an insert was already active.

The result is that after I cancel the existing insert, freesitemgr refuses to begin another, because it finds no changes.

async parameter

If I try to do:

node = fcp3.FCPNode(host=fcpHost, verbosity=fcp3.DETAIL>
node.get(uri, async=True)

I get:
SyntaxError: invalid syntax

It seems to be that in Python 3 you can't use async as a parameter name.

datalength to be uploaded does not match the length reported to the node

$ freesitemgr update tests
insert:tests: site insert has completed
insert:tests: checking if a new insert is needed
insert:tests: Changes detected - updating...
The datalength of 13444 to be uploaded does not match the length reported to the node of 5267. This is a bug, please report it to the pyFreenet maintainer.

$ freesitemgr -V
This is /home/ubuntu2004/.local/bin/freesitemgr, version 0.3.4

$ pip3 install -U --user pyFreenet3
Requirement already up-to-date: pyFreenet3 in /home/ubuntu2004/.local/lib/python3.8/site-packages (0.5.5)

$ ls
activelink.png index.html style.css

$ file activelink.png
activelink.png: PNG image data, 108 x 36, 8-bit colormap, non-interlaced

$ file index.html
index.html: HTML document, ASCII text

$ file style.css
style.css: ASCII text

Files are not named properly.

When cloning the repo, and running git checkout 0.4.7, and then running python setup.py install --user, python will complain about not being able to find freesitemgr.py, as the file is instead named freesitemgr. This also happens to a bunch of other files. Please fix this.

Python 3 Support?

Would a pull request adding Python 3 support be accepted if it also caused support to be dropped for Python 2.6 and below? Keep in mind that the only Python 2.x line still supported is Python 2.7 (and support will be dropped in 2020).

I'd very much like to see this run under latest Python versions and I think it's possible with minor work, but I'd be hesitant to put that work in if the PR will just sit.

Poor capabilities for resuming jobs

Just noting the difficulty accessing jobs from a previous run of the client.

  • FCPNode.jobs is empty immediately after construction, and I see no way to wait for it to be filled other than sleeping or calling refreshPersistentRequests, which is nonintuitive given the documentation stating it is unneeded
  • there is no way to set a callback for jobs recovered from the server, which means that job information which is only passed to the callback function and never stored in the ticket is unavailable

I know the id of the job I am waiting for, so it would be reasonable to say node.jobs[id] = JobTicket(node, id, '', '') in advance, but I think this may create a race condition with the existing code.

Posted errors when attempted to mount freedisk

Recieved errors when I attempted to mount. I have compiled all the dependencies from source, and I currently run debian linux 64. I am completely lost at what could be causing it to fail. Any help would be greatly appreciated.
My output was:


"** WARNING! SSLCrypto module not installed
** Please refer to the INSTALL file within the PyFCP source package
Spawning freenetfs filesystem process...
Waiting for disk to come up...
** WARNING! SSLCrypto module not installed
** Please refer to the INSTALL file within the PyFCP source package
Creating freenetfs filesystem...
Freenetfs filesystem now alive...
Traceback (most recent call last):
File "./freedisk", line 903, in
main()
File "./freedisk", line 895, in main
print mgr.run()
File "./freedisk", line 114, in run
result = method(_self.args[1:]) or ""
File "./freedisk", line 255, in cmd_run
fs.run()
File "/home/anoduck/Sandbox/py-freenet/lib-pyFreenet/fcp/freenetfs.py", line 1675, in run
import _fuse
ImportError: No module named _fuse
^CTraceback (most recent call last):
File "./freedisk", line 903, in
main()
File "./freedisk", line 895, in main
print mgr.run()
File "./freedisk", line 114, in run
result = method(_self.args[1:]) or ""
File "./freedisk", line 191, in cmd_start
time.sleep(1)
KeyboardInterrupt"


๐Ÿ”š

Peers count

How can I get peer count properly? I tried using len(listpeers()) but it too slow

freesitemgr update site fails when another site cannot be found

When I do freesitemgr update site and there is another site whose directory is not availables, I get the following error message and the command fails:

Traceback (most recent call last):
  File "/usr/local/bin/freesitemgr", line 563, in <module>
    main()
  File "/usr/local/bin/freesitemgr", line 444, in main
    sitemgr = SiteMgr(*args, **opts)
  File "/usr/local/lib/python3.10/site-packages/fcp3/sitemgr.py", line 104, in __init__
    self.load()
  File "/usr/local/lib/python3.10/site-packages/fcp3/sitemgr.py", line 166, in load
    site = SiteState(
  File "/usr/local/lib/python3.10/site-packages/fcp3/sitemgr.py", line 503, in __init__
    raise Exception("Site %s, directory %s nonexistent" % (
Exception: Site t3, directory /home/debbiedub/test/t3 nonexistent

The problem is in pyFreenet-0.5.8 (freesitemgr 0.3.4).

WithReadDirectory and WantReadDirectory are used interchangably causing an exception which prevents -d --disc to work correctly.

https://github.com/freenet/pyFreenet/blob/a20a8cc0b92740503b8a16d90049f8b1ba4acd2a/fcp/put.py#L238

In node.py, put.py, sitemgr.py and upload.py the following key names are not consistent:

  • ddareq["WantReadDirectory"] in most files
  • ddareq["WantWriteDirectory"] in most files
  • DDAkey = (kw["Directory"], kw["WithReadDirectory"], kw["WithWriteDirectory"]) in fcp\node.py

Global constants should be used instead of plaintext strings for identifying key-value pairs. This would have prevented such a thing.

Dead key in setup.py, line 22

USK@9X7bw5HD2ufYvJuL3qAVsYZb3KbI9~FyRu68zsw5HVg,lhHkYYluqHi7BcW1UHoVAMcRX7E5FaZjWCOruTspwQQ,AQACAAE/pyfcp-api/0/ is not in Freenet anymore. This key is referenced in setup.py, line 22. Link to the file: https://github.com/freenet/pyFreenet/blame/master/setup.py

Can the key be reinserted, preferably using pyFreenet-api as the name of the freesite?

If I understand correctly, this freesite simply contain the directory created by epydoc -n "pyFreenet API manual" -o html fcp? If the private key doesn't exist anymore, I'll simply regenerate the documentation and insert it along with a more complete freesite for pyFreenet.

Thanx.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.