makeblog - makes good local homepage for your browser too...

Word processors, spreadsheets, presentations, translation, etc.
Post Reply
Message
Author
wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

makeblog - makes good local homepage for your browser too...

#1 Post by wiak »

Tip: makeblog is also useful as a note-keeping system whether you published the resulting blog pages online or not. Can also help organise your local documents since you can include links in any blog post to where any document (or photo or video or folder) is stored. You can of course easily also insert images (including animated gifs) in your blog post notes. Quick example showing cut and paste note into makeblog/bashblog: http://www.murga-linux.com/puppy/viewto ... 716#973716

A list of usage TIPS, including how to embed youtube videos in the created blog, can be found in the fourth post on this thread, here:

http://www.murga-linux.com/puppy/viewto ... 625#973625

## Program: makeblog by wiak (of murga-linux puppy forum)
# version: 0.0.1
## Description:
# Makeblog is modified fork of makepup that uses underlying bashblog engine rather than woof-CE scripts (note that other than as a gui/frontend methodology, makeblog has nothing to do with woof-CE though).
# Like makepup, it used sed methods to dynamically modify the operation of the underlying engine script,
# but without in-place altering the underlying original bashblog program itself.
# The resulting frontend, provides: gui (optional),
# more efficient tag page handling,
# optional removal of DATE and/or AUTHOR from the blog posts,
# and allows (optional) WYSIWYG html editor to be
# used for bashblog post -html or edit functions
## Usage:
# As with makepup, simply place script in any empty directory, make it executable with chmod +x makeblog, and run it... (e.g. ./makeblog -g)

After first run of makeblog a .config file is automatically stored in same directory as the program, which you can edit with your own name, email etc for the blog presentation

# Once the any post has been made you can view your locally created blog by clicking on the index.html file.
## Requirements:
# Currently requires GNU sed (since using sed -i).
# To use the optional gui, currently needs gtkdialog (as in DebianDogs and Puppy Linux).
# If not on your system, a deb package of gtkdialog suitable for Debian or Ubuntu systems is available here:
# 32bit: https://github.com/DebianDog/xenialdog/ ... 1_i386.deb
# 64bit: https://github.com/DebianDog/xenialdog/ ... _amd64.deb

Bluegriffon: If you want a nice makeblog-compatible wysiwyg html editor (rather than simply using text editor like geany), I recommend older bluegriffon version 1.7.2 (provides functionality no longer free in currrent bluegriffon). For that I used download locaton:

http://trac.lliurex.net/xenial/export/7 ... 86.tar.bz2

or for 64bit version:

http://trac.lliurex.net/xenial/export/7 ... 64.tar.bz2

To install this bluegriffon, simply untar its files into an empty directory (e.g. on /mnt/home), or use xarchiver to do so, and make symlink from /usr/bin (or /usr/local/bin) to its bluegriffon executable so that will be found in your PATH. For example:

Code: Select all

ln -s <bluegriffon_extract_folder>/bluegriffon /usr/bin/bluegriffon

NOTE WELL: Bluegriffon is executed (e.g. via above symlink) with the command bluegriffon and NOT bluegriffon-bin (or it won't find some of its included libs)

You can find some documentation/tutorial for that bluegriffon version here:

https://www.thesitewizard.com/bluegriff ... al-1.shtml
--------------------------

Details about bashblog itself:

# BashBlog, a simple blog system written in a single bash script [around a thousand line of code and whole blog stored simply in single directory]
# (C) Carlos Fenollosa <carlos.fenollosa@gmail.com>, 2011-2016 and contributors

https://github.com/carlesfe/bashblog/contributors

https://github.com/cfenollosa/bashblog

Some time ago, BarryK started a thread about bashblog here: http://www.murga-linux.com/puppy/viewtopic.php?t=111377
However his fork of bashblog, "shellCMS", deviates significantly from the original, and I get the impression that thread is intended to be about shellCMS from now on(?): http://bkhome.org/shellcms/bashblog-for ... llcms.html

Since shellCMS is a fork of bashblog, I expect makeblog could be easily modified to provide a gui for that.
--------------------------

More details of makeblog, bashblog, and some alternatives can be found in the post below:

http://www.murga-linux.com/puppy/viewto ... 623#973623

Like Makepup, Makeblog should be downloaded into an empty directory where you wish to create your blog locally, made executable with chmod +x makeblog and run from either the commandline or via its provided gui.

To run with gui, simply open a terminal and enter:

Code: Select all

./makeblog -g
makeblog automatically downloads bashblog if it doesn't already exist in the directory.

For options and usage help, either chose function 'usage' from makeblog gui bashblog function drop-down list or at terminal enter:

Code: Select all

./makeblog -u (or --usage)
----------------

NOTES:

1. makeblog has bashblog as its dependency. However, there is no need to manually download bashblog. Just as makepup automatically downloads woof-CE if it needs to, makeblog automatically downloads a copy of bashblog into the same directory if bashblog script is not already present. So nothing extra to do - just press "Do it!" button to create your first blog post on local copy in that same directory (no filename should be given - makeblog/bashblog uses the title of the blog to generate the post name). Once post is generated simply click on index.html to view what it all looks like and then add more posts or edit existing ones or use some of the other many commands provided.

2. To post the blog online you just need to send the whole directory contents up to the www home directory of where you want your blog to be. That's generally a simple matter of logging into your prepared site and using ftp, or drag-and-drop, or rsync, or git (which I recommend since github provides free space for yourusername.github.io website).

The third post in this thread details how to use github (I'll probably write a tiny separate script to automate that process for posting up to github later, but it is trivial matter):

http://www.murga-linux.com/puppy/viewto ... 624#973624

If you have ssh access to some other web-hosting site, it is common practice to use rsync. For how to do that, see, for example:

https://coderwall.com/p/moabdw/using-rs ... er-command
------------------------

There is a lot of extra/modified functionality/operation that can still be added to makeblog/bashblog combination, so consider this just a start. I haven't seen any new development at github bashblog itself for many months but hopefully it is still actively being monitored and maintained in which case some of makeblog internals might end up useful in bashblog itself (though I'm currently using GNU sed specific commands, which I'd need to change since bashblog is required to work on Mac OSX and BSD as well, without requiring GNU utilities - I need to do some work on these changes for Mac OSX etc but I'm not very familiar with the sed available there.

I'll probably add some further gui elements for rss or twitter comment setup, but later...

wiak
Attachments
makeblog.tar
Just remove the dummy tar and follow the instructions above
(25.08 KiB) Downloaded 301 times
makeblog_basic_settings.jpg
makeblog screenshot
(41.05 KiB) Downloaded 755 times
Last edited by wiak on Sun 10 Mar 2019, 23:05, edited 18 times in total.

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#2 Post by wiak »

For makeblog, I chose to use pristine bashblog as the underlying blog engine, but to modify some of its run-time functions on the fly, using streaming text ediitor sed in makepup style. Aside from the fact that for my own needs the simplicity of bashblog is good, and I like everything being in one directory, I might want to push some of my bashblog code extensions to the bashblog github site and hence my desire to maintain compatibility (though I'll have to work on a version that doesn't need GNU sed so will also work on Mac OSX and BSD systems like bashblog itself).


Optional enhancements provided to bashblog by makeblog:

1. The main limitation of bashblog, from my point of view in terms of blogging needs, is that the tag_summary_pages.html created by standard bashblog include the whole content of all the posts for the related tag. Since the posts themselves could be large, and the number of posts with a specific tag numerous, the result is that these tag_pages can be huge. In makeblog, however, by default, I arrange for bashblog to only store links to the relevant-tag posts in the tag_summary pages, and that scales pretty well for my needs. That tag_summary_page option is the most complex part of makeblog's code - it is ON by default, but original bashblog full-post tag_page behaviour can still be used as an alternative by unclicking the checkbox under Advanced tag (or use makeblog without gui via commandline with option -T or --TAGLINES, which restores old bashblog full-posts method).

2. The second most important extra feature makeblog provides on top of bashblog is the capability to remove the date and/or author from the blog subtite headings (by default these are left checked ON).

3. Ability to add "Back to Index" link to any post being generated (best unchecked prior to editing existing post though, or you will end up with two Back to Index links (easily re-edited out though, if you forget...).

4. Personally, I have always preferred to use a simple text editor when creating any kind of html page (and continue to do so). However, it was an 'almost' trivial matter to arrange for a WYSIWYG html editor, such as bluegriffon (my favourite, if I'm using such), to be used instead alongside makeblog/bashblog. The only issue is that after loading your desired html body code into a wysiwyg editor, rather than a simple text editor, the wysiwyg editor generally only saves full html pages. i.e. it appends <html><head> sections, for example, onto the html body content, which bashblog doesn't need or want.

The most reliable way of coding out these unwanted html header additions would be to use a proper html parser, but since many systems won't have a commandline html parser pre-installed and since bashblog itself uses sed to parse/modify html code, sed is used again. Problem with using sed is that whitespace is irrelevant in html code and there is no guarantee a wysiwyg html editor will not output what were single text lines onto several text lines, or split separate text lines onto one line or more (even the whole html page output as one line...!). For makeblog sed html body content extraction to work with most of these possible cases it has been made a requirement that the body title is surrounded in <h3> tags (and, as in bashblog itself, should be first line in the html body content), since that simple marker is used to indicate where the title is (and where the body content begins) - the carefully crafted sed commands supplied by makeblog seem to successfully parse out the body text again even when on one big line... so hopefully enough even without proper html parser being used.

Note that BarryK also provided capability to use wysiwyg editor (aiming at seamonkey-composer) in shellCMS, though makeblog itself shares no code with shellCMS and the sed html header extraction lines used in makeblog are my own.

wiak
Last edited by wiak on Wed 08 Nov 2017, 01:58, edited 1 time in total.

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#3 Post by wiak »

Using makeblog/bashblog to create a personal blog at free github site:

Note that most of the following info applies even if you wish to use an alternative to makeblog/bashblog. I plan to make a small script to automate the following, but not sure when I'll get round to that basically easy task since too busy working on makeblog itself at the moment.
-------------------------------------------

More information about creating a github webpage can be found at: http://pages.github.com

Once you have created a GitHub login account (including a primary email and username you will be known by there) you can create a website for your user name there using the following steps:


1. Create a new repository called: yourusername.github.io
(simply creating the repository is enough - you don't need to create README.md and so on if you don't want to at this stage)

2. If you have git client installed on your system, you can now clone the new repository (i.e. make a copy of it on your local computer) by entering the following command(s) in a terminal:

Code: Select all

mkdir -p directory_for_your_cloned_repository (or use your filemanager to create this new directory. I used directory name: wiak_blog)
cd directory_for_your_cloned_repository
git clone https://github.com/yourusername/yourusername.github.io
(of course you need to substitute your own username for both 'yourusername' occurences in this line, or the account won't be found... - for example, I use github username wiake, and after you will be prompted for your github login/password)

Since the initial clone is an empty repository it takes up hardly any space on your system.

Good thing about cloning is you can later publish your locally created website simply using appropriate git push command.

However, you don't need git installed or a clone of your new repository on github if you don't want git push convenience. Instead, you can simply log in to your github account and drag and drop files into the yourusername.github.io repository there via github's web interface.

3. On your local repository clone you now:

cd yourusername.github.io (in my case, I use, cd wiake.github.io to change into that new directory on my local system)

and create your website/blog inside there (index.html and the rest). To do this with makeblog you just need to:

a. copy the makeblog script into your local repository copy of yourusername.github.io repository

b. make sure it is executable or make it so with command:

Code: Select all

chmod +x makeblog
and run it, say in gui mode, with command

Code: Select all

./makepup -g
c. Whilst still inside that yourusername.github.io directory, transfer the website/blog files up to your online version of the repository, by entering the following three commands into your terminal (or write a simple script to do all this if I haven't yet added that facility to makeblog...):

Code: Select all

git config --global user.email "you@example.com" (substitute your own github email rather than you@example.com of course)
git config --global user.name "Your Name" (substitute your own name rather than 'Your Name' of course)
git add --all 
git commit -m "Initial commit"
git push -u origin master
or use:

Code: Select all

git config --global user.email "admin@tinylinux.info" && git config --global user.name "wiake" && git add --all && git commit -m "Initial commit" && git push -u origin master
Alternatively, just create your blog with makeblog in any empty directory on your system and copy the resulting blog files via github webinterface to the online repository version of yourusername.github.io.

wiak
Last edited by wiak on Wed 08 Nov 2017, 01:57, edited 1 time in total.

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

makeblog/bashblog/bluegriffon etc... usage TIPS

#4 Post by wiak »

TIPS

1. Makeblog is also useful as a note-keeping system

Can also help organise your local documents since you can include links in any blog post to where any document (or photo or video or folder) is stored.

2. A page from a blog created on your local system can make a good homepage for your browser

You can, for example, usefully put links to your favourite websites on that, and links to your most important locally or internet-stored documents and/or folders. Being part of the overall blog, such a homepage will include a link back to the overall blog index or to any of the tagged categories.

3. To cancel a post

Once bluegriffon (or geany or whatever editor you are using to create your blog page) has already started, just press ctrl-C in the terminal you started makeblog from.

4. How to Embed a YouTube Video into Your Web Page with BlueGriffon

This works great:

https://www.thesitewizard.com/bluegriff ... ffon.shtml

5. Webpage clipping with the help of cherrytree hierarchical notetaker

Makeblog system doesn't need cherrytree to be installed, but if you happen to have it I find that it can be usefully used to pre-process complex webpage clippings from your browser prior to pasting them into a blog note:

a. Open a new note in cherrytree.

b. Highlight and copy the section of webpage you are interested in from your browser and paste into your empty cherrytree note.

c. Modify the cherrytree note until you have the web clipping exactly as you want it.

d. Highlight the clipping that is now in your cherrytree note and copy it.

e. Make a new post in makeblog and when bluegriffon opens highlight the body text under the main title and paste your cherrytree copied webpage over the top of that.

(Note that murga forum posts do not need pre-processed by cherrytree since they are already simple html which works very well simply by cutting and pasting from your browser straight into your makeblog-used editor. However, more complex webpages are full of javascript and so on, which the above cherrytree copy/paste trick strips out prior to posting into your blog editor).

6. Bluegriffon web tutorials for version 1.x.x and for version 2.x.x:

https://www.thesitewizard.com/bluegriff ... al-1.shtml

https://www.thesitewizard.com/bluegriff ... al-1.shtml

7. Using makeblog to publish a personal blog at github:

http://www.murga-linux.com/puppy/viewto ... 624#973624

MORE TIPS WILL BE ADDED HERE LATER
Last edited by wiak on Fri 10 Nov 2017, 07:17, edited 11 times in total.

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

makeblog release announcement

#5 Post by wiak »

seem to have double-posted by accident...
Last edited by wiak on Sun 10 Mar 2019, 23:18, edited 5 times in total.

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#6 Post by wiak »

Sorry to the one person who had already downloaded makeblog. I had the code opened in my editor and must have accidentally pasted something into it unknowingly such that the no-author checkbox code no longer worked. Found the extra words and removed so hopefully all working now.

See previous post for program release details or first post in this thread for download and further details.

wiak

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#7 Post by BarryK »

Good to see this initiative.

Yeah, I very heavily modified bashblog, to the extent most of the code is different, well, maybe 2/3.

Yes, everything-in-one-directory does not scale well, that was one of the things I changed. But, it is ok for a personal blog.

As you mentioned, the complete posts concatenated together in the tag_* pages, is not satisfactory, I developed fairly simple code to automatically insert a horizontal rule into each post, as bashblog already had the code replace a hr with a link to the full post.

I don't have a gui for shellCMS, but it is on the to-do list.

PPLOG personal blog is in many pups, but no longer works. I have kept it in Quirky, in the hope that it might be fixed sometime.
But, it could be replaced with one of these new initiatives.
[url]https://bkhome.org/news/[/url]

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

BlueGriffon AppImage for Xenialpup64

#8 Post by mikeslr »

Hi wiak,

While reading your post I downloaded BlueGriffon from the link. It would not start under Xenialpup64. ldd reporting something like libxiul.so missing. (Sorry deleted the files before I thought of posting). Couldn't find it either with PPM or google-search. But wondered if there was a functional BlueGriffon.AppImage. There was, and it opens. First time user, so I don't know how functional. But figured others might be interested. It can be found here: https://bintray.com/probono/AppImages/B ... view#files

Thanks for continuing your impressive work.

Edit: 11/09/17 -- Ignore the stuff about BlueGriffon not working. See wiak's reply below, and my response to it.

mikesLr
Last edited by mikeslr on Fri 10 Nov 2017, 02:40, edited 1 time in total.

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

Re: BlueGriffon AppImage for Xenialpup64

#9 Post by wiak »

mikeslr wrote:Hi wiak,

While reading your post I downloaded BlueGriffon from the link. It would not start under Xenialpup64. ldd reporting something like libxiul.so missing. (Sorry deleted the files before I thought of posting).
Hello Mike,

I haven't tried it under Xenialpup64 but it certainly works under XenialDog64 (I'm assuming you downloaded the x86_64 bit bluegriffon version for that OS.

The md5sums are as follows:

33ed2194189b012bb36a02a30aeb52df bluegriffon-1.7.2.Ubuntu13.04.i686.tar.bz2

fbae6365980d87dde5e4ce044d55be38 bluegriffon-1.7.2.Ubuntu13.04.x86_64.tar.bz2

Note that 'ldd bluegriffon-bin' will suggest libs are missing if they are not in the system libpath (same running that on xenialdog64 where three libs are said to be missing). However, libxul.so is actually there inside the bluegriffon folder (just not visible to the system but visible to bluegriffon script, which calls other script run-mozilla.sh to sort things out, but NOT visible to bluegriffon-bin on its own). Sorry, since I don't have xenialpup64 I can't comment more about that.

As for the ver 2.0 bluegriffon you found; may or may not have some of the functionality of 1.7.2 missing (for example, can you colour text (in most recent bluegriffon that facility has become a paid addon).

There is also a bluegriffon ver 1.8 available for 64bit systems. I'll try that on pristine xenialdog64 and if it works I'll add it to the download possibilities.

EDIT: To run bluegriffon in own folder via a terminal, I presume you did so with:

Code: Select all

./bluegriffon
and NOT:

Code: Select all

./bluegriffon-bin
The latter gives error:

Code: Select all

./bluegriffon-bin: error while loading shared libraries: libxul.so: cannot open shared object file: No such file or directory
whereas, as I explain in slightly more detail above, bluegriffon is a script that sorts out where libxul.so is...

wiak

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#10 Post by fredx181 »

Thanks wiak, works nicely!

Tested on Stretch, using bluegriffon (from the link you provided), did similar as you did (copy and paste your post), and added image.
When I edited once again (after first time), the result was double "Back to index" link on the bottom, but found out later when editing, the checkbox "Add back to index link", I think should be unchecked to avoid that.

Now learn some more about what y'all can do with bluegriffon and use the options of your program.

Cheers!

Fred
Attachments
blogtest.png
Test makeblog
(129.26 KiB) Downloaded 589 times

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

The bluegriffon you linked to works in Xenialpup64

#11 Post by mikeslr »

Hi wiak,

Sorry for the distraction. Essentially you were correct. First I ran ldd on the binary; then hoping the absence of libxul.so wasn't fatal, ran ./bluegriffon-bin via terminal. Just running ./bluegriffon from terminal opened bluegriffon.

Thanks for the explanation about libxul.so.

mikesLr

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#12 Post by wiak »

@mike. No problem, Mike, wasn't a distraction. Good to know the potential problem of bluegriffon-bin being run directly, which others might also try if they weren't informed of the problem. Also, good to know of alternative versions of bluegriffon available to try (though I do believe ver 2.x has some functionality removed and only available as paid option now).

wiak

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#13 Post by wiak »

I have now added a TIPS section (post four of the thread) in which I am collecting together some tips for getting the best out of makeblog etc. This includes, for example, how to embed youtube video(s) onto your blog page(s):

http://www.murga-linux.com/puppy/viewto ... 625#973625

EDIT: Bugs: I've noticed a bug with my tag_ pages where sometimes a post link is appearing more than once. Deleting the tag_ pages in the folder followed by a makepup rebuild repairs the error, but that's just a temporary workaround until I fix the code for the next release. Hmmm... failing to get this bug again in tests. If anyone comes across this and can give me example that causes it please let me know - I can't fix it till I can make it re-occur again!

EDIT2: All seems to be fine as long as makeblog is used to do any previous post edits. Editing a post directly with bluegriffon is ending up with major error on makeblog rebuild, so for now, just make sure always to use makeblog to do previous post editing. I'm trying to find why direct edits followed by rebuild isn't possible (in case I can make it possible) - working on that tricky matter now, but I suppose it can't be called a 'bug' since problem only arises when not using makeblog/bashblog to do the editing.

Problems found (code issues are in bashblog not makeblog) - a couple of functions need their awk search regular expressions improved - working now on solution. Only effects -f|--full html edit mode or direct editing of full html posts. Other/main makeblog editing working fine.

wiak

Post Reply