<commit_before>#! /usr/bin/env python 
import sys
import socket
import os
import SimpleXMLRPCServer
import gobject
from wizbit import ServicePublisher, ServiceBrowser

WIZBIT_SERVER_PORT = 3492

from wizbit import Shares, Directory
from wizbit import *

class WizbitServer():
	def getShares(self):
		shares = Shares.getShares()
		return ["%s %s %s" % (id, shrId, directory) for (id, shrId, directory) in shares]
	
	def getPath(self, uuid):
		shares = Shares.getShares()
		for id, shareId, directory in shares:
			if uuid == id:
				break
		return directory

	def getLastConfSeen(self, uuid):
		return "Not Implemented"

	def setConf(self, uuid, confstring):
		return "Not Implemented"

	def getConf(self, uuid):
		shares = Shares.getShares()
		for id, shareId, directory in shares:
			if uuid == id:
				break
		wizpath = Paths(directory)
		file = open(wizpath.getWizconf(), "r")
		conf = file.read()
		file.close()
		return conf

	def pushNotify(self, dirId, remoteShareId, host):
		#For every local directory with the same shareId, pull <commit_msg>getShares rpc call now just returns the whole shares list.<commit_after>#! /usr/bin/env python 
import sys
import socket
import os
import SimpleXMLRPCServer
import gobject
from wizbit import ServicePublisher, ServiceBrowser

WIZBIT_SERVER_PORT = 3492

from wizbit import Shares, Directory
from wizbit import *

class WizbitServer():
	def getShares(self):
		shares = Shares.getShares()
		return shares
	
	def getPath(self, uuid):
		shares = Shares.getShares()
		for id, shareId, directory in shares:
			if uuid == id:
				break
		return directory

	def getLastConfSeen(self, uuid):
		return "Not Implemented"

	def setConf(self, uuid, confstring):
		return "Not Implemented"

	def getConf(self, uuid):
		shares = Shares.getShares()
		for id, shareId, directory in shares:
			if uuid == id:
				break
		wizpath = Paths(directory)
		file = open(wizpath.getWizconf(), "r")
		conf = file.read()
		file.close()
		return conf

	def pushNotify(self, dirId, remoteShareId, host):
		#For every local directory with the same shareId, pull 
{'fraction_non_alphanumeric': 0.09475709475709476, 'fraction_numerical': 0.003848003848003848, 'mean_word_length': 4.319693094629156, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '598067', 'n_tokens_mistral': 762, 'n_tokens_neox': 699, 'n_words': 230}