This script requires version 3.9 of Python or higher and you must also have imagemagick installed.
- To take a screenshot in the Pictures folder in the user's home:
python screenshot.py
mmdbalkhi@parseh ~/w/Aegisub/build (git)-[feature] % ninja | |
[2/499] Compiling C++ object subprojects/ffms2/libffms2.a.p/src_core_filehandle.cpp.o | |
In file included from ../subprojects/ffms2/src/core/filehandle.cpp:23: | |
../subprojects/ffms2/src/core/utils.h:102:10: warning: unnecessary parentheses in declaration of 'ptr' [-Wparentheses] | |
102 | T(FFMS_Struct::*ptr); | |
| ^~~~~~~~~~~~~~~~~~~ | |
../subprojects/ffms2/src/core/utils.h:102:10: note: remove parentheses | |
102 | T(FFMS_Struct::*ptr); | |
| ^~~~~~~~~~~~~~~~~~~ | |
| - - |
The Meson build system | |
Version: 1.2.0 | |
Source dir: /home/mmdbalkhi/w/Aegisub | |
Build dir: /home/mmdbalkhi/w/Aegisub/build | |
Build type: native build | |
Project name: Aegisub | |
Project version: 3.2.2 | |
C compiler for the host machine: cc (gcc 12.2.0 "cc (GCC) 12.2.0") | |
C linker for the host machine: cc ld.bfd 2.39 | |
C++ compiler for the host machine: c++ (gcc 12.2.0 "c++ (GCC) 12.2.0") |
mmdbalkhi@parseh ~/w/Aegisub/build (git)-[remotes/origin/feature~1] % ninja | |
[5/472] Compiling C++ object subprojects/ffms2/libffms2.so.p/src_core_audiosource.cpp.o | |
FAILED: subprojects/ffms2/libffms2.so.p/src_core_audiosource.cpp.o | |
c++ -Isubprojects/ffms2/libffms2.so.p -Isubprojects/ffms2 -I../subprojects/ffms2 -I../subprojects/ffms2/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++14 -O3 -fPIC -D_FILE_OFFSET_BITNS=64 -DFFMS_EXPORTS -D__STDC_CONSTANT_MACROS -MD -MQ subprojects/ffms2/libffms2.so.p/src_core_audiosource.cpp.o -MF subprojects/ffms2/libffms2.so.p/src_core_audiosource.cpp.o.d -o subprojects/ffms2/libffms2.so.p/src_core_audiosource.cpp.o -c ../subprojects/ffms2/src/core/audiosource.cpp | |
In file included from ../subprojects/ffms2/src/core/audiosource.h:24, | |
from ../subprojects/ffms2/src/core/audiosource.cpp:21: | |
../subprojects/ffms2/src/core/utils.h:102:10: warning: unnecessary parentheses in declaratio |
#! /bin/python3 | |
"""Convert Chert words to human redebel texts""" | |
en = "qwertyuiop[]asdfghjkl;'zxcvbnm,./1234567890-=\ " | |
fa = "ضصثقفغعهخحجچشسیبلاتنمکگظطزرذدپو./۱۲۳۴۵۶۷۸۹۰-=\ " | |
def fa_chertnevic(chert): | |
"""Convert Chert words to human redebel texts | |
fa_chertnevic('sghl') == 'سلام'""" |
@app.route('/<id>') | |
def url_redirect(id): | |
conn = sqlite3.connect('database.db') | |
conn.row_factory = sqlite3.Row | |
original_id = hashids.decode(id) | |
if original_id: | |
original_id = original_id[0] | |
url_data = conn.execute('SELECT original_url, clicks FROM urls' | |
' WHERE id = (?)', (original_id,) |
{% extends 'base.html' %} | |
{% block content %} | |
<h1>{% block title %} MozLink! {% endblock %}</h1> | |
<form method="post"> | |
<div class="form-group"> | |
<label for="url">URL</label> | |
<input type="text" name="url" placeholder="URL to shorten" class="form-control" | |
value="{{ request.form['url'] }}" autofocus></input> | |
</div> | |
<div align="center" class="form-group"> |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet" | |
integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous"> | |
<title>{% block title %} {% endblock %}</title> | |
<style>.center { | |
margin: auto; |
@app.route('/', methods=('GET', 'POST')) | |
def index(): | |
conn = sqlite3.connect('database.db') | |
conn.row_factory = sqlite3.Row | |
if request.method == 'POST': | |
url = request.form['url'] | |
if not url: | |
flash('The URL is required!') | |
return redirect(url_for('index')) | |
url_data = conn.execute('INSERT INTO urls (original_url) VALUES (?)', |