Welcome, Guest
You have to register before you can post on our site.
Search Forums
Forum Statistics
 Members: 6
 Latest member: Diviera
 Forum threads: 5
 Forum posts: 6

Full Statistics
Online Users
There are currently 13 online users.
 0 Member(s) | 12 Guest(s)

Countdown timer 00:00:00, change framerate and startseconds for your needs.

:framerate=30;startseconds=10; startcounter=startseconds*framerate;hours=floor((startcounter-time)/framerate/60/60)%60;minutes=floor((startcounter-time)/framerate/60)%60; seconds=floor((startcounter-time)/framerate)%60; return Text(string.format("%02.f",hours)..":"..string.format("%02.f",minutes)..":"..string.format("%02.f",seconds));

Countdown timer 00:00

:framerate=30;startseconds=10; startcounter=startseconds*framerate;minutes=floor((startcounter-time)/framerate/60)%60; seconds=floor((startcounter-time)/framerate)%60; return Text(string.format("%02.f",minutes)..":"..string.format("%02.f",seconds));

If you don't have ffmpeg added to path, just copy ffmpeg.exe to folder where you have video files.

 |- ffmpeg.exe
 |- video01.mp4
 |- video02.mp4
 |- video03.mp4

Extract to .ogg:

for %v in (*.mp4) do ffmpeg -i "%v" -vn -acodec libvorbis "%v.ogg"

Extract to .mp3:

for %v in (*.mp4) do ffmpeg -i "%v" -vn -acodec libmp3lame "%v.mp3"

Do not read this uber noob solutions bellow! I used it before I find out simple and user friendly Jinja. Greate tutorial about it is here.

To use mustache templating language with Python we need chevron.

pip install chevron

If you get some red errors try this:
pip install --user chevron

If you still get red errors, sorry I'm a NOOB.

Next, add chevron.exe to PATH, like pip message suggest.

Example template file (diviera.txt):
This is {{name}}!

Python code:
import chevron

strings = {'title': 'Fantastic title',

with open('diviera.txt', 'r') as f:
    fillup = chevron.render(f, strings)    

with open('diviera_final.txt', 'w') as nf:

Translate two leter code of US State name to full name.

def StateFullName(stateShortName):
    states = {'AK':'Alaska',
                'NC':'North Carolina',
                'ND':'North Dakota',
                'NH':'New Hampshire',
                'NJ':'New Jersey',
                'NM':'New Mexico',
                'NY':'New York',
                'RI':'Rhode Island',
                'SC':'South Carolina',
                'SD':'South Dakota',
                'WV':'West Virginia',
    if stateShortName.upper() in states:
        return states[stateShortName.upper()]
        return 'unknow'

This is the simplest way to send some notifications on smartphone by python script. No install extra module is needed.

First find and add BotFather on Telegram and send /newbot message. Follow instructions. Save new token from BotFather. 
[Image: ea9561af_tn.png]

Next, find and add IDBot and send /getid message. 
[Image: 03e0570c_tn.png]

import  urllib.request


message = 'Diviera.com - place where PRO get heart attack'.replace(' ','%20')
urlMessage = 'https://api.telegram.org/bot' + token + '/sendMessage?chat_id=' + chatID + '&text=' + message

sendIt = urllib.request.urlopen(urlMessage)