<commit_before>#!/usr/bin/python

"""
TODO:
[X] cardmap, read remote, update local
[X] if new card scanned, create desc, update both local and global cardmap, send message to ws server
[X] when item updated on web, update list.xml

[ ] copy remote item to local when required
[X] refactor read_items, just read the global list, if available, then check what is local
[x] verify that the local copy matches the remote (check copying errors)
[.] updates from browser should be broadcast to other clients (or all clients and browser should recognize it as confirmation)
[x] show current status (playing...), show if remote is available on web client
[x] show local/remote status for files in browser
[X] update last seen data
[ ] show last_seen value from player.db on the main table
"""

import multiprocessing
#from multiprocessing.managers import BaseManager
import xml.etree.ElementTree as ET
import logging
from keyinput import KeyListener
from player import Player
from volume import VolumeControl
from led import LedControl
from reader import RfidReader
from http_server import HttpServer
from ws_server import WebSocketServer
from power_switch import PowerSwitch
import os, time, sys, copy
import sqlite3
import json

class State:
    playing = 1
    stopped = 2

class Dispatcher:

    def __init__(self, list_file = 'list.xml', local_dir = '../data/', remote_dir = '/mnt/z/Audio/_audio_books/_pi'):
        self.list_file = list_file
        self.local_dir = local_dir<commit_msg>Changed network path<commit_after>#!/usr/bin/python

"""
TODO:
[X] cardmap, read remote, update local
[X] if new card scanned, create desc, update both local and global cardmap, send message to ws server
[X] when item updated on web, update list.xml

[ ] copy remote item to local when required
[X] refactor read_items, just read the global list, if available, then check what is local
[x] verify that the local copy matches the remote (check copying errors)
[.] updates from browser should be broadcast to other clients (or all clients and browser should recognize it as confirmation)
[x] show current status (playing...), show if remote is available on web client
[x] show local/remote status for files in browser
[X] update last seen data
[ ] show last_seen value from player.db on the main table
"""

import multiprocessing
#from multiprocessing.managers import BaseManager
import xml.etree.ElementTree as ET
import logging
from keyinput import KeyListener
from player import Player
from volume import VolumeControl
from led import LedControl
from reader import RfidReader
from http_server import HttpServer
from ws_server import WebSocketServer
from power_switch import PowerSwitch
import os, time, sys, copy
import sqlite3
import json

class State:
    playing = 1
    stopped = 2

class Dispatcher:

    def __init__(self, list_file = 'list.xml', local_dir = '../data/', remote_dir = '/mnt/z/_pi'):
        self.list_file = list_file
        self.local_dir = local_dir
{'fraction_non_alphanumeric': 0.06684672518568535, 'fraction_numerical': 0.002025658338960162, 'mean_word_length': 4.538317757009346, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '6736134', 'n_tokens_mistral': 819, 'n_tokens_neox': 798, 'n_words': 391}