Skip to content

Instantly share code, notes, and snippets.

View ilius's full-sized avatar

Saeed Rasooli ilius

  • Iran
  • 16:37 (UTC +03:30)
View GitHub Profile
@ilius
ilius / json-to-tabfile.py
Last active May 31, 2023 05:11
VahidN/EnglishToPersianDictionaries
#!/usr/bin/env python
add_prefix = True
add_reverse = True
import os
import sys
from os.path import join
from json import load
# Go's template funcs:
# https://github.com/golang/go/blob/master/src/text/template/funcs.go
header_template = """
<b><font color='#ccf'>{{.DictName}}</font></b>
<font color='#aaa'> [%{{.Score}}]</font>
{{if .ShowTerms }}
<div dir="ltr" style="font-size: large;font-weight:bold;">
{{ index .Terms 0 }}
</div>
@ilius
ilius / prefix.txt
Created April 16, 2023 17:23
English prefixes and suffixes
a
ab
abs
ac
acantho
acet
aceto
acro
actino
ad
@ilius
ilius / dict-links.txt
Last active March 7, 2024 06:13
Dict Links
#!/bin/bash
# Discover monitor name with: xrandr | grep " connected"
# and set MONITOR
MONITOR=""
STEP="0.05"
MIN="0.1"
CurrBrightLine=$( xrandr --verbose --current | grep ^"$MONITOR" -A5 | tail -n1 )
@ilius
ilius / epub_ungrouped.py
Last active January 10, 2022 23:35
PyGlossary plugin epub_ungrouped.py (issue #352)
# -*- coding: utf-8 -*-
from formats_common import *
import zipfile
enable = True
lname = "epub_ungrouped"
format = "EpubUngrouped"
description = "EPUB (Ungrouped)"
extensions = ()
@ilius
ilius / pharmaplus-no-brand.py
Last active January 18, 2021 03:27
pharmaplus
# -*- coding: utf-8 -*-
from formats_common import *
import html
enable = True
format = 'Pharmaplus'
description = 'Pharmaplus (SQLite3)'
extensions = ()
readOptions = []
@ilius
ilius / pharmaplus.py
Created January 17, 2021 23:24
pharmaplus.py
# -*- coding: utf-8 -*-
from formats_common import *
import html
enable = True
format = 'Pharmaplus'
description = 'Pharmaplus (SQLite3)'
extensions = ()
readOptions = []
@ilius
ilius / Drug-guide.py
Created January 17, 2021 02:29
Drug-guide.py
# -*- coding: utf-8 -*-
from formats_common import *
import html
enable = True
format = 'Drug-guide'
description = 'Drug-guide (SQLite3)'
extensions = ()
readOptions = []
@ilius
ilius / random-ja-word.sh
Last active January 8, 2021 06:07
Generate random Japanese-style words that are pronounceable
#!/bin/bash
# need to install https://github.com/ilius/repassgen
# u i a e o
G0='ういあえお'
# shi ki ni ka
G1='しきにか'
# no chi ku to ha ta