Commit Graph

216 Commits

Author SHA1 Message Date
creme c4edab040a
change tilde.team to envs.net 2023-03-30 16:26:15 +02:00
creme d1536d0bbf
fix gemini link 2023-03-30 16:20:44 +02:00
creme d676887db7
some small changes for bb 2020-08-10 12:09:01 +02:00
creme ad71aba24e
fix bb.sh 2020-08-09 22:43:40 +02:00
creme 39cb6edf61
Modified gemini to use CGI / Various syntax and style fixes in gopher and gemini routines 2020-05-27 01:21:23 +02:00
creme 226cfe47d5
Merge Version 2.9 from Origin bb
- New feature: provides specific content ONLY on the index file
Add new Version 2.10 from tilde bb
- New feature: gopher and gemini support
2020-05-27 00:46:24 +02:00
creme a6644ffa3c
Merge remote-tracking branch 'upstream/master' 2020-05-27 00:11:10 +02:00
Carlos Fenollosa c126913cdd New feature: provides specific content ONLY on the index file 2020-05-10 16:22:42 +02:00
cremesk 240b017f31
add default config if not exists 2019-09-01 18:32:47 +02:00
cremesk de7c9d73e1
check public blog dir available 2019-09-01 18:32:47 +02:00
cremesk de8e2a8c3e
try some dynamic changes 2019-09-01 18:32:47 +02:00
cremesk 9689aa626c
change bb config params for envs.net 2019-09-01 18:32:46 +02:00
cremesk 3d7050d4d3
remove trailing spaces 2019-09-01 18:32:46 +02:00
Carlos Fenollosa bf676017c4 fixed head before sed 2019-09-01 14:19:21 +02:00
Carlos Fenollosa 89780c3108 Merge pull request #124 from thalios1973/feat/pandoc-test-fix
feat/pandoc-test-fix
2017-01-03 17:11:04 +01:00
Mike Gauthier 272b1b6ab7 Added ability to include custom code just before the </body> tag. body_end_file global config variable added. 2016-12-29 23:36:01 -05:00
Mike Gauthier c9a297c9b1 Added additional check that will allow the use of pandoc without the --strict flag or 'hsmarkdown' hack. 2016-12-29 00:39:28 -05:00
Carlos Fenollosa 500253e2ad Support for static, not managed by bashblog html files. Close #92 2016-10-24 16:23:53 +02:00
Carlos Fenollosa 3c73ef63cd Deleted the now defunct Twitter JSON API for share count. Fix #117 2016-10-24 15:59:28 +02:00
Carlos Fenollosa b5a459022d bump version to 2.8 2016-10-24 15:52:33 +02:00
Carlos Fenollosa 5c8e0e56e1 Revert changes in #116 2016-10-24 15:49:52 +02:00
Carlos Fenollosa c6a9bef803 Revert tag management from #116 2016-10-24 12:02:22 +02:00
Carlos Fenollosa 6222672817 Better error message for $EDITOR. Close #112 2016-10-24 11:41:30 +02:00
Carlos Fenollosa 36d79b5cdd support Markdown.pl in bashblog folder. Close #113 2016-10-24 11:39:29 +02:00
Carlos Fenollosa 7154c0746b Merge pull request #116 from McDutchie/master
More code refactoring. Limit word splitting and disable globbing by default.
2016-10-24 11:29:46 +02:00
Carlos Fenollosa 2157b92166 Slavic language support, thanks to Tomasz Jadowski 2016-10-24 11:16:01 +02:00
Martijn Dekker f50a17cdab tags_in_post(): bugfix for non-GNU 'sed'
The 'sed' script in tags_in_post() used a GNU-specific feature, `\+`.
This became unnecessary anyway after previous edits, so remove it.
Also replace whitespace-comma-whitespace by newline directly instead
of doing an intermediary replace.
2016-09-07 18:27:34 +02:00
Martijn Dekker 2a29b22a7a Fix renaming using 'bb.sh edit -n'. Suppress 'which' errmsg.
edit(): The -n functionality (to rename files according to new title) was
broken. After renaming, files were accessed by the old name and not found,
or empty files were recreated under the old name, or both. Fixes:
- Move 'touch' commands for restoring time stamps to more opportune places.
- When renaming, save old file name to exclude it from $relevant_posts.

global_variables(): suppress GNU 'which' error message on setting markdown_bin.
2016-09-06 08:41:36 +02:00
Martijn Dekker 62a26bb575 Merge remote-tracking branch 'upstream/master'
Resolve minor editing 2.6-to-2.7 editing conflict in bb.sh
2016-09-06 03:45:35 +02:00
Martijn Dekker 54cc0c8060 More code refactoring. Limit word splitting and disable globbing by default.
- Globally, now do word splitting (IFS) only on newline (which also makes
  "$*" expand with newline separator instead of space).

- Disable globbing (pathmame expansion), to be re-enabled locally using
  'set +f' where needed (typically in a subshell).

These changes help eliminate unexpected snags and security vulnerabilities
in case someone forgets to quote a variable somewhere. They should also make
the code "just work" with spaces and other special characters in file names
and tags (as long as they're not newline characters, but that can't happen
with regular use of the script as the newline is the separator). This means
that, as of this change, editing or completely emptying the convert_filename
filter should no longer pose any problems as far as bb.sh is concerned.

The changes to adapt the code to the above are mainly:

- Now that we do word splitting on newline only, we can go back to iterating
  through files in a "for" loop instead of using "read" with a here-document,
  which is more readable. However, to enable globbing locally, a technique
  adaptation is needed, like:
     for file in $(set +f; printf '%s\n' *.html)
  or
     for file in $(set +f; ls -t -- *.html)  # sort by date, newest first
  Given IFS=$'\n' and globbing disabled globally, this technique is robust
  for all special characters in file names except for newlines.

- invoke_editor() function replaces direct $EDITOR calls, because we need to
  locally word-split $EDITOR on spaces in case it contains arguments.

- parse_file(): rewrite tag parsing to handle possible spaces in tags

- tags_in_post(): output line-separated instead of space-separated tags;
  further adjust sed script to handle possible spaces in tags

- rebuild_tags(): this function was refactored to use an array internally.
  Instead of two combined strings, it now takes HTML files and tags as
  separate arguments, separated by a single "--tag" argument. This allows
  for spaces and other special characters in both file names and tags. (See
  also commit a674ec5, which started this but didn't finish it).
2016-09-06 03:24:01 +02:00
Carlos Fenollosa 2b8b02ac58 simplified a couple commands and removed debug echos 2016-04-26 16:29:25 +02:00
Carlos Fenollosa a08f47bb69 Store post dates in html comment. Sync those with filesystem. Closes #96 2016-04-26 16:16:35 +02:00
Carlos Fenollosa 09fa553233 avoid the user mistakingly using 'edit <draft>' instead of 'post <draft>' 2016-04-25 21:14:24 +02:00
Bart 1f4d3dd2bf Added support for images and made author field optional
One LOC per feature, hope you think it's worth it. http://imgur.com/YcBp29ql.png
2016-04-13 01:19:30 +02:00
Martijn Dekker d1a84d6eec Merge remote-tracking branch 'upstream/master' 2016-03-09 05:28:44 +01:00
Martijn Dekker a674ec5837 rebuild_tags(): use array for more robust file handling 2016-03-09 05:26:20 +01:00
Carlos Fenollosa 9ac5989932 Merge branch 'master' of github.com:cfenollosa/bashblog 2016-03-02 20:35:13 +01:00
Carlos Fenollosa b22d968278 'rebuild' now keeps original author. Fixes #99 2016-03-02 20:34:54 +01:00
platschi 10078f28cb remove topsy, their website now gets forwarded to apple support 2016-02-23 16:18:47 -03:00
Carlos Fenollosa 93d6877a38 fix #94 #97 2016-02-08 10:25:43 +01:00
Carlos Fenollosa 93717bc9b8 Merge pull request #87 from McDutchie/master
Some more optimizations
2016-02-08 10:16:38 +01:00
Carlos 7d60c63ec5 fix #85 2016-01-29 15:57:15 +01:00
Martijn Dekker e3cf406bd1 test_markdown() without temporary files
- A much shorter test_markdown() function that compares output directly
  rather than using temp files.
- Revert to using 'which' rather than 'command -v' for using the markdown binary
  because 'command -v' will find the markdown() shell function.
2016-01-19 00:12:53 +01:00
Martijn Dekker 9794f1635a fix unquoted $global_disqus_username that shellcheck.net didn't catch
(it was subject to field splitting and globbing)
2016-01-18 21:35:29 +01:00
Martijn Dekker c3e0572be6 Get rid of a couple of more shellcheck.net warnings. 2016-01-18 21:05:06 +01:00
Martijn Dekker 7771fab820 Some more code and performance optimisations
- Use builtin 'command -v' rather than external 'which'.
- The clean_filename() function just removed the initial ./ from a file
  name; do this with a parameter substitution instead. This gets rid of the
  need to fork subshells for command substitutions, so is much faster.
- Where convenient, replace 'echo ... | sed ...' with fast parameter
  substitutions.
2016-01-18 20:18:23 +01:00
Martijn Dekker c683019d7c XHTML compliance fix: self-close meta tag 2016-01-18 20:08:52 +01:00
Carlos 37bef699bf fixed posts singular/plural 2016-01-14 16:39:56 +01:00
Carlos b71973e683 Added 'tags' command 2016-01-14 16:30:01 +01:00
Carlos dd3c9e171f Changed copyright year and version number 2016-01-14 16:01:22 +01:00