Browse Source

f git

master
trav 3 months ago
parent
commit
52c59de768
  1. BIN
      addtoDB.pyc
  2. 10
      carousel.py
  3. 4
      config.txt
  4. BIN
      epd4in2.pyc
  5. BIN
      epdconfig.pyc
  6. 2
      install/configDEFAULT.txt
  7. BIN
      iterparse.pyc
  8. 2
      refreshdb.py
  9. BIN
      refreshdb.pyc
  10. 3
      run-ssb.sh

BIN
addtoDB.pyc

10
carousel.py

@ -31,7 +31,7 @@ intervalTime = 1800
syncTime = 3600
#keep track of where we are moving through intervalTime, syncTime and where we are in the db, and what flier we're currently displaying
timeIndex = 1200
syncIndex = 0
syncIndex = 3550
dbIndex = 1
flierPath = "noneyet"
button_flag = "null"
@ -54,13 +54,13 @@ print dbCount
#initialize display and display boot image
#grab the entry at dbIndex, newFlier is a dict
newFlier = db.get(doc_id=dbIndex)
flierPath = newFlier["path"]
flierPath = "/home/pi/images/" + newFlier["path"]
Limage = Image.new('1', (epd4in2.EPD_HEIGHT, epd4in2.EPD_WIDTH), 255) # 255: clear the frame
try:
font36 = ImageFont.truetype('/usr/share/fonts/truetype/wqy/wqy-microhei.ttc', 36)
font18 = ImageFont.truetype('/usr/share/fonts/truetype/wqy/wqy-microhei.ttc', 36)
epd = epd4in2.EPD()
epd.init()
bmp = Image.open(flierPath)
bmp = Image.open(str(flierPath))
Limage.paste(bmp)
draw = ImageDraw.Draw(Limage)
draw.text((2, 240), 'EBB', font = font18, fill = 255)
@ -106,6 +106,8 @@ def button_e(button, pressed):
button_flag = "button_5"
buttonshim.set_pixel(0x00, 0x00, 0x00)
## MAIN LOOP ##
while True:
# chill for a bit, keep track of how long we're chilling

4
config.txt

@ -0,0 +1,4 @@
[ebb-config]
imagesPath = /home/pi/images/
dbPath = /home/pi/posts.json
ssbme = @0KQ9D7Sbkg4F6qBBg90/CRT5K1wW/b2mWwl4GJWd6MA=.ed25519

BIN
epd4in2.pyc

BIN
epdconfig.pyc

2
install/configDEFAULT.txt

@ -1,4 +1,4 @@
[ebb-config]
imagesPath = /home/pi/images/
dbPath = /home/pi/posts.json
ssbme = @b4zcVEqkDe8avvbZ202EO4roYntH9d/Qd7jUzpEQ044=.ed25519
ssbme = @0KQ9D7Sbkg4F6qBBg90/CRT5K1wW/b2mWwl4GJWd6MA=.ed25519

BIN
iterparse.pyc

2
refreshdb.py

@ -37,7 +37,7 @@ def fresh():
#if last run is never ran then only look back 1 month (new installs don't need EVERY old post...)
if last_run==4:
whatever=time.time()
whaever-=2700000
whatever-=2700000
last_run=int(whatever)
newssb="nada"

BIN
refreshdb.pyc

3
run-ssb.sh

@ -1,6 +1,5 @@
#!/bin/bash
while true; do
ssb-server start
ssb-server start --friends.hops 1
sleep 300
done
Loading…
Cancel
Save