diff options
author | luxagraf <sng@luxagraf.net> | 2020-02-16 15:51:21 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2020-02-16 15:51:21 -0500 |
commit | 3165ef5abdb298108efa2ba3d339f70ca966315a (patch) | |
tree | ef882420caca6e063b87a20dd1a8b00f89fd5ffc /bin | |
parent | cd507c92f617d4a8a3f7bb0b43e425491ef7184d (diff) |
fixed a few bugs importing old files
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/agenda.sh | 3 | ||||
-rwxr-xr-x | bin/alltasks.py | 59 | ||||
-rwxr-xr-x | bin/alltasks_by_type.py | 56 | ||||
-rwxr-xr-x | bin/apps/amazon.desktop | 9 | ||||
-rwxr-xr-x | bin/apps/book.desktop | 9 | ||||
-rwxr-xr-x | bin/apps/drive.desktop | 9 | ||||
-rwxr-xr-x | bin/apps/evernote.sh | 2 | ||||
-rwxr-xr-x | bin/apps/gapps.sh | 3 | ||||
-rwxr-xr-x | bin/apps/gdocs.desktop | 9 | ||||
-rwxr-xr-x | bin/apps/gdrive.sh | 2 | ||||
-rwxr-xr-x | bin/apps/gmailer.desktop | 9 | ||||
-rwxr-xr-x | bin/apps/gram.desktop | 9 | ||||
-rwxr-xr-x | bin/apps/mail.desktop | 9 | ||||
-rwxr-xr-x | bin/apps/messages.desktop | 9 | ||||
-rwxr-xr-x | bin/apps/note.desktop | 9 | ||||
-rwxr-xr-x | bin/apps/outs.desktop | 9 | ||||
-rwxr-xr-x | bin/apps/shopping.sh | 2 | ||||
-rwxr-xr-x | bin/apps/tweet.desktop | 9 | ||||
-rwxr-xr-x | bin/apps/twitter.sh | 2 | ||||
-rwxr-xr-x | bin/arch.sh | 3 | ||||
-rwxr-xr-x | bin/bak-biz.sh | 18 | ||||
-rwxr-xr-x | bin/bak-docs.sh | 18 | ||||
-rwxr-xr-x | bin/bak-sites.sh | 21 |
23 files changed, 288 insertions, 0 deletions
diff --git a/bin/agenda.sh b/bin/agenda.sh new file mode 100755 index 0000000..bcfd88b --- /dev/null +++ b/bin/agenda.sh @@ -0,0 +1,3 @@ +#!/bin/sh +clear; +khal agenda --days $@ diff --git a/bin/alltasks.py b/bin/alltasks.py new file mode 100755 index 0000000..dcbd894 --- /dev/null +++ b/bin/alltasks.py @@ -0,0 +1,59 @@ +#!/usr/bin/python +import os +from os.path import abspath, dirname +from operator import itemgetter + +class bcolors: + HEADER = '\033[95m' + OKBLUE = '\033[94m' + OKGREEN = '\033[92m' + WARNING = '\033[93m' + FAIL = '\033[91m' + ENDC = '\033[0m' +# assuming that this script is in ~/bin this will work: +BASE_DIR = abspath(dirname(dirname(__file__))) + '/' +project_list = [] +waiting_list = [] +for root, dirnames, filenames in os.walk('%sgtd' % (BASE_DIR)): + for f in filenames: + waiting = False + inprogress = False + if not f.startswith('@') and not f.startswith('.') and not f.startswith('Notes & Settings') and not f.startswith('projx') and not f.startswith("errands"): + + name = f[f.find("[") + 1:f.find("]")] + task = f[f.find("]") + 2:-4] + if f.find("]") > 5: + inprogress = True + with open('%sgtd/%s' % (BASE_DIR, f), "r") as fl: + for line in fl: + for part in line.split(): + if "@waiting" in part: + waiting = True + project_list.append({ + "file": f, + "name": name, + "task": task, + "inprogress": inprogress, + "waiting": waiting, + }) + break + +newlist = sorted(project_list, key=itemgetter('name', 'task')) + +#projects_file = open("/Users/sng/gtd/@projects.txt", 'w') +l_name = '' +for i,p in enumerate(newlist): + if not p['inprogress'] and not p['waiting']: + if l_name == p['name']: + print(p['file'][:-4]) + else: + if i != 0: + print(" ") + print(p['file'][:-4]) + l_name = p['name'] + +for i,p in enumerate(newlist): + if i == 0: + print(bcolors.WARNING + "\n------ TASKS WAITING -----" + bcolors.ENDC) + if p['waiting'] == True: + print(p['file'][:-4]) diff --git a/bin/alltasks_by_type.py b/bin/alltasks_by_type.py new file mode 100755 index 0000000..e2affd8 --- /dev/null +++ b/bin/alltasks_by_type.py @@ -0,0 +1,56 @@ +#!/usr/bin/python +import os +import sys +from os.path import abspath, dirname +from operator import itemgetter + +ARG = sys.argv[1] + +class bcolors: + HEADER = '\033[95m' + OKBLUE = '\033[94m' + OKGREEN = '\033[92m' + WARNING = '\033[93m' + FAIL = '\033[91m' + ENDC = '\033[0m' +# assuming that this script is in ~/bin this will work: +BASE_DIR = abspath(dirname(dirname(__file__))) + '/' +project_list = [] +waiting_list = [] +for root, dirnames, filenames in os.walk('%sgtd' % (BASE_DIR)): + for f in filenames: + waiting = False + inprogress = False + if not f.startswith('@') and not f.startswith('.') and not f.startswith('Notes & Settings') and not f.startswith('projx') and not f.startswith("errands"): + name = f[f.find("[") + 1:f.find("]")] + task = f[f.find("]") + 2:-4] + with open('%sgtd/%s' % (BASE_DIR, f), "r") as fl: + for line in fl: + for part in line.split(): + if "@waiting" in part: + waiting = True + if name == ARG: + project_list.append({ + "file": f, + "name": name, + "task": task, + "inprogress": inprogress, + "waiting": waiting, + }) + break + +newlist = sorted(project_list, key=itemgetter('name', 'task')) + +#projects_file = open("/Users/sng/gtd/@projects.txt", 'w') +l_name = '' +for i,p in enumerate(newlist): + if i == 0: + print bcolors.WARNING + "------ %s TASKS -----" %(ARG) + bcolors.ENDC + if not p['inprogress'] and not p['waiting']: + if l_name == p['name']: + print p['file'][:-4] + else: + if i != 0: + print " " + print p['file'][:-4] + l_name = p['name'] diff --git a/bin/apps/amazon.desktop b/bin/apps/amazon.desktop new file mode 100755 index 0000000..b35218a --- /dev/null +++ b/bin/apps/amazon.desktop @@ -0,0 +1,9 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Version=1.0 +Terminal=false +Type=Application +Name=Shopping +Exec=/usr/bin/chromium --user-data-dir=/home/lxf/.config/chromium-shopping --app=https://amazon.com// --app-id=ijhbdfngddjdodflgoippgfhjlhphcvh +Icon=chrome-ijhbdfngedjdodflgoippgfhjlhphcnh-Default +StartupWMClass=crx_ijhbdfngddjdodflgoippgfhjlhphcvh diff --git a/bin/apps/book.desktop b/bin/apps/book.desktop new file mode 100755 index 0000000..d700132 --- /dev/null +++ b/bin/apps/book.desktop @@ -0,0 +1,9 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Version=1.0 +Terminal=false +Type=Application +Name=Facebook +Exec=/usr/bin/chromium --user-data-dir=/home/lxf/.config/google-chrome-beta-facebook --app=https://facebook.com/ --app-id=celnaknmndcdcjcagffhbhciignkeokb +Icon=chrome-celnaknmndcdcjcagffhbhciignkeokb-Default +StartupWMClass=crx_celnaknmndcdcjcagffhbhciignkeokb diff --git a/bin/apps/drive.desktop b/bin/apps/drive.desktop new file mode 100755 index 0000000..9dee9ad --- /dev/null +++ b/bin/apps/drive.desktop @@ -0,0 +1,9 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Version=1.0 +Terminal=false +Type=Application +Name=Google Drive +Exec=chromium --user-data-dir=/home/lxf/.config/google-chrome-docs --app=https://drive.google.com/drive/my-drive --profile-directory=Default --app-id=aghbiahbpaijignceidepookljebhfak +Icon=chrome-aghbiahbpaijignceidepookljebhfak-Default +StartupWMClass=crx_aghbiahbpaijignceidepookljebhfak diff --git a/bin/apps/evernote.sh b/bin/apps/evernote.sh new file mode 100755 index 0000000..1e6f8e3 --- /dev/null +++ b/bin/apps/evernote.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +exo-open ~/bin/note.desktop diff --git a/bin/apps/gapps.sh b/bin/apps/gapps.sh new file mode 100755 index 0000000..42e4552 --- /dev/null +++ b/bin/apps/gapps.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +exo-open ~/bin/gdocs.desktop + diff --git a/bin/apps/gdocs.desktop b/bin/apps/gdocs.desktop new file mode 100755 index 0000000..f210e70 --- /dev/null +++ b/bin/apps/gdocs.desktop @@ -0,0 +1,9 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Version=1.0 +Terminal=false +Type=Application +Name=Facebook +Exec=/usr/bin/google-chrome-stable --user-data-dir=/home/lxf/.config/google-chrome-docs --app=https://docs.google.com/ --app-id=celnakimndcdvjcagffhbhciignkeokb +Icon=chrome-celnaknmndcdcjcagffhbhciignkeokb-Default +StartupWMClass=crx_celnaknmndcdcjcagffhbhciignkeokb diff --git a/bin/apps/gdrive.sh b/bin/apps/gdrive.sh new file mode 100755 index 0000000..6bba116 --- /dev/null +++ b/bin/apps/gdrive.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +exo-open ~/bin/drive.desktop diff --git a/bin/apps/gmailer.desktop b/bin/apps/gmailer.desktop new file mode 100755 index 0000000..a04e3f3 --- /dev/null +++ b/bin/apps/gmailer.desktop @@ -0,0 +1,9 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Version=1.0 +Terminal=false +Type=Application +Name=Facebook +Exec=/usr/bin/chromium --user-data-dir=/home/lxf/.config/gmail --app=https://mail.google.com/mail/u/0/?hl=en#inbox --app-id=celnakifgdcdvjcagffhbhciignkeokb +Icon=chrome-celnaknmndcdcjcagffhbhciignkeokb-Default +StartupWMClass=celnakifgdcdvjcagffhbhciignkeokb diff --git a/bin/apps/gram.desktop b/bin/apps/gram.desktop new file mode 100755 index 0000000..39d2c77 --- /dev/null +++ b/bin/apps/gram.desktop @@ -0,0 +1,9 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Version=1.0 +Terminal=false +Type=Application +Name=Instagram +Exec=chromium --user-data-dir=/home/lxf/.config/instagram --app=https://instagram.com/ --app-id=delnakimndcdvjcagffhbhciignkeokb +Icon=chrome-delnaknmndcdcjcagffhbhciignkeokb-Default +StartupWMClass=crx_delnaknmndcdcjcagffhbhciignkeokb diff --git a/bin/apps/mail.desktop b/bin/apps/mail.desktop new file mode 100755 index 0000000..c92226c --- /dev/null +++ b/bin/apps/mail.desktop @@ -0,0 +1,9 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Version=1.0 +Terminal=false +Type=Application +Name=Fastmaij +Exec=chromium --user-data-dir=/home/lxf/.config/fastmail --app=https://www.fastmail.com/mail/Inbox/?u=8b704108 --app-id=celnakimndcdvjcagffhbhciignkeokb +Icon=chrome-celnaknmndcdcjcagffhbhciignkeokb-Default +StartupWMClass=crx_celnaknmndcdcjcagffhbhciignkeokb diff --git a/bin/apps/messages.desktop b/bin/apps/messages.desktop new file mode 100755 index 0000000..26ca240 --- /dev/null +++ b/bin/apps/messages.desktop @@ -0,0 +1,9 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Version=1.0 +Terminal=false +Type=Application +Name=Fastmaij +Exec=chromium --user-data-dir=/home/lxf/.config/messages --app=https://messages.google.com/web/conversations --app-id=celnakimtdcdvjcagffhbhciignkeokb +Icon=chrome-celnaknmndcdcjcagffhbhciignkeokb-Default +StartupWMClass=crx_celnakimtdcdvjcagffhbhciignkeokb diff --git a/bin/apps/note.desktop b/bin/apps/note.desktop new file mode 100755 index 0000000..a0ddaae --- /dev/null +++ b/bin/apps/note.desktop @@ -0,0 +1,9 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Version=1.0 +Terminal=false +Type=Application +Name=Evernote +Exec=/usr/bin/chromium --user-data-dir=/home/lxf/.config/chromium-evernote --app=https://evernote.com/ --app-id=ijhbdfngedjdodflgoippgfhjlhphcnh +Icon=chrome-ijhbdfngedjdodflgoippgfhjlhphcnh-Default +StartupWMClass=crx_ijhbdfngedjdodflgoippgfhjlhphcnh diff --git a/bin/apps/outs.desktop b/bin/apps/outs.desktop new file mode 100755 index 0000000..0cfc451 --- /dev/null +++ b/bin/apps/outs.desktop @@ -0,0 +1,9 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Version=1.0 +Terminal=false +Type=Application +Name=Hangouts +Exec=/usr/bin/chromium --user-data-dir=/home/lxf/.config/chromium-hangouts --app=https://hangouts.google.com/webchat/start --app-id=ijhbdfngddjdodflgoippgfhjlhphcnh +Icon=chrome-ijhbdfngedjdodflgoippgfhjlhphcnh-Default +StartupWMClass=crx_ijhbdfngddjdodflgoippgfhjlhphcnh diff --git a/bin/apps/shopping.sh b/bin/apps/shopping.sh new file mode 100755 index 0000000..9b29742 --- /dev/null +++ b/bin/apps/shopping.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +exo-open ~/bin/amazon.desktop diff --git a/bin/apps/tweet.desktop b/bin/apps/tweet.desktop new file mode 100755 index 0000000..9af4965 --- /dev/null +++ b/bin/apps/tweet.desktop @@ -0,0 +1,9 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Version=1.0 +Terminal=false +Type=Application +Name=Twitter +Exec=/usr/bin/chromium --user-data-dir=/home/lxf/.config/chromium-twitter --app=https://twitter.com/luxagraf --app-id=celnaknpfdcdcjcagffhbhciignkeokb +Icon=chrome-celnaknpfdcdcjcagffhbhciignkeokb-Default +StartupWMClass=crx_celnaknpfdcdcjcagffhbhciignkeokb diff --git a/bin/apps/twitter.sh b/bin/apps/twitter.sh new file mode 100755 index 0000000..4adf7cd --- /dev/null +++ b/bin/apps/twitter.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +exo-open ~/bin/tweet.desktop diff --git a/bin/arch.sh b/bin/arch.sh new file mode 100755 index 0000000..bbeefa3 --- /dev/null +++ b/bin/arch.sh @@ -0,0 +1,3 @@ +#!/bin/sh +clear +archey3 diff --git a/bin/bak-biz.sh b/bin/bak-biz.sh new file mode 100755 index 0000000..0a7ac0b --- /dev/null +++ b/bin/bak-biz.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# ---------------------------------------------------------------------- +# rotating-filesystem-snapshot utility +# essentially, rotate backup-snapshots of /home +# on a weekly basis using rsync and cron +# ---------------------------------------------------------------------- + + +rm -rf /mnt/backup/week.4 +mv /mnt/backup/week.3 /mnt/backup/week.4 +mv /mnt/backup/week.2 /mnt/backup/week.3 +mv /mnt/backup/week.1 /mnt/backup/week.2 +mv /mnt/backup/week.0 /mnt/backup/week.1 +rsync -avvz ~/business/ \ +--delete-after \ +--exclude-from '/home/lxf/.rsync-exclude' \ +--link-dest=/mnt/backup/week.1 \ + /mnt/backup/week.0/ diff --git a/bin/bak-docs.sh b/bin/bak-docs.sh new file mode 100755 index 0000000..332ce6f --- /dev/null +++ b/bin/bak-docs.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# ---------------------------------------------------------------------- +# rotating-filesystem-snapshot utility +# essentially, rotate docbak-snapshots of /home +# on a weekly basis using rsync and cron +# ---------------------------------------------------------------------- + + +rm -rf /mnt/docbak/week.4 +mv /mnt/docbak/week.3 /mnt/docbak/week.4 +mv /mnt/docbak/week.2 /mnt/docbak/week.3 +mv /mnt/docbak/week.1 /mnt/docbak/week.2 +mv /mnt/docbak/week.0 /mnt/docbak/week.1 +rsync -avvz /mnt/storage/documents/ \ +--delete-after \ +--exclude-from '/home/lxf/.rsync-exclude' \ +--link-dest=/mnt/docbak/week.1 \ + /mnt/docbak/week.0/ diff --git a/bin/bak-sites.sh b/bin/bak-sites.sh new file mode 100755 index 0000000..dba0fbe --- /dev/null +++ b/bin/bak-sites.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# ---------------------------------------------------------------------- +# rotating-filesystem-snapshot utility +# essentially, rotate baksites-snapshots of /home +# on a weekly basis using rsync and cron +# ---------------------------------------------------------------------- + + +rm -rf /mnt/baksites/week.4 +mv /mnt/baksites/week.3 /mnt/baksites/week.4 +mv /mnt/baksites/week.2 /mnt/baksites/week.3 +mv /mnt/baksites/week.1 /mnt/baksites/week.2 +mv /mnt/baksites/week.0 /mnt/baksites/week.1 +rsync -avvz ~/sites/ \ +--copy-links \ +--include="luxagraf" \ +--exclude="*" \ +--delete-after \ +--exclude-from '/home/lxf/.rsync-exclude-sites' \ +--link-dest=/mnt/baksites/week.1 \ + /mnt/baksites/week.0/ |