f git
This commit is contained in:
parent
bf229026aa
commit
52c59de768
BIN
addtoDB.pyc
Normal file
BIN
addtoDB.pyc
Normal file
Binary file not shown.
10
carousel.py
Normal file → Executable file
10
carousel.py
Normal file → Executable file
@ -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
Normal file
4
config.txt
Normal file
@ -0,0 +1,4 @@
|
||||
[ebb-config]
|
||||
imagesPath = /home/pi/images/
|
||||
dbPath = /home/pi/posts.json
|
||||
ssbme = @0KQ9D7Sbkg4F6qBBg90/CRT5K1wW/b2mWwl4GJWd6MA=.ed25519
|
BIN
epd4in2.pyc
Normal file
BIN
epd4in2.pyc
Normal file
Binary file not shown.
BIN
epdconfig.pyc
Normal file
BIN
epdconfig.pyc
Normal file
Binary file not shown.
@ -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
Normal file
BIN
iterparse.pyc
Normal file
Binary file not shown.
@ -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
Normal file
BIN
refreshdb.pyc
Normal file
Binary file not shown.
@ -1,6 +1,5 @@
|
||||
#!/bin/bash
|
||||
while true; do
|
||||
ssb-server start
|
||||
ssb-server start --friends.hops 1
|
||||
sleep 300
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user