Changed markit to buku in code.

Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
This commit is contained in:
Arun Prakash Jana 2015-12-20 01:46:24 +05:30
parent 562b95d72a
commit 70a765f215
2 changed files with 19 additions and 19 deletions

View File

@ -3,7 +3,7 @@
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man/man1
DOCDIR=$(PREFIX)/share/doc/markit
DOCDIR=$(PREFIX)/share/doc/buku
UNAME_S:=$(shell uname -s)
@ -13,20 +13,20 @@ install:
install -m755 -d $(BINDIR)
install -m755 -d $(MANDIR)
install -m755 -d $(DOCDIR)
gzip -c markit.1 > markit.1.gz
gzip -c buku.1 > buku.1.gz
@if [ "$(UNAME_S)" = "Linux" ]; then\
install -m755 -t $(BINDIR) markit; \
install -m644 -t $(MANDIR) markit.1.gz; \
install -m755 -t $(BINDIR) buku; \
install -m644 -t $(MANDIR) buku.1.gz; \
install -m644 -t $(DOCDIR) README.md; \
fi
@if [ "$(UNAME_S)" = "Darwin" ]; then\
install -m755 markit $(BINDIR); \
install -m644 markit.1.gz $(MANDIR); \
install -m755 buku $(BINDIR); \
install -m644 buku.1.gz $(MANDIR); \
install -m644 README.md $(DOCDIR); \
fi
rm -f markit.1.gz
rm -f buku.1.gz
uninstall:
rm -f $(BINDIR)/markit
rm -f $(MANDIR)/markit.1.gz
rm -f $(BINDIR)/buku
rm -f $(MANDIR)/buku.1.gz
rm -rf $(DOCDIR)

20
markit
View File

@ -15,7 +15,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with markit. If not, see <http://www.gnu.org/licenses/>.
# along with buku. If not, see <http://www.gnu.org/licenses/>.
import sys
import os
@ -62,9 +62,9 @@ refresh = False
# Show usage of markit and exit
# Show usage of buku and exit
def usage():
print("Usage: markit [OPTIONS] KEYWORDS...")
print("Usage: buku [OPTIONS] KEYWORDS...")
print("Bookmark manager. Your private Google.\n")
print("Options")
print(" -a URL tag 1, tag 2, ... add URL as bookmark with comma separated tags")
@ -84,12 +84,12 @@ def usage():
print(" -x N works with -P, N=1: show only URL, N=2: show URL and tag")
print(" -z show debug information")
print(" you can either add or update or delete in one instance")
print(" any other option shows help and exits markit\n")
print(" any other option shows help and exits buku\n")
print("Keys")
print(" 1-N open Nth search result in browser. Enter exits markit.\n")
print(" 1-N open Nth search result in browser. Enter exits buku.\n")
print("Version 1.5")
print("Copyright (C) 2015 Arun Prakash Jana <engineerarun@gmail.com>")
print("Webpage: https://github.com/jarun/markit")
print("Webpage: https://github.com/jarun/buku")
sys.exit(1)
@ -97,7 +97,7 @@ def usage():
# Initialize the database connection
# Create bookmarks table is not existing
def initdb():
dbpath = os.path.join(os.environ.get('HOME'), '.cache', 'markit')
dbpath = os.path.join(os.environ.get('HOME'), '.cache', 'buku')
if not os.path.exists(dbpath):
os.makedirs(dbpath)
@ -472,7 +472,7 @@ def get_filehash(filepath):
# Encrypt the bookmarks database file
def encrypt_file():
dbpath = os.path.join(os.environ.get('HOME'), '.cache', 'markit', 'bookmarks.db')
dbpath = os.path.join(os.environ.get('HOME'), '.cache', 'buku', 'bookmarks.db')
if not os.path.exists(dbpath):
print("%s missing. Already encrypted?" % dbpath)
sys.exit(1)
@ -523,7 +523,7 @@ def encrypt_file():
# Decrypt the bookmarks database file
def decrypt_file():
dbpath = os.path.join(os.environ.get('HOME'), '.cache', 'markit', 'bookmarks.db')
dbpath = os.path.join(os.environ.get('HOME'), '.cache', 'buku', 'bookmarks.db')
encpath = dbpath + '.enc'
if not os.path.exists(encpath):
print("Error: %s missing" % encpath)
@ -689,7 +689,7 @@ try:
elif opt[0] == "-z":
debug = True
except GetoptError as e:
print("markit:", e)
print("buku:", e)
sys.exit(1)
# Initilize the database and get handles