diff --git a/bitmessage/installfiles/keys.dat b/bitmessage/installfiles/keys.dat index ee6b7aa..3aee711 100644 --- a/bitmessage/installfiles/keys.dat +++ b/bitmessage/installfiles/keys.dat @@ -43,11 +43,11 @@ apiusername = username apipassword = password daemon = true -[BM-2cXExRht8eiB7anRv8Rc3TvSTm4GcJ2Txx] +[BM-2cUtm3XCJ9tpa3TTVLuoiqSmU2onc8Y4LX] label = FreeJournal Main Channel enabled = true decoy = false noncetrialsperbyte = 1000 payloadlengthextrabytes = 1000 -privsigningkey = 5J3WLPnGPcKxsx8Vk24WH4VLzaEZ3xLTCjsc1xaha9HdZPbgWbT -privencryptionkey = 5KbHD145pnNGcTnZ3kSL3RzHxc3zoUuBWLS8Z51w1dRkj9JVWZf \ No newline at end of file +privsigningkey = 5JpM4gp7Geaectw3tSzfJftKSAENCi7a2hB3HuXVDSwPNekTWh8 +privencryptionkey = 5JTi7gTKMJ6Qgoh47j9fPEWTqcdTBxhXLa3p7Y9DRtNXshNLaib \ No newline at end of file diff --git a/config.py b/config.py index 7f2c955..0108513 100644 --- a/config.py +++ b/config.py @@ -25,7 +25,7 @@ ''' Don't change this unless the main channel address is changed in the future ''' -MAIN_CHANNEL_ADDRESS = "BM-2cXExRht8eiB7anRv8Rc3TvSTm4GcJ2Txx" +MAIN_CHANNEL_ADDRESS = "BM-2cUtm3XCJ9tpa3TTVLuoiqSmU2onc8Y4LX" ''' Directory to store documents that are downloaded (Make sure to keep the last '/' at the end of the path)''' diff --git a/controllers/collections.py b/controllers/collections.py index 1c8fe32..9c0df09 100644 --- a/controllers/collections.py +++ b/controllers/collections.py @@ -92,6 +92,5 @@ def update_hash(collection): return collection_hash = CollectionVersion(root_hash=root_hash, document_ids = string, collection_version = collection.get_latest_version()+1, collection_address = collection.address) - session.add(collection_hash) collection.version_list.append(collection_hash) session.commit() diff --git a/freenet/FreenetConnection.py b/freenet/FreenetConnection.py index 8b0c2d4..2b459f7 100755 --- a/freenet/FreenetConnection.py +++ b/freenet/FreenetConnection.py @@ -13,7 +13,9 @@ def __init__(self): ''' def put(self,data): uri = self.fcpNode.put(data=data, mimetype="text/plain", chkonly=True) - job = self.fcpNode.put(data=data, mimetype="text/plain", async=True) + print("Inserting " + str(uri)) + print("Please wait for insert to finish before publishing collection") + job = self.fcpNode.put(data=data, mimetype="text/plain", async=False) return uri ''' diff --git a/frontend/cli/commands.py b/frontend/cli/commands.py index 7481300..b2da518 100755 --- a/frontend/cli/commands.py +++ b/frontend/cli/commands.py @@ -62,8 +62,7 @@ def print_help(): print ("\tlisten") print ("\tinstall [freenet|bitmessage|all]") print ("\tshowcollection [index bitmessage ID]") - print ("\tputcollection [address password] [title] [description] [keywords] " \ - + "[Bitcoin address (for rating)]") + print ("\tputcollection [address password] [title] [description] [keywords] ") print ("\tpublishcollection [address password] [index bitmessage ID]") print ("\twebapp") print ("\tuploader") @@ -143,7 +142,7 @@ def list_collection_version(collection_address, document_ids): print("Collection Versions for " + collection_address + ":" ) print ("\t" + "Root hash" + "\t\t\t\t\t\t\t\t" + "Collection Version") else: - print("Collection not found") + print("Collection is empty") for version in versions: print("\t" + version.root_hash + "\t" + str(version.collection_version)) if(document_ids == 'documents'): @@ -198,10 +197,8 @@ def put_document(file_path, collection_address, title, description): cache.insert_new_document(document) collection = cache.get_collection_with_address(collection_address) collections.update_hash(collection) - print ("Inserted " + file_path + " successfully with URI " + uri) - print ("Allow up to 10 minutes for file to propogate on the freenet network") -def put_collection(address_password, title, description, keywords, btc): +def put_collection(address_password, title, description, keywords): """ Create a collection in local cache :param address_password: The password with which to protect the collection. Should be at least 20 characters for optimal security and unique. Generates @@ -229,7 +226,7 @@ def put_collection(address_password, title, description, keywords, btc): address=address, accesses=0, votes=0, - btc=btc, + btc="btc", keywords=keywords, documents=[], creation_date=datetime.datetime.now(), @@ -309,10 +306,10 @@ def process_command(command): if (validate_cli_arguments(3)): install_dependencies(sys.argv[2]) elif command == 'putcollection': - if (validate_cli_arguments(7)): + if (validate_cli_arguments(6)): put_collection(sys.argv[2], \ sys.argv[3], sys.argv[4], \ - sys.argv[5], sys.argv[6]) + sys.argv[5]) elif command == 'publishcollection': if (validate_cli_arguments(4)): publish_collection(sys.argv[2], sys.argv[3])