Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
cleanup notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
txoof committed Oct 10, 2020
1 parent 011ef58 commit 23c419c
Showing 1 changed file with 227 additions and 4 deletions.
231 changes: 227 additions & 4 deletions slimpi.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 45,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[NbConvertApp] Converting notebook slimpi.ipynb to python\n",
"[NbConvertApp] Writing 17947 bytes to slimpi.py\n"
"[NbConvertApp] Writing 19059 bytes to slimpi.py\n"
]
}
],
Expand Down Expand Up @@ -568,7 +568,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 43,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -984,7 +984,230 @@
"16:20:31 Layout:_set_images:350:INFO - set text block: app_name\n",
"16:20:31 Block:__init__:350:INFO - TextBlock created\n",
"16:20:31 Block:maxchar:439:DEBUG - no maxchar set\n",
"16:20:31 Block:font:409:DEBUG - setting old_font = None\n"
"16:20:31 Block:font:409:DEBUG - setting old_font = None\n",
"16:20:31 Block:_calc_maxchar:463:DEBUG - calculating maximum characters for font ('Anton', 'Regular')\n",
"16:20:32 Block:_calc_maxchar:477:DEBUG - maximum characters per line: 7\n",
"16:20:32 Block:_text_formatter:499:DEBUG - formatting string: .\n",
"16:20:32 Block:_text_formatter:502:DEBUG - formatted list:\n",
" ['.']\n",
"16:20:32 Block:_text2image:513:DEBUG - creating blank image area: (600, 269) with inverse: False\n",
"16:20:32 Block:_text2image:528:DEBUG - line size: 40, 201\n",
"16:20:32 Block:_text2image:532:DEBUG - max x dim so far: 40\n",
"16:20:32 Block:_text2image:536:DEBUG - dimensions of text portion of image: (40, 201)\n",
"16:20:32 Block:_text2image:544:DEBUG - hcenter line: .\n",
"16:20:32 Block:_text2image:546:DEBUG - drawing text at 0, 0\n",
"16:20:32 Block:_text2image:547:DEBUG - with dimensions: 40, 201\n",
"16:20:32 Block:_text2image:573:DEBUG - pasting text portion at coordinates: 280, 34\n",
"16:20:32 Layout:_set_images:346:DEBUG - ***version***)\n",
"16:20:32 Layout:_set_images:350:INFO - set text block: version\n",
"16:20:32 Block:__init__:350:INFO - TextBlock created\n",
"16:20:32 Block:font:409:DEBUG - setting old_font = None\n",
"16:20:32 Block:_calc_maxchar:463:DEBUG - calculating maximum characters for font ('Dosis', 'SemiBold')\n",
"16:20:32 Block:_calc_maxchar:477:DEBUG - maximum characters per line: 39\n",
"16:20:32 Block:_text_formatter:499:DEBUG - formatting string: .\n",
"16:20:32 Block:_text_formatter:502:DEBUG - formatted list:\n",
" ['.']\n",
"16:20:32 Block:_text2image:513:DEBUG - creating blank image area: (600, 45) with inverse: False\n",
"16:20:32 Block:_text2image:528:DEBUG - line size: 6, 33\n",
"16:20:32 Block:_text2image:532:DEBUG - max x dim so far: 6\n",
"16:20:32 Block:_text2image:536:DEBUG - dimensions of text portion of image: (6, 33)\n",
"16:20:32 Block:_text2image:544:DEBUG - hcenter line: .\n",
"16:20:32 Block:_text2image:546:DEBUG - drawing text at 0, 0\n",
"16:20:32 Block:_text2image:547:DEBUG - with dimensions: 6, 33\n",
"16:20:32 Block:_text2image:573:DEBUG - pasting text portion at coordinates: 297, 6\n",
"16:20:32 Layout:_set_images:346:DEBUG - ***url***)\n",
"16:20:32 Layout:_set_images:350:INFO - set text block: url\n",
"16:20:32 Block:__init__:350:INFO - TextBlock created\n",
"16:20:32 Block:font:409:DEBUG - setting old_font = None\n",
"16:20:32 Block:_calc_maxchar:463:DEBUG - calculating maximum characters for font ('Dosis', 'SemiBold')\n",
"16:20:33 Block:_calc_maxchar:477:DEBUG - maximum characters per line: 26\n",
"16:20:33 Block:_text_formatter:499:DEBUG - formatting string: .\n",
"16:20:33 Block:_text_formatter:502:DEBUG - formatted list:\n",
" ['.']\n",
"16:20:33 Block:_text2image:513:DEBUG - creating blank image area: (600, 134) with inverse: False\n",
"16:20:33 Block:_text2image:528:DEBUG - line size: 9, 50\n",
"16:20:33 Block:_text2image:532:DEBUG - max x dim so far: 9\n",
"16:20:33 Block:_text2image:536:DEBUG - dimensions of text portion of image: (9, 50)\n",
"16:20:33 Block:_text2image:544:DEBUG - hcenter line: .\n",
"16:20:33 Block:_text2image:546:DEBUG - drawing text at 0, 0\n",
"16:20:33 Block:_text2image:547:DEBUG - with dimensions: 9, 50\n",
"16:20:33 Block:_text2image:573:DEBUG - pasting text portion at coordinates: 296, 42\n",
"16:20:33 Layout:update_contents:401:INFO - updating blocks\n",
"16:20:33 Layout:update_contents:407:DEBUG - updating block: app_name\n",
"16:20:33 Block:_text_formatter:499:DEBUG - formatting string: slimpi\n",
"16:20:33 Block:_text_formatter:502:DEBUG - formatted list:\n",
" ['slimpi']\n",
"16:20:33 Block:_text2image:513:DEBUG - creating blank image area: (600, 269) with inverse: False\n",
"16:20:33 Block:_text2image:528:DEBUG - line size: 435, 226\n",
"16:20:33 Block:_text2image:532:DEBUG - max x dim so far: 435\n",
"16:20:33 Block:_text2image:536:DEBUG - dimensions of text portion of image: (435, 226)\n",
"16:20:33 Block:_text2image:544:DEBUG - hcenter line: slimpi\n",
"16:20:33 Block:_text2image:546:DEBUG - drawing text at 0, 0\n",
"16:20:33 Block:_text2image:547:DEBUG - with dimensions: 435, 226\n",
"16:20:33 Block:_text2image:573:DEBUG - pasting text portion at coordinates: 82, 22\n",
"16:20:33 Layout:update_contents:407:DEBUG - updating block: version\n",
"16:20:33 Block:_text_formatter:499:DEBUG - formatting string: version: 0.4.08\n",
"16:20:33 Block:_text_formatter:502:DEBUG - formatted list:\n",
" ['version: 0.4.08']\n",
"16:20:33 Block:_text2image:513:DEBUG - creating blank image area: (600, 45) with inverse: False\n",
"16:20:33 Block:_text2image:528:DEBUG - line size: 186, 33\n",
"16:20:33 Block:_text2image:532:DEBUG - max x dim so far: 186\n",
"16:20:33 Block:_text2image:536:DEBUG - dimensions of text portion of image: (186, 33)\n",
"16:20:33 Block:_text2image:544:DEBUG - hcenter line: version: 0.4.08\n",
"16:20:33 Block:_text2image:546:DEBUG - drawing text at 0, 0\n",
"16:20:33 Block:_text2image:547:DEBUG - with dimensions: 186, 33\n",
"16:20:33 Block:_text2image:573:DEBUG - pasting text portion at coordinates: 207, 6\n",
"16:20:33 Layout:update_contents:407:DEBUG - updating block: url\n",
"16:20:33 Block:_text_formatter:499:DEBUG - formatting string: https://github.com/txoof/slimpi_epd\n",
"16:20:33 Block:_text_formatter:502:DEBUG - formatted list:\n",
" ['https://github.com/txoof/s', 'limpi_epd']\n",
"16:20:33 Block:_text2image:513:DEBUG - creating blank image area: (600, 134) with inverse: False\n",
"16:20:33 Block:_text2image:528:DEBUG - line size: 532, 61\n",
"16:20:33 Block:_text2image:532:DEBUG - max x dim so far: 532\n",
"16:20:33 Block:_text2image:528:DEBUG - line size: 179, 61\n",
"16:20:33 Block:_text2image:536:DEBUG - dimensions of text portion of image: (532, 122)\n",
"16:20:33 Block:_text2image:544:DEBUG - hcenter line: https://github.com/txoof/s\n",
"16:20:33 Block:_text2image:546:DEBUG - drawing text at 0, 0\n",
"16:20:33 Block:_text2image:547:DEBUG - with dimensions: 532, 61\n",
"16:20:33 Block:_text2image:544:DEBUG - hcenter line: limpi_epd\n",
"16:20:33 Block:_text2image:546:DEBUG - drawing text at 176, 61\n",
"16:20:33 Block:_text2image:547:DEBUG - with dimensions: 179, 61\n",
"16:20:33 Block:_text2image:573:DEBUG - pasting text portion at coordinates: 34, 6\n",
"16:20:33 <ipython-input-41-dca1d1af6826>:main:281:DEBUG - refresh display\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"16:20:34 epd5in83:ReadBusy:69:DEBUG - e-Paper busy\n",
"16:20:34 epd5in83:ReadBusy:72:DEBUG - e-Paper busy release\n",
"16:20:34 Screen:initEPD:330:INFO - <waveshare_epd.epd5in83.EPD object at 0xafebcdb0> initialized\n",
"16:20:34 Layout:concat:425:DEBUG - concating blocks into single image\n",
"16:20:34 Layout:concat:427:DEBUG - pasitng **app_name** image at: (0, 0)\n",
"16:20:34 Layout:concat:427:DEBUG - pasitng **version** image at: (0, 269)\n",
"16:20:34 Layout:concat:427:DEBUG - pasitng **url** image at: (0, 314)\n",
"16:20:34 Screen:writeEPD:368:DEBUG - writing to epd\n",
"16:20:34 epd5in83:getbuffer:128:DEBUG - imwidth = 600 imheight = 448 \n",
"16:20:42 epd5in83:ReadBusy:69:DEBUG - e-Paper busy\n",
"16:20:46 epd5in83:ReadBusy:72:DEBUG - e-Paper busy release\n",
"16:20:46 epd5in83:ReadBusy:69:DEBUG - e-Paper busy\n",
"16:20:46 epd5in83:ReadBusy:72:DEBUG - e-Paper busy release\n",
"16:20:46 <ipython-input-41-dca1d1af6826>:main:288:INFO - 10 start up attempts reamain\n",
"16:20:46 <ipython-input-41-dca1d1af6826>:main:289:INFO - setting up LMS query connection\n",
"16:20:46 lmsquery:scanLMS:165:DEBUG - searching for servers for 5 seconds\n",
"16:20:51 lmsquery:host:122:DEBUG - setting LMS Server to first found: 192.168.178.9\n",
"16:20:51 lmsquery:player_name:98:DEBUG - found player \"kitchenpi\" on server: 192.168.178.9\n",
"16:20:51 <ipython-input-41-dca1d1af6826>:main:306:INFO - startup complete\n",
"16:20:51 cacheart:app_name:33:DEBUG - setting cache path: com.txoof.slimpi\n",
"16:20:51 cacheart:app_name:36:DEBUG - setting permissions to 777 on cache path /tmp/com.txoof.slimpi\n",
"16:20:51 cacheart:app_name:39:WARNING - could not change permission of /tmp/com.txoof.slimpi to 0x777\n",
"16:20:51 cacheart:app_name:40:WARNING - cache path /tmp/com.txoof.slimpi is owned by userid 999\n",
"16:20:51 <ipython-input-41-dca1d1af6826>:main:327:DEBUG - not collecting screenshots\n",
"16:20:51 <ipython-input-41-dca1d1af6826>:main:342:DEBUG - query lms server for status of player kitchenpi: 00:00:00:00:00:00\n",
"16:20:51 <ipython-input-41-dca1d1af6826>:main:370:INFO - track/mode change detected\n",
"16:20:51 <ipython-input-41-dca1d1af6826>:main:376:DEBUG - attempting to download artwork\n",
"16:20:51 cacheart:cache_artwork:51:DEBUG - attempting to cache artwork\n",
"16:20:51 cacheart:cache_artwork:65:DEBUG - artwork url: http://192.168.178.9:9000/music/0/cover.jpg\n",
"16:20:51 cacheart:cache_artwork:71:DEBUG - writing artwork file: /tmp/com.txoof.slimpi/2144.jpg\n",
"16:20:51 cacheart:cache_artwork:75:DEBUG - wrote ablum artwork to: /tmp/com.txoof.slimpi/2144.jpg\n",
"16:20:51 Layout:update_contents:401:INFO - updating blocks\n",
"16:20:51 Layout:update_contents:410:DEBUG - ignoring block id\n",
"16:20:51 Layout:update_contents:407:DEBUG - updating block: title\n",
"16:20:51 Block:_text_formatter:499:DEBUG - formatting string: What Did Voters Think Of The Vice Presidential Debate?\n",
"16:20:51 Block:_text_formatter:502:DEBUG - formatted list:\n",
" ['What Did', 'Voters Think…']\n",
"16:20:51 Block:_text2image:513:DEBUG - creating blank image area: (600, 299) with inverse: False\n",
"16:20:51 Block:_text2image:528:DEBUG - line size: 340, 113\n",
"16:20:51 Block:_text2image:532:DEBUG - max x dim so far: 340\n",
"16:20:51 Block:_text2image:528:DEBUG - line size: 555, 113\n",
"16:20:51 Block:_text2image:532:DEBUG - max x dim so far: 555\n",
"16:20:51 Block:_text2image:536:DEBUG - dimensions of text portion of image: (555, 226)\n",
"16:20:51 Block:_text2image:544:DEBUG - hcenter line: What Did\n",
"16:20:51 Block:_text2image:546:DEBUG - drawing text at 108, 0\n",
"16:20:51 Block:_text2image:547:DEBUG - with dimensions: 340, 113\n",
"16:20:51 Block:_text2image:544:DEBUG - hcenter line: Voters Think…\n",
"16:20:51 Block:_text2image:546:DEBUG - drawing text at 0, 113\n",
"16:20:51 Block:_text2image:547:DEBUG - with dimensions: 555, 113\n",
"16:20:51 Block:_text2image:573:DEBUG - pasting text portion at coordinates: 22, 36\n",
"16:20:51 Layout:update_contents:407:DEBUG - updating block: artist\n",
"16:20:51 Block:_text_formatter:499:DEBUG - formatting string: NPR\n",
"16:20:51 Block:_text_formatter:502:DEBUG - formatted list:\n",
" ['NPR']\n",
"16:20:51 Block:_text2image:513:DEBUG - creating blank image area: (360, 75) with inverse: False\n",
"16:20:51 Block:_text2image:528:DEBUG - line size: 34, 28\n",
"16:20:51 Block:_text2image:532:DEBUG - max x dim so far: 34\n",
"16:20:51 Block:_text2image:536:DEBUG - dimensions of text portion of image: (34, 28)\n",
"16:20:51 Block:_text2image:546:DEBUG - drawing text at 0, 0\n",
"16:20:51 Block:_text2image:547:DEBUG - with dimensions: 34, 28\n",
"16:20:51 Block:_text2image:573:DEBUG - pasting text portion at coordinates: 0, 24\n",
"16:20:51 Layout:update_contents:410:DEBUG - ignoring block duration\n",
"16:20:51 Layout:update_contents:410:DEBUG - ignoring block album_id\n",
"16:20:51 Layout:update_contents:410:DEBUG - ignoring block genre\n",
"16:20:51 Layout:update_contents:407:DEBUG - updating block: album\n",
"16:20:51 Block:_text_formatter:499:DEBUG - formatting string: Morning Edition : NPR\n",
"16:20:51 Block:_text_formatter:502:DEBUG - formatted list:\n",
" ['Morning Edition : NPR']\n",
"16:20:51 Block:_text2image:513:DEBUG - creating blank image area: (360, 50) with inverse: False\n",
"16:20:51 Block:_text2image:528:DEBUG - line size: 126, 20\n",
"16:20:51 Block:_text2image:532:DEBUG - max x dim so far: 126\n",
"16:20:51 Block:_text2image:536:DEBUG - dimensions of text portion of image: (126, 20)\n",
"16:20:51 Block:_text2image:546:DEBUG - drawing text at 0, 0\n",
"16:20:51 Block:_text2image:547:DEBUG - with dimensions: 126, 20\n",
"16:20:51 Block:_text2image:573:DEBUG - pasting text portion at coordinates: 0, 15\n",
"16:20:52 Layout:update_contents:410:DEBUG - ignoring block artwork_url\n",
"16:20:52 Layout:update_contents:410:DEBUG - ignoring block time\n",
"16:20:52 Layout:update_contents:407:DEBUG - updating block: mode\n",
"16:20:52 Block:_text_formatter:499:DEBUG - formatting string: pause\n",
"16:20:52 Block:_text_formatter:502:DEBUG - formatted list:\n",
" ['pause']\n",
"16:20:52 Block:_text2image:513:DEBUG - creating blank image area: (360, 25) with inverse: False\n",
"16:20:52 Block:_text2image:528:DEBUG - line size: 36, 20\n",
"16:20:52 Block:_text2image:532:DEBUG - max x dim so far: 36\n",
"16:20:52 Block:_text2image:536:DEBUG - dimensions of text portion of image: (36, 20)\n",
"16:20:52 Block:_text2image:546:DEBUG - drawing text at 0, 0\n",
"16:20:52 Block:_text2image:547:DEBUG - with dimensions: 36, 20\n",
"16:20:52 Block:_text2image:557:DEBUG - randomly positioning text within area\n",
"16:20:52 Block:_text2image:573:DEBUG - pasting text portion at coordinates: 78, 0\n",
"16:20:52 Layout:update_contents:407:DEBUG - updating block: coverart\n",
"16:20:52 Block:image:638:DEBUG - block area: (240, 149)\n",
"16:20:52 Block:image:646:DEBUG - max dimension of thumbnail: 145\n",
"16:20:52 Block:image:650:DEBUG - using image file: /tmp/com.txoof.slimpi/2144.jpg\n",
"16:20:52 Block:image:653:DEBUG - creating thumbnail of image to fit in min dimension : 145\n",
"16:20:52 Block:image:669:DEBUG - final dimensions of resized image: (145, 145)\n",
"16:20:52 Block:image:674:DEBUG - starting with x: 2, y: 2\n",
"16:20:52 Block:image:687:DEBUG - h-center image\n",
"16:20:52 Block:image:690:DEBUG - v-center image\n",
"16:20:52 Block:image:695:DEBUG - pasting image into area at 48, 2\n",
"16:20:52 <ipython-input-41-dca1d1af6826>:main:405:INFO - refresh display\n",
"16:20:52 epd5in83:ReadBusy:69:DEBUG - e-Paper busy\n",
"16:20:52 epd5in83:ReadBusy:72:DEBUG - e-Paper busy release\n",
"16:20:52 Screen:initEPD:330:INFO - <waveshare_epd.epd5in83.EPD object at 0xafebcdb0> initialized\n",
"16:20:52 Layout:concat:425:DEBUG - concating blocks into single image\n",
"16:20:52 Layout:concat:427:DEBUG - pasitng **title** image at: (0, 0)\n",
"16:20:52 Layout:concat:427:DEBUG - pasitng **coverart** image at: (0, 299)\n",
"16:20:52 Layout:concat:427:DEBUG - pasitng **artist** image at: (240, 299)\n",
"16:20:52 Layout:concat:427:DEBUG - pasitng **album** image at: (240, 374)\n",
"16:20:52 Layout:concat:427:DEBUG - pasitng **mode** image at: (240, 424)\n",
"16:20:52 Screen:writeEPD:368:DEBUG - writing to epd\n",
"16:20:52 epd5in83:getbuffer:128:DEBUG - imwidth = 600 imheight = 448 \n",
"16:21:01 epd5in83:ReadBusy:69:DEBUG - e-Paper busy\n",
"16:21:04 epd5in83:ReadBusy:72:DEBUG - e-Paper busy release\n",
"16:21:04 epd5in83:ReadBusy:69:DEBUG - e-Paper busy\n",
"16:21:04 epd5in83:ReadBusy:72:DEBUG - e-Paper busy release\n",
"Received exit signal - cleaning up\n",
"16:21:05 epd5in83:ReadBusy:69:DEBUG - e-Paper busy\n",
"16:21:05 epd5in83:ReadBusy:72:DEBUG - e-Paper busy release\n",
"16:21:05 Screen:initEPD:330:INFO - <waveshare_epd.epd5in83.EPD object at 0xafebcdb0> initialized\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"16:21:21 epd5in83:ReadBusy:69:DEBUG - e-Paper busy\n",
"16:21:21 epd5in83:ReadBusy:72:DEBUG - e-Paper busy release\n",
"16:21:21 cacheart:clear_cache:91:DEBUG - clearing previously downloaded files in /tmp/com.txoof.slimpi\n"
]
}
],
Expand Down

0 comments on commit 23c419c

Please sign in to comment.