Compare commits
2 Commits
1d3b97a9f5
...
5dd15d255b
Author | SHA1 | Date | |
---|---|---|---|
5dd15d255b | |||
650dba86b9 |
@ -1,4 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ~/Downloads
|
cd ~/Downloads
|
||||||
YTDL_WD=$(zenity --file-selection --directory --filename=.)
|
YTDL_WD="."
|
||||||
xfce4-terminal --default-working-directory $YTDL_WD --execute youtube-dl $@
|
|
||||||
|
if [ $(command -v zenity) ]; then
|
||||||
|
YTDL_WD=$(zenity --file-selection --directory --filename=.)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $(command -v xfce4-terminal) ]; then
|
||||||
|
xfce4-terminal --default-working-directory "$YTDL_WD" --execute youtube-dl $@
|
||||||
|
else
|
||||||
|
cd "$YTDL_WD"
|
||||||
|
youtube-dl $@
|
||||||
|
fi
|
||||||
|
8
sms/clear_sms
Normal file
8
sms/clear_sms
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
from sms import get_sms
|
||||||
|
from subprocess import call
|
||||||
|
from os.path import basename
|
||||||
|
|
||||||
|
for sms in get_sms():
|
||||||
|
print(sms)
|
||||||
|
call(["mmcli", "-m", "any", "--messaging-delete-sms", sms[0]])
|
10
sms/dump_sms
Normal file
10
sms/dump_sms
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
from sms import get_sms
|
||||||
|
from subprocess import call
|
||||||
|
from os.path import basename
|
||||||
|
|
||||||
|
for sms in get_sms():
|
||||||
|
print(sms)
|
||||||
|
out_file = "{}.{}.sms".format(basename(sms[0]), sms[1])
|
||||||
|
print(">> dump to {}".format(out_file))
|
||||||
|
call(["mmcli", "-m", "any", "--create-file-with-data", out_file, "--sms", sms[0]])
|
4
sms/list_sms
Normal file
4
sms/list_sms
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
from sms import get_sms
|
||||||
|
for sms in get_sms():
|
||||||
|
print(sms)
|
11
sms/sms.py
Normal file
11
sms/sms.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
from subprocess import call, check_output
|
||||||
|
from os.path import basename
|
||||||
|
|
||||||
|
def parse_list_item(item):
|
||||||
|
item = item.strip().split(" ", 2)
|
||||||
|
item[1] = item[1][1:-1]
|
||||||
|
return tuple(item)
|
||||||
|
|
||||||
|
def get_sms():
|
||||||
|
return [parse_list_item(sms) for sms in check_output(["mmcli", "-m", "any", "--messaging-list-sms"]).decode().strip().split("\n")]
|
Loading…
x
Reference in New Issue
Block a user