Urge to hack, rising

Hi folks,

It has been about 4 years since my last contribution of code to SuttaCentral. It is nice to see that things are moving along and that we still have @blake and @Vimala improving the site. As for myself, I’ve been back at Bodhinyana for well over a year now after spending about 18 months in Sri Lanka and Wat Buddha Dhamma. I now work as the secretary and guest monk but as I am so efficacious there are usually a few hours free each week. Add to that an afternoon or two and I think I would have time make a difference with Sutta Central.

As for my working environment, we are hooked up to the NBN “Sky Muster” satellite now and, while latency is high, our download and upload speed are actually pretty good at 25Mbits down and 5Mbits up. Also, I have a raspberry pi now and use it as a headless server. With PuTTy and WinSCP I can turn any windows computer on the LAN into a development PC.

I’ve spoken to Ajahn Brahm about this and he’s fine with me spending a bit of time this way. Right now I need to sort out Issue #203 and I think I’m on my way.

With metta,

J.R.

6 Likes

If JR is back, not all is lost with the world. :pray:

Such wonderful news, I hope you have some fun.

When you’re set up, have a poke around and see what you might be interested in. Our big project now is to rebuild the whole site in polymer, which means recoding a heck-ton of stuff.

https://www.polymer-project.org/

Blake’s doing the back end work, making a REST API. Vimala is architecting the site. And I’m making sure the fonts are right; you know, the important stuff.

When you’ve had a look around, we can have a chat about where you’d like to help.

3 Likes

Am I allowed to use this API to build something outside of SC?

You are not only allowed, but encouraged! This is part of our master plan, to build the site in a way that others can make use of. If you have questions or proposals on this, I would suggest starting a thread in this category and @ blake.

1 Like

Sounds interesting. I’m still very much a Web 1.0 guy but I’m looking forward to putting Polymer on my resume.

I have filled up my 8GB sdcard on the Pi so my main job right now is reinstalling Raspbian on a 32GB sdcard and start again with my sutta central install. I’ll get back to you once that is done.

1 Like

Compared to vanilla HTML, Polymer is like bathing in velvet butter.

1 Like

Sounds very Lady Gaga. :slight_smile:

2 Likes

Dear Ajhan Sujato

I want to create a EBT based site for instructions to practice. Developing Right view would be part of it and want to have sutta/sutta portions followed questions to promote reflection. I want to have suttas as part of explaination of meditation practice. I might include videos for meditation guidance as well. Any thoughts?

With metta

Mat

Gah.

I like the white text on black rendered with pristine cleanliness by my single Emacs frame. :slight_smile:

1 Like

The geek wars are escalating, I see. Now, what is geekier than emacs …

Well, first I’d suggest putting the question in its own thread …

Real geeks probably exclusively use VI. So that rules me out… :cold_sweat: I used a variation of VI back in the early 80s, but since the late 80s emacs has been my weapon of choice for coding or writing LaTeX…

Pshaw! Geeks these days. I just chisel my code directly into the silicon. Fast, simple, and always runs just how I want it.

Actually, working with the pi in command line mode I’ve gone with vim. Also, check out tmux - a window manager for your terminal. :slight_smile:

1 Like

Yes, that’s the advantage of at least having a good working knowledge of vi - you have a reliable tool that will always be there in a command-line environment. Also handy for working on remote systems…

This is my planned development environment:

  • Start with a raspberry pi, model B v3.
  • Plug it into a monitor, keyboard and mouse.
  • Set up wifi - this will be remembered when you disable the GUI.
  • Install lynx or other text mode browser. (Needed for our internet management system.)
  • Enable SSH
  • Power off, unplug everything from the pi except for the power cable.
  • Power on - you should have a working headless server available at http://raspberrypi.local

All our machines here run Windows 7, so by installing the PuTTy terminal software and using tmux, you can do all sorts of things at the command line. We have nice large Full HD monitors, so PuTTy sits on the right and Chrome, Firefox or perhaps even Edge on the left.

I guess in a way you’re using Windows 7 as a thin client. I’d be interested to see some performance benchmarks, but the main thing is that latency in the code/test cycle is low.

Happy days. :slight_smile:

I still have some free credits with Amazon AWS, so I tried this on a t2.micro instance. I also got the messages about Font family mapping matches no font file.

Under step 7 of the Developer Setup Guide, it does say:

It is possible that on the first run the server may fail to start, basically because certain resources took too long to become available. After letting it run until it throws an exception (a large incomprehensible stack trace), kill the server by hitting ctrl-c. Then run invoke server again and it should start correctly.

However, rerunning as instructed still produces the same error.

It would seem to be saying that it can’t find some fonts where it expects to find them.

1 Like

Hmm, yep:

The full log is as follows:

(suttacentral) pi@raspberrypi:~/suttacentral $ invoke server
Running the server...
Building TIM
[2017-03-28 12:38:47] INFO sc.textdata.build Loading TIM data for "af" from disk
[2017-03-28 12:38:47] INFO sc.textdata.build Loading TIM data for "bo" from disk
[2017-03-28 12:38:47] INFO sc.textdata.build Loading TIM data for "ca" from disk
[2017-03-28 12:38:47] INFO sc.textdata.build Loading TIM data for "cs" from disk
[2017-03-28 12:38:48] INFO sc.textdata.build Loading TIM data for "de" from disk
[2017-03-28 12:38:50] INFO sc.textdata.build Loading TIM data for "en" from disk
[2017-03-28 12:38:50] INFO sc.textdata.build Loading TIM data for "es" from disk
[2017-03-28 12:38:50] INFO sc.textdata.build Loading TIM data for "fa" from disk
[2017-03-28 12:38:50] INFO sc.textdata.build Loading TIM data for "fi" from disk
[2017-03-28 12:38:50] INFO sc.textdata.build Loading TIM data for "fr" from disk
[2017-03-28 12:38:50] INFO sc.textdata.build Loading TIM data for "gr" from disk
[2017-03-28 12:38:50] INFO sc.textdata.build Loading TIM data for "he" from disk
[2017-03-28 12:38:50] INFO sc.textdata.build Loading TIM data for "hi" from disk
[2017-03-28 12:38:50] INFO sc.textdata.build Loading TIM data for "hu" from disk
[2017-03-28 12:38:51] INFO sc.textdata.build Loading TIM data for "id" from disk
[2017-03-28 12:38:52] INFO sc.textdata.build Loading TIM data for "it" from disk
[2017-03-28 12:38:52] INFO sc.textdata.build Loading TIM data for "jp" from disk
[2017-03-28 12:38:52] INFO sc.textdata.build Loading TIM data for "ko" from disk
[2017-03-28 12:38:52] INFO sc.textdata.build Loading TIM data for "la" from disk
[2017-03-28 12:38:53] INFO sc.textdata.build Loading TIM data for "lzh" from disk
[2017-03-28 12:38:53] INFO sc.textdata.build Loading TIM data for "mr" from disk
[2017-03-28 12:38:54] INFO sc.textdata.build Loading TIM data for "my" from disk
[2017-03-28 12:38:54] INFO sc.textdata.build Loading TIM data for "nl" from disk
[2017-03-28 12:38:55] INFO sc.textdata.build Loading TIM data for "no" from disk
[2017-03-28 12:38:57] INFO sc.textdata.build Loading TIM data for "pi" from disk
[2017-03-28 12:38:57] INFO sc.textdata.build Loading TIM data for "pl" from disk
[2017-03-28 12:38:57] INFO sc.textdata.build Loading TIM data for "pr" from disk
[2017-03-28 12:38:57] INFO sc.textdata.build Loading TIM data for "pt" from disk
[2017-03-28 12:38:57] INFO sc.textdata.build Loading TIM data for "ro" from disk
[2017-03-28 12:38:58] INFO sc.textdata.build Loading TIM data for "ru" from disk
[2017-03-28 12:39:00] INFO sc.textdata.build Loading TIM data for "si" from disk
[2017-03-28 12:39:00] INFO sc.textdata.build Loading TIM data for "skt" from disk
[2017-03-28 12:39:00] INFO sc.textdata.build Loading TIM data for "sr" from disk
[2017-03-28 12:39:00] INFO sc.textdata.build Loading TIM data for "sv" from disk
[2017-03-28 12:39:00] INFO sc.textdata.build Loading TIM data for "ta" from disk
[2017-03-28 12:39:01] INFO sc.textdata.build Loading TIM data for "th" from disk
[2017-03-28 12:39:03] INFO sc.textdata.build Loading TIM data for "vn" from disk
[2017-03-28 12:39:04] INFO sc.textdata.build Loading TIM data for "zh" from disk
[2017-03-28 12:39:04] INFO sc.textdata.build Removing unused db files
[2017-03-28 12:39:04] INFO sc.textdata.build Splicing TIM data
[2017-03-28 12:39:08] INFO sc.textdata.build TIM is ready
Building IMM
Font family mapping matches no font file: NotoSansTibetan (Noto Sans Tibetan)
Font family mapping matches no font file: skolar-devanagari (Skolar Devanagari)
Font family mapping matches no font file: NotoSansKR ({'subset_languages': 'ko', 'name': 'Noto Sans KR'})
Font family mapping matches no font file: NotoSerif ({'subset_languages': '*', 'name': 'Noto Serif'})
Font family mapping matches no font file: lumen-thai (Lumen Thai)
Font family mapping matches no font file: NotoSansJP ({'subset_languages': 'jp', 'name': 'Noto Sans JP'})
Font family mapping matches no font file: NotoSansCJKtc ({'subset_languages': ['zh', 'lzh'], 'name': 'Noto Sans TC'})
Font family mapping matches no font file: ko-pub-batang (Ko Pub Batang)
Font family mapping matches no font file: SkolarPE ({'subset_languages': '*', 'name': 'Skolar Sutta Web'})
Font family mapping matches no font file: noto-sans-hebrew (Noto Sans Hebrew)
Font family mapping matches no font file: NotoSansCJKsc ({'subset_languages': ['zh', 'lzh'], 'name': 'Noto Sans SC'})
Font family mapping matches no font file: SkolarSansPE ({'subset_languages': '*', 'name': 'Skolar Sans'})
Font family mapping matches no font file: noto-sans ({'subset_languages': '*', 'name': 'Noto Sans'})
Could not build maitenance page
Traceback (most recent call last):
  File "/home/pi/suttacentral/sc/show.py", line 361, in <module>
    build_maitenance_page()
  File "/home/pi/suttacentral/sc/show.py", line 356, in build_maitenance_page
    html = GenericView('errors/maintenance', {}).render()
  File "/home/pi/suttacentral/sc/views.py", line 236, in render
    template = self.get_template()
  File "/home/pi/suttacentral/sc/views.py", line 163, in get_template
    return self.env.get_template(template_name)
  File "/home/pi/suttacentral/sc/views.py", line 146, in env
    return jinja2_environment()
  File "/home/pi/suttacentral/sc/views.py", line 44, in jinja2_environment
    __jinja2_environment = build_jinja2_environment()
  File "/home/pi/suttacentral/sc/views.py", line 55, in build_jinja2_environment
    env.assets_environment = assets.get_env()
  File "/home/pi/suttacentral/sc/assets.py", line 103, in get_env
    sc_data_scripts_file = get_js_datascripts_filename()
  File "/home/pi/suttacentral/sc/assets.py", line 184, in get_js_datascripts_filename
    tasks.jsdata.build(minify=True, quiet=True)
  File "/home/pi/.pyenv/versions/3.5.0/envs/suttacentral/lib/python3.5/site-packages/invoke/tasks.py", line 107, in __call__
    if not isinstance(args[0], Context):
IndexError: tuple index out of range
Failed to build the maitenace page, this indicates critical problems, exiting
(suttacentral) pi@raspberrypi:~/suttacentral $
1 Like