Skip to main content
Recent Posts
21
General ElkArte discussions / Testing 1.1.6
Last post by emanuele -
Hi all!

I prepared the patch for 1.1.6, as usual, I'd like to ask for your help in testing it.
Tests needed: install/uninstall on a clean env.
Likely there is something broken, so... use it only if you are somehow confident in what you are doing.
Hopefully it will install fine (I think I remembered all the pieces to tweak, but who knows), worst case you'll get some errors already during install.
Please report them. :)
22
Chit Chat / Re: showcase coming soon
Last post by Atlas -
@Spuds , I added the user preference feature to switch between youtube/bitchute. I had to back-engineer youtube's  iframe API to create one for bitchute. Since not all youtube videos have a bitchute counterpart it's a preference setting, it'll serve youtube when there's no bitchute link in my db. Oh, also, no login required for the setting, i store the setting in the user's local storage. 
24
General ElkArte discussions / Server uptime monitoring - proof of concept
Last post by emanuele -
Using existing tools is soooo boring... while reinventing the wheel is always so fun! :D

So, a few days ago I got the idea to give it a go to create a monitoring "service" with free tools that could be used to as a proof of concept monitor if the domain responds properly.
What i used are all tools provided by google for free:
  • App script
  • Google docs
  • Data Studio

The result is:
https://datastudio.google.com/reporting/1pISX1-ui5poBVZFVKQWp_d3dThmf0fNM/page/5gwq

a little boring look for the moment, but it's just a PoC.

The concept is somehow simple: a few lines of App script sends and capture a request to a webdomain, write down the result in a Google sheet and Data studio visualize that results.
The "ping" is done ever 15 minutes and the charts are updated every 15 minutes, so in the worst case you are looking at a data that is 30 minutes old.
For the time being I didn't spend much time tuning the Data studio report, so it shows only the number of pings in a certain status per hour (so the maximum would be 4, one every 15 minutes).

The App script code is the following:
Code: [Select]
function checkSite() {
  var response = UrlFetchApp.fetch("http://www.elkarte.it/", {'muteHttpExceptions': true});
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheetByName('Sheet1');
  var d = new Date();
  sheet.appendRow([d.getFullYear().toString() +
                   Utilities.formatString("%02.0f", d.getMonth()) +
                   Utilities.formatString("%02.0f", d.getDate()) +
                   Utilities.formatString("%02.0f", d.getHours())
                   , response.getResponseCode(), response.getAllHeaders().toSource()]);
}
Most of the code at the moment is currently devoted to write a date that can be digested by Data studio.

The data source in Data studio is configured with 4 fields that filter the status code responses in order to show them in 4 different charts (one for 200 = all good, one for 404 = page not found, one for 500 = server error, and one for any other code).

My intention would be to add:
  • email in case of downtime,
  • special cases (e.g. "Elk db connection error")
  • better visualization in Data studio
  • better archiving back-end (google has a db-like service, but it requires payment, so I'll have to force a google sheet to work somehow like a relational db  :-X )
  • Anything that may come to my mind and that can be worked out
28
Chit Chat / Re: showcase coming soon
Last post by Atlas -
.
I'm actually thinking about hacking elkarte so I can crowd-source edits.
btw, if anyone has a SQL query handy for inserting topics, that'd be helpful.

I'll even semantically-markup the link to the edit page:
so this:
Code: [Select]
<span property="caption" typeof="MediaObject">
<meta property="encodingFormat" content="text/vtt" />
<link property="contentUrl" href="https://weburlate.com/timcast/subtitles/vgn-fuZ_tEc.vtt" />
</span>

becomes this:
Code: [Select]
<span property="caption" typeof="MediaObject">
<meta property="encodingFormat" content="text/vtt" />
<link property="contentUrl" href="https://weburlate.com/timcast/subtitles/vgn-fuZ_tEc.vtt" />
   <span property="potentialAction" typeof="UpdateAction">
      <link property="actionStatus" href="https://schema.org/PotentialActionStatus" />
      <span property="name">
         <a property="target" typeof="EntryPoint" href="path/to/forum/topicPage">Edit Captions</a>
      </span>
   </span>
</span>

btw, I don't think I mentioned the "CheckAction" I implemented on the current day's page, I have an ajax-button at the bottom of that page that checks: 2 youtube RSS feeds, 2 bitchute HTML pages and the audio-podcast's RSS feed for updates, when clicked.  I also have a cronjob to execute the check several times a day. Anyway, I even added semantics to the button. You can markup pretty much all user actions like this.
29
Chit Chat / Re: showcase coming soon
Last post by Atlas -
I'm actually thinking about hacking elkarte so I can crowd-source edits. Dedicate a specialized board to it and generating a topic for each subtitle file.  Then users can quote the OP and edit the text. Upvote the best edit if more than one and add a mods-only button to overwrite the VTT file (I'll need to validate it first, of course). I'm also thinking of adding more granular semantics in the subtitle files. WebVTT allows for JSON-LD, which I can convert to RDFa when I output it to the page.
30
Chit Chat / Re: showcase coming soon
Last post by Spuds -
Very nice ...

Are you going to leave the transcript on the page or hide/collapse it?  I assume collapsed/hidden it would still be picked up as the structured data.  Only reason I ask is that without the punctuation its a bit of a blob of text. 

Anyway that is cool that you could convert the sub titles it to video text transcript.  It also opens up other accessibility options which is nice benefit as well.