tatic blog generator. Super simple. Nothing fancy, just a list of links and short notes.
Publish via shell or email to collect and share links with a short text.
It takes less than 30 seconds to publish a new entry via terminal:
Generated Website:
Entries are grouped by the date of its import. Each entry has 3 features
- URL
- title
- tag(s)
An entry consists of only one link. The text of this link is the title.
It is possible to extend the features via modules (or translators) Modules:
translator_youtube
This module translates youtube urls to embedded youtube videos. When this module is active all imported youtube urls are shown as embedded videos.
These instructions will guide you though installing your own blog. It is at a vry young age, so please expect undocumented parts.
Software needed
- xmlstarlet
sudo apt-get install xmlstarlet
- sed
usually installed
- xml_grep, (included in xml-coreutils)
Please see: [http://xml-coreutils.sourceforge.net/] instructions will follow.
Download the branch master
to your webserver.
It doesn't need to be in the webserver's folder. ~/bin/
could be a possible path. You need to be able to execute the scripts - chmod
them to your needs.
Copy config/config_template.conf
to config/config.conf
and change the first lines accordingly(follow instructions in the file).
Run install.sh
. It will create required folders.
It's possible that you still have to chown the files in your webserver folder to e.g. www-data in order to publish it.
To publish an entry just run input_entry.sh
.
The script asks for URL
, Text
and Tag(s)
.
Please seperate tags with ,
.
Hit to publish the entry!
It is possible to import entries through RSS. E-Mail import is currently done by a external service like zappier - the service scrapes an known inbox and generates an RSS feed. This feed is scraped by mail.sh
and is generating entries out of the feed.
The usag is simple
E-Mail subject
= Entry titleE-Mail body
= Entry URL- Tags are not supported yet
Zappier generates an ID per email. This ID is stored in config/ids.txt
and checked in the import script. Entries are grouped by the date the script is triggered.
After import the script generates a new index.html
itself.
Setup Zappier
…todo
Config URL
add url to mail.sh
To autoimport entries via RSS just add mail.sh to your crontab.
In Terminal: crontab -e
Add line: * * * * * cd "ADD-INSTALL-PATH-HERE" && ./mail.sh >> ./temp/cronlog.txt
This will run the import every minute. See e.g. crontab.guru for different settings.
The script loggs to /temp/cronlog.txt.
A simple menu is generated by scraping the files in $html_path/config/menu/link/
To add a link, just place one file per link to the link
folder.
File-name = Text in menu
File-content = URL (including "http://"!)
E.g.:
File-name = google
File-content = http://www.google.de
There are no automated tests. Run input_entry.sh
(for manually importing a new entry) or mail.sh
(for importing via RSS) after changing the code. Both scripts run beitraggenerieren.sh
and generate_index.sh
after importing new entries.
When testing mail.sh
make sure you delete email IDs in ids.txt
to use the same test-mails again.
The test succeeded when
- the entry is imported in
/html/entries/
, - the entry is in ``ìndex.html```
- all parts of the entry are as they should be (url clickable, text and tag are presend)
I have not yet thought about others contributing to the project. We'll figure it out as soon as someone is interested in contributing(please file an issue or contact me via twitter).
See the code at https://github.com/6uhrmittag/bashblog.
See the code live at blog.slashlog.org.
- Marvin Heimbrodt - Initial work - @6uhrmittag