Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Commit

Permalink
Merge pull request tj#23 from Flyounet/master
Browse files Browse the repository at this point in the history
Publish v0.6.6.
  • Loading branch information
Flyounet authored Jun 22, 2016
2 parents d0bdaaf + 9cd68c0 commit 28b78c7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
accelerator, tags, Screenshots, configuration file, backup, and also
generate a HTML file with bookmarks and Screenshots.

**/!\ : version prior to v0.6.6 had a bug when deleting. Don't use the delete function or update !**
If you upgrade from a version prior to v0.6.0, read at the end.

![](http://cl.ly/FREx/Screen%20Shot%202012-03-29%20at%2011.15.14%20PM.png)
Expand Down
41 changes: 23 additions & 18 deletions bm
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,22 @@ config() {
#echo "Reading Configuration..." >&2
[[ "${__w:=$HOME}" != "${HOME}" ]] && echo "Working dir changed to ${__w}"
[[ "${__w: -1}" != '/' ]] && __w="${__w//\/\//\/}/"
# If a config file is given, we take it first, or look for a default config file
export _BM_CONFIG_FILE="${__w}${_BM_DEFAULT_CONFIG_FILENAME}"
if [ "$(uname -s)" = 'Linux' -a -f "$(readlink -m "${1:-}" 2>/dev/null)" ]; then
export _BM_CONFIG_FILE="${1}"
. "${1}"
elif [ -e "${1}" ]; then
export _BM_CONFIG_FILE="${1}"
. "${1}"
elif [ ${__n:=0} -eq 0 -a -f "${__w}${_BM_DEFAULT_CONFIG_FILENAME}" ]; then
. "${__w}${_BM_DEFAULT_CONFIG_FILENAME}"
#echo "Default config file loaded ${__w}${_BM_DEFAULT_CONFIG_FILENAME}"
if [ ${__B:=0} -eq 0 ]; then
# If a config file is given, we take it first, or look for a default config file
export _BM_CONFIG_FILE="${__w}${_BM_DEFAULT_CONFIG_FILENAME}"
if [ "$(uname -s)" = 'Linux' -a -f "$(readlink -m "${1:-}" 2>/dev/null)" ]; then
export _BM_CONFIG_FILE="${1}"
. "${1}"
elif [ -e "${1}" ]; then
export _BM_CONFIG_FILE="${1}"
. "${1}"
elif [ ${__n:=0} -eq 0 -a -f "${__w}${_BM_DEFAULT_CONFIG_FILENAME}" ]; then
. "${__w}${_BM_DEFAULT_CONFIG_FILENAME}"
#echo "Default config file loaded ${__w}${_BM_DEFAULT_CONFIG_FILENAME}"
fi
else
export _BM_CONFIG_FILE='none'
fi

# _BM_BOOKMARK_FILE : Where is stored the bookmark file
export _BM_BOOKMARK_FILE="${_BM_BOOKMARK_FILE:=${__w}bm.lnk}"

Expand Down Expand Up @@ -155,7 +158,7 @@ slug() {

# version
RELEASE='$Format:%h$'
VERSION='0.6.5'
VERSION='0.6.6'

#
# Output usage info
Expand Down Expand Up @@ -553,8 +556,8 @@ delete_bookmark() {
echo "${_nl}" >> "${_BM_DELETE_FILE}"
fi
[[ ${_BM_DELETE_PICTURE} = true || ${__p:=0} -eq 1 ]] && rm -f -- "${_BM_SCREENSHOT_DIRECTORY}/${_nl%%|*}.png"
_nl="${_nl//\|/\\|}"
sed -i -e '/'"${_nl//\//\\/}"'/d' "${_BM_BOOKMARK_FILE}"
IFS='|' read m d a u T t <<< "${_nl}"
sed -i -e '/^'"${m}.*${u//\//\\/}.*${t//\//\\/}"'$/d' "${_BM_BOOKMARK_FILE}"
done <<< "$(echo -e "${_lines}")"
else
die "You're not allowed to delete entries. Change the _BM_DELETE_ALLOWED to true !"
Expand Down Expand Up @@ -881,13 +884,14 @@ else
# -g generate html file
# -G use this file
# -g -g generate 1 file per tags
# used : Aa-bCcDdE-F-GgHh-i----Ll--NnOoPp-q-rSsTt--Vv-wXxY--z----------
# available : --B------e-f----I-JjKk--Mm------Q-R-----Uu--W----yZ-0123456789
while getopts ":a:A:b:c:d:G:o:P:q:r:s:t:T:w:x:CDEFghHilLnNOpPSvVXYz" option; do
# used : AaBbCcDdE-F-GgHh-i----Ll--NnOoPp-q-rSsTt--Vv-wXxY--z----------
# available : ---------e-f----I-JjKk--Mm------Q-R-----Uu--W----yZ-0123456789
while getopts ":a:A:b:c:d:G:o:P:q:r:s:t:T:w:x:BCDEFghHilLnNOpPSvVXYz" option; do
case ${option} in
a) __a=1; __url="${OPTARG}";; # Add url to bookmark
A) __A="${OPTARG}";; # AcceleratoR
b) __b="${OPTARG}";; # Bookmark file
B) __B=1;; # Don't load the default config file
c) __c="${OPTARG}";; # Config file
C) __C=1;; # Print color table
d) __d=1; __del="${OPTARG}";; # Config file
Expand Down Expand Up @@ -937,6 +941,7 @@ if [ ! -z "${__w:=}" -a ! -d "${__w}" ]; then
fi
# Loading config
config "${__c}"
[[ ! -z "${__b:=}" ]] && export _BM_BOOKMARK_FILE="${__b}"

# Following config, we maybe not have to check the capture tool
[[ ${_BM_CMD_CAPTURE_CHECK} ]] && checkBinaries "${_BM_CMD_CAPTURE}"
Expand Down

0 comments on commit 28b78c7

Please sign in to comment.