Martijn Dekker
a0aa994e17
Code cleanups: quoting, redirection, string handling
...
- Fix lots of problems with convoluted and broken quoting techniques.
- Group code blocks for redirection into a file rather than doing a separate additive redirect for each command.
- Replace strings using bash parameter substitution rather than piping 'echo' through 'sed', resulting in a faster script.
2016-01-11 03:30:41 +01:00
Martijn Dekker
ba012c436e
More correct and effective use of arrays
2016-01-11 00:16:50 +01:00
Martijn Dekker
2b24132f3c
Consistent use of [[ and (( instead of [
...
Another minor code cleanup. Within [[ ... ]] and (( ... )) (but not [ ... ]) there is a different shell parsing context in which field splitting (a.k.a. word splitting) and pathname expansion (a.k.a. filename globbing) don't apply, so consistently use '[[' (and '((' for arithmetics) instead of '[' and remove unnecessary quotes.
Since '[[ x == y]]' does 'case'-like glob pattern matching on 'y', the quotes to the right of '==' need to be kept for variables or glob characters, except if a glob pattern is wanted.
2016-01-10 23:17:48 +01:00
Martijn Dekker
f3329f0a82
Remove unnecessary quotes from scalar assignments
...
Substitutions (variables, command substitutions, etc.) directly assigned to a scalar variable don't need to be quoted, as field splitting and globbing don't apply in that context. Removing superfluous quotes makes the code look a bit cleaner.
2016-01-10 19:31:49 +01:00
Carlos
ab91e5dda1
topsy is kill
2015-12-21 19:49:34 +01:00
Carlos
54fdb360ab
Shellcheck. Fix #78
2015-09-23 17:43:44 +02:00
David Mateos
81942377b7
little changes in css to adapt width to screen
...
width in px changed by percentage in main.css and meta tag viewport
added.
2015-09-02 11:30:47 +02:00
Carlos
f90c439814
fixed bug where drafts were appended a random postfix after re-editing
2015-07-11 12:10:25 +02:00
Enneka
ee711aee64
Fixes #70
2015-05-09 18:06:25 -04:00
Carlos Fenollosa
95854e9dfe
Close #72
2015-03-09 11:21:15 +01:00
Carlos Fenollosa
db3f42c417
Fix #71
2015-02-19 09:33:29 +01:00
Carlos Fenollosa
3c39aafe20
fix #59
2014-10-05 18:12:37 +02:00
Carlos Fenollosa
63476204de
properly quote twitter cards
2014-09-15 19:32:51 +02:00
Carlos Fenollosa
adfcd98012
Twitter cards. Fixes #36
2014-09-15 19:23:12 +02:00
Carlos Fenollosa
450ecddfea
changed hardcoded /bin/ paths
2014-09-12 17:00:01 +02:00
Carlos Fenollosa
59c431b974
Close #61 #57
2014-09-01 16:13:06 +02:00
Carlos Fenollosa
a94b2f5d00
fix #65
2014-08-19 12:11:23 +02:00
Carlos Fenollosa
1cd13b0f8c
updated twitter count api
2014-07-18 09:20:44 +02:00
Carlos Fenollosa
95e36a5137
Now the tweet count links to Topsy
2014-07-17 16:47:57 +02:00
Carlos Fenollosa
53e79106f5
Fix for #60
2014-07-11 09:23:57 +02:00
Carlos Fenollosa
f946c98c32
Twitter count now links to search results
2014-07-07 17:23:24 +02:00
Carlos Fenollosa
60bedcaa70
Cookieless twitter option
2014-07-07 17:11:14 +02:00
Carlos Fenollosa
63f17fa9f2
Hide warning message in sed
2014-07-03 16:07:05 +02:00
Carlos Fenollosa
db4eb3c6c2
Sed error on mac
2014-06-30 15:51:14 +02:00
Carlos Fenollosa
07e690b151
Sed error on mac
2014-06-30 15:50:58 +02:00
Carlos Fenollosa
64eae60051
Sed error on mac
2014-06-30 15:43:28 +02:00
Carlos Fenollosa
e43d1e56ea
Sed error on mac
2014-06-30 15:28:51 +02:00
Carlos Fenollosa
ed746d0b0c
Sed error on mac
2014-06-30 15:27:15 +02:00
Carlos Fenollosa
5099d4811b
Fixed #56
2014-06-30 11:45:47 +02:00
Carlos Fenollosa
44ec89ae2c
Manual fix for #54
2014-06-30 09:06:54 +02:00
Alexey Shpakovsky
a5a196773a
suppress error messages and don't enter for loop when no tag files exist
2014-06-28 17:18:24 +02:00
Alexey Shpakovsky
93808a0254
don't invoke sed when no tag given
...
the bug was that sed was expecting file content on stdin when didn't receive
any filename, and script was "frozen" when someone tried to edit a post
without any tags.
2014-06-28 17:17:30 +02:00
Carlos Fenollosa
611bd67bf7
Updated version and contributors
2014-06-27 10:24:02 +02:00
Carlos Fenollosa
0b12c0d69b
Merge pull request #53 from Lex-2008/small-fixes/4
...
Small fixes/4
2014-06-27 10:19:00 +02:00
Carlos Fenollosa
07c7e201dd
Merge pull request #52 from Lex-2008/rebuild-less-tags
...
Rebuild less tags
2014-06-27 10:18:08 +02:00
Alexey Shpakovsky
773bcc1f85
help text
2014-06-26 08:33:01 +02:00
Alexey Shpakovsky
7d67da7b27
use file extension when posting with bb.sh post file.ext
...
but let users override it with `bb.sh post -html file.md`
2014-06-26 08:33:00 +02:00
Alexey Shpakovsky
555db3167f
use markdown by default (if available) when posting with bb.sh post
2014-06-26 08:33:00 +02:00
Alexey Shpakovsky
840d24c4ac
Don't ask for preview - just show URL for preview
2014-06-26 08:33:00 +02:00
Alexey Shpakovsky
0b75439f41
fix typos in comments
2014-06-26 08:22:25 +02:00
Alexey Shpakovsky
ff978ec101
proper check for empty variable
2014-06-26 08:22:07 +02:00
Alexey Shpakovsky
b7cd230ae9
clean_filename in RSS links
2014-06-25 06:42:39 +02:00
Alexey Shpakovsky
e648b82250
don't rebuild tags if they were not involved at all
...
(otherwise posts_with_tags would endlessly freeze)
2014-06-25 06:38:17 +02:00
Alexey Shpakovsky
3c31fd3f60
use new functions
...
also bugfix: leave only unique filenames in rebuild_tags()
2014-06-24 08:01:02 +02:00
Alexey Shpakovsky
4558f43f4a
posts_with_tags() to list all posts referenced by several tag files
2014-06-24 07:16:57 +02:00
Alexey Shpakovsky
a52f2e6758
tags_in_post() to list all tags referenced in one post file
2014-06-24 06:51:27 +02:00
Alexey Shpakovsky
b34c7fbd0f
make rebuild_tags() optionally accept 2 lists (of filenames and tags)
2014-06-24 06:25:55 +02:00
Alexey Shpakovsky
97f413e666
one forgotten translated string template
2014-06-22 08:41:21 +02:00
Alexey Shpakovsky
feb7f415ce
$preview_url for those who writes posts locally before uploading them
2014-06-22 08:26:39 +02:00
Puuhinen
78fc6aacb7
LC_ALL=C for all machine readable date
output
...
The script used to have LC_ALL=$date_locale for all calls to `date`.
However, this is undesirable for when $date_locale is non-English and
dates need to be machine readable, e.g. for `date --date=...` and
when generating RSS feeds.
2014-06-07 19:11:23 +03:00