Commit Graph

205 Commits

Author SHA1 Message Date
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
Carlos Fenollosa
9f07bdbc3d Extended the Markdown support info 2013-12-23 21:01:01 +01:00
Carlos Fenollosa
2559651d6e Added markdown support, full support for BSD 'date' (i.e. OSX) 2013-12-23 20:49:31 +01:00
Carlos Fenollosa
fcfb23626e Removed duplicate license 2013-12-14 18:41:26 +01:00
Carlos Fenollosa
70e59269ce Licensed by GPL v3. Closes #18 2013-12-11 10:37:33 +01:00
Carles Fenollosa
ea176b82b7 Fixed bug in Twitter localization 2013-09-26 11:42:03 +02:00
Carles Fenollosa
9e0b255201 Forgot to change version number 2013-09-26 11:38:55 +02:00
Carles Fenollosa
f06d299749 Fixed a bug in localized dates 2013-09-26 11:29:03 +02:00
Carlos Fenollosa
251e968314 Now supporting BSD date 2013-06-12 23:18:58 +02:00
Carlos Fenollosa
dee648833e Merge pull request #15 from subtleq/master
Potential Fix For Issue #3
2013-06-12 14:17:07 -07:00
djura-san
84168e24d4 Corrected contributor name 2013-06-11 02:55:12 +02:00
subtleq
4ea22be412 Fix For "BSD 'date' does not have the -R option"
modified date calls on lines 514, 515, 531, and 628 to use
+"%a, %d %b %Y %H:%M:%S %z"
in place of
-R
for compatibility with BSD systems.

This commit has not been tested, but should work.
2013-06-06 18:01:22 -06:00
Carles Fenollosa
68b7f58a3a Updated contributors 2013-06-05 12:39:52 +02:00
Carles Fenollosa
2b8b2cce89 Modified some functions to adjust to the default code style
Configuration in bb.sh is loaded and then overriden by .config
2013-06-05 12:36:47 +02:00
Carlos Bautista
5e4215eecf Updated comments 2013-04-09 19:48:57 +02:00
Carlos Bautista
35e5843273 date: changed %k switch to %H.
The former inserts padding spaces when hour is under 10
2013-04-09 17:53:38 +02:00
Carlos Bautista
5ff62fefe9 Fixed use of date() function 2013-04-09 17:25:35 +02:00
Carlos Bautista
7c9d9c655f Fixed detection of GNU date so it works on Linux 2013-04-09 17:09:23 +02:00
Carlos Bautista
2ca8e59bd0 Configuration settings for disqus variables 2013-04-02 23:35:33 +02:00
Carlos Bautista
cb5e388f1e Added disqus support 2013-04-02 16:52:11 +02:00
Carlos Bautista
cae7d16376 Reverted date commands to GNU Date commands
Added detection of date version. Tries to use gdate
2013-04-02 16:40:10 +02:00
Carlos Bautista
4f2e022471 Merge branch 'master' of github.com:carlosbm/bashblog 2013-04-02 14:37:08 +02:00
Carlos Bautista
d3b8de1856 Merge remote-tracking branch 'cfenollosa/master' 2013-04-02 14:36:01 +02:00
dasistdaniel
853b56bf30 bugfixes
New Twitter Comment Template
"View more Posts" Template Fix
2013-03-29 08:17:35 +01:00
Carlos Bautista
cccb1547c9 Added config file support and check for files existing prior to backup 2013-03-13 14:48:44 +01:00
Carlos Fenollosa
09be7f7d90 Merge branch 'master' of github.com:carlesfe/bashblog
Conflicts:
	bb.sh
2013-03-13 09:18:59 +01:00
Carlos Fenollosa
7b83de54e1 Fixed functions which required the presence of any html files (tar, rm,
etc). Closes #8, thanks to Newky for the report.
2013-03-13 09:16:44 +01:00
Carlos Bautista
ed14c775e3 Merge remote-tracking branch 'cfenollosa/master' 2013-03-08 00:00:40 +01:00
Carlos Bautista
2abc806834 Changed 'date' calls so they work now on BSD Systems
(Lost locale date translation on the way :( )
2013-03-07 23:30:32 +01:00
Carlos Fenollosa
28aa6a7842 Unquoted rm parameters 2013-03-07 22:29:18 +01:00
Carlos Fenollosa
21fac7e7a0 Merge pull request #7 from pborreli/typos
Fixed typos
2013-03-07 13:10:21 -08:00
Pascal Borreli
6aa041af5e Fixed typos 2013-03-07 20:51:54 +00:00
Julian Gruber
747c0855ee removed superfluous comment 2013-03-07 20:34:28 +01:00
Carlos Fenollosa
9710192b70 Fixes #4 2013-03-07 19:56:04 +01:00
Carlos Fenollosa
0878f6ccc3 Some bugfixes 2013-03-07 19:30:59 +01:00
Carlos Fenollosa
1c56eba533 Fixed a bug with edit 2013-03-07 18:54:33 +01:00
Carlos Fenollosa
341894348f Reset templates 2013-02-21 17:26:10 +01:00
Carlos Fenollosa
1ff26d166b Fixed rss name 2013-02-21 17:16:11 +01:00
Carlos Fenollosa
08b0bc6846 Fixed bugs in date handling 2013-02-21 17:11:09 +01:00
Carlos Fenollosa
cefc5dad1e Flexibility on the dates 2013-02-21 17:06:02 +01:00
Carlos Fenollosa
db1f2111ec Fixed comments 2013-02-21 16:58:05 +01:00
Carlos Fenollosa
2b1ca037e6 My information for the blog 2013-02-21 16:40:34 +01:00
Carlos Fenollosa
a34c879cac Added Durad version. Modified README 2013-02-21 16:37:55 +01:00
Carlos Fenollosa
ca3cb41679 Added the script and modified the README 2013-02-21 15:59:44 +01:00