Commit Graph

193 Commits

Author SHA1 Message Date
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
Carlos Fenollosa
1929738073 Implement Lex's suggestion 2014-06-06 12:02:08 +02:00
Carlos Fenollosa
d0f7e8eebd New filename filtering 2014-06-05 18:51:28 +02:00
Alexey Shpakovsky
5b71d1e524 add some options regarding filename generation:
* force to lowercase or not
* what symbol to use instead of space
* what symbols to allow in filenames (makes bashblog more utf-8 friendly)
2014-05-25 23:03:14 +02:00
Alexey Shpakovsky
39c4a80cec test markdown before editing *.md files 2014-05-21 20:27:41 +02:00
Carlos Fenollosa
efbb68dfb4 Fixed additional characters in all_tags.html 2014-05-20 10:16:34 +02:00
Carlos Fenollosa
e5b831b375 Typos 2014-05-19 21:08:55 +02:00
Carlos Fenollosa
88cfef4050 Fixed extra './' strings bug introduced in last commit 2014-05-15 14:50:19 +02:00
Carlos Fenollosa
8f4951219e Fixed extra './' strings bug introduced in last commit 2014-05-15 14:39:03 +02:00
nonas
a57aa4fe4e do not iterate over ls output where possible + protection on 'name with dashes becoming options' 2014-05-11 00:18:04 +02:00
Carlos Fenollosa
b044ef73bc Change help to reflect possibility of editing md files 2014-05-09 11:16:01 +02:00
Carlos Fenollosa
dc84ebde19 fix #42 2014-05-07 16:08:55 +02:00
Carlos Fenollosa
236fdae71c Fixed bug with yesterday.tar.gz 2014-03-25 16:08:52 +01:00
Alexey Shpakovsky
599b5a4e58 use *.html file timestamp, even when editing *.md file 2014-03-23 10:22:59 +01:00
Alexey Shpakovsky
49285d02b8 rename *.md file together with *.html
if called like this:
    bb.sh edit -n posted.md
then editing title will rename posted.html to reflect new title.
Now it will rename posted.md, too
2014-03-22 15:51:55 +01:00
Alexey Shpakovsky
f3fa14dc5a edit markdown posts
usage:
  bb.sh edit article.md
to edit previously posted article (for which markdown source was saved),
and repost it (under the same name or not)
2014-03-22 15:45:56 +01:00
Alexey Shpakovsky
7e6816c391 save markdown file 2014-03-22 15:14:01 +01:00
Alexey Shpakovsky
2291238120 preserve backslashes when posting/editing
ask "read" not to process backslash sequences when reading user-edited file
and leave them as is, instead
2014-03-19 23:05:11 +01:00
Aleksei Shpakovskii
daf456b956 Clean up tag links only in "Tags:" line
The bug was that if you decide, for some reason, insert links to tag pages
into text of your article, then after editing this article, the links were
gone. That happened because "tag links cleaning" was too agressive (it was
cleaning tags not only on tag line, but in the whole text)
2014-03-19 18:02:15 +01:00
Alexey Shpakovsky
5cbeaa9ad8 use expr to clean tags RegExp way 2014-03-18 23:50:25 +01:00
Alexey Shpakovsky
1dea4161da delete generated HTML file before generating new one, not at the bottom
Bug was that when confirming "[E]dit again" by providing an empty string,
the file wasn't deleted

we could as well do
if [ "$post_status" != "p" ] && [ "$post_status" != "P" ]
but this way is IMO cleaner
2014-03-18 23:50:25 +01:00
Alexey Shpakovsky
74537033f3 bugfix: keep old page filename in the page's title link to itself
pass proper filename through parse_file to create_html_page

Bug was that when editing with "bb edit page.html" and changing title,
regenerated page.html had <h3><a class="ablack"> linking to newtitle.html
(non-existing file)
2014-03-18 23:50:25 +01:00
Alexey Shpakovsky
99fea81fcb add tabstop to vim modeline 2014-03-18 21:40:50 +01:00
Alexey Shpakovsky
132b51714b Preserve line indentation in HTML file while rebuilding it 2014-03-10 19:50:05 +01:00
Alexey Shpakovsky
eef08c1984 cut on tag pages, too 2014-03-10 19:50:04 +01:00
Alexey Shpakovsky
52f974c606 Make filename generation routine play nice with Russian and Unix 2014-03-10 19:50:04 +01:00
Alexey Shpakovsky
b861d25a3a Keep first backup of this day
it holds the version of the blog which was here "today in the morning".

this is useful for those who, like me, first do "bb.sh rebuild" few times
before realizing "oh damn I screwed up everything".

Note: you are not expected to screw up on midnight.
2014-03-10 19:50:03 +01:00
Alexey Shpakovsky
a8b9b02801 add vim modeline 2014-03-10 19:50:03 +01:00
Alexey Shpakovsky
0fc7058ae7 make CSS generation optional 2014-03-10 19:50:02 +01:00
Alexey Shpakovsky
abf6101439 Make inclusion of CSS files configurable 2014-03-10 19:50:01 +01:00
Carlos Fenollosa
2a02c34429 fixed touch on BSD utils 2014-03-10 19:18:14 +01:00
Alexey Shpakovsky
74c40baf64 add options to edit command 2014-03-10 09:26:41 +01:00
Alexey Shpakovsky
b3ea05ecd0 keep .html extension when editing
(to make synthax highlight work)
2014-03-10 09:26:20 +01:00
Alexey Shpakovsky
175810b7a3 preserve date when editing post
pass it through parse_file to create_html_page
2014-03-10 09:22:20 +01:00
Alexey Shpakovsky
773c5fa363 add options to bring back old behavior and keep old filename 2014-03-10 09:22:20 +01:00
Alexey Shpakovsky
b365aec797 show only text content in the editor 2014-03-10 09:22:19 +01:00
Alexey Shpakovsky
699ecc6005 move tag parsing to parse_file 2014-03-10 09:22:19 +01:00
Alexey Shpakovsky
8f5c7b4a27 make cutting optional 2014-03-01 10:09:34 +01:00
Alexey Shpakovsky
652e5f8053 make cut_line confugurable 2014-03-01 10:05:48 +01:00
Alexey Shpakovsky
ff36737c12 get_post_title in make_rss(), too 2014-03-01 09:59:18 +01:00
Alexey Shpakovsky
cf6bdb027b "Read more..." link for articles which were cut 2014-03-01 09:59:17 +01:00
Alexey Shpakovsky
7e7d1a8688 cut text (leave up to "<!-- text cut -->") in index and RSS
note that when requested to cut entry, it keeps stuff between text end and
entry end, so twitter button will still find its way into RSS feed

also fix indentation
2014-03-01 09:59:17 +01:00
Alexey Shpakovsky
c581392bd4 use get_html_file_content while building index and RSS 2014-03-01 09:59:17 +01:00
Alexey Shpakovsky
b6f4e1e892 Move text and title extraction to separate functions 2014-03-01 09:59:17 +01:00
Alexey Shpakovsky
cec0baebf8 Make tags more international 2014-02-27 21:28:20 +01:00
Carlos Fenollosa
484f585cba Rewording of usage() 2014-02-27 18:14:14 +01:00
Carlos Fenollosa
430eb996cc all_tags needs to be called after rebuild_tags 2014-02-27 18:11:47 +01:00
Carlos Fenollosa
8b5ed42a2a New "all tags" index page 2014-02-27 18:07:01 +01:00
Carlos Fenollosa
948150ed92 Added tag support 2014-02-27 16:46:37 +01:00
Carlos Fenollosa
7476780742 Refactored get_post_title and is_boilerplate_file 2014-02-27 13:59:56 +01:00
Carlos Fenollosa
a0fbc15f7f update author name 2014-02-27 10:24:54 +01:00
Carlos Fenollosa
44a14fbe05 changed author email 2014-02-27 10:24:20 +01:00
Alexey Shpakovsky
d850e6d9d4 fix date format in output of "bb.sh list" 2014-02-26 19:58:15 +01:00
Alexey Shpakovsky
9ee8c6ae65 Update copyright year 2014-02-26 19:25:02 +01:00
Aleksei Shpakovskii
0c2c0dca7c Use relative URLs for links between pages
Since the blog is just a folder, and all entries are just files,
we don't have to use $global_url when linking between them.
2014-02-24 20:46:54 +01:00
Aleksei Shpakovskii
1c4469005b use template for all_posts.html page title 2014-02-24 18:05:55 +01:00
Carlos Fenollosa
549805d9e3 Merge branch 'master' of github.com:cfenollosa/bashblog 2014-02-18 17:35:31 +01:00
Carlos Fenollosa
6da22dcf21 Support for other Analytics code 2014-02-18 17:34:41 +01:00
Matt Traudt
b2b87e584c Added a comment 2014-02-12 20:45:39 -06:00
Matt Traudt
c1a400a368 Fixed title of page as well 2014-02-12 20:37:45 -06:00
Matt Traudt
64825ef6f7 Possible fix for extra brackets 2014-02-12 20:25:47 -06:00
Carlos Fenollosa
72b32a918f Merge branch 'master' of github.com:carlesfe/bashblog 2014-02-11 11:14:40 +01:00
Carlos Fenollosa
04bba75ce5 Removed echo 2014-02-11 11:14:31 +01:00
Carlos Fenollosa
4aaae26e92 Merge pull request #21 from Datyedyeguy/SkipFooterHeaderDuringRebuild
Don't process header/footer files as blog entries
2014-02-04 05:54:04 -08:00
Hans Brigman
f05f1e8340 Don't process header/footer files as blog entries
rebuild_all_entries wasn't checking if the file in question being
processed was a header or footer file that could be specified in the
configuration.  Now it checks and skips them if they exist [like the
index and archive file(s)].
2014-02-03 21:59:36 -05:00
Hans Brigman
96e26b5aa0 Stop Disqus "Comemnts?" link with no username
The twitter() method wasn't checking for an empty string for
global_disqus_username, so it would always generate the anchor tag for
the Disqus comments, even if global_disqus_username was an empty
string.  Now the '-z' flag has been added to check for the empty string
correctly.
2014-02-03 20:10:00 -05:00
Carles Fenollosa
b004cdbcd8 Fixed bug when $body_begin_file was empty
Added extra line in the footer linking to the github project
2014-01-17 10:03:07 +01:00
Carlos Fenollosa
57f5ef7694 Fixed bug in BSD date 2014-01-09 20:19:46 +01:00
Carlos Fenollosa
6c0dc4de48 Allow personalized header/footer files 2014-01-09 20:02:54 +01:00
Carlos Fenollosa
8285873bc7 Allow personalized header/footer files 2014-01-09 19:50:27 +01:00
djura-san
4bf7871d79 added check for "diff" since that tool is not part of the core utils therefore it may not be present on all machines 2013-12-24 15:12:58 +01:00
Carlos Fenollosa
5e14442cc7 Fixed bug in markdown detection 2013-12-23 21:09:22 +01:00