When I discovered MarkDown I was in love, it was very nice to discover an easy, clean, well-thought-out markup language. I wanted a way to be able take my detailed notes, have them easy to read, and then to be able post them here on the blog that would be in a nice WordPress format. Yesterday, I wrote about discovering
pandoc which enables a person to write in markdown and have it converted to HTML. To be able to use the HTML code created by
pandoc in WordPress it needed to be slightly edited and cleaned up. Therefore,… I created a bash script for it.
Example conversion from MarkDown format to WordPress format
It works pretty good. Basically it removes tags for paragraphs (
<p>), cleans up code blocks, improves formating, as well as doing a few other things. I haven’t gone through all permutations that pandoc conversion can do so a few thing swill be left out, but otherwise it should work for most things. If anything needs to be added please let me know.
I’d been looking for a way to convert my notes to webpages. Typically I wrote my notes in
.txt form and then went through them and added links, formatting… when I was ready to blog them. Recently, I had asked StackOverflow if I could convert MediaWiki format to HTML. I’m an Administrator for the Arch Wiki so I’m very familiar writing this format. This is when I learned about
pandoc. Pandoc’s author describes pandoc as, “If you need to convert files from one markup format into another, pandoc is your swiss-army knife…“.
Plain Text Example
I planned to write my notes in mediawiki format and then convert to HTML, however I’d been using StackOverflow lately and started to learn Markdown Prose and really like it. Markdown’s is designed to be easy to write and read: “Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML)“. Markdown is so easy to write that it makes sense that sites like StackOverflow and GitHub are using it.
Markdown, Markup Languange
Pandoc has extended markdown to use code blocks
```, tables, and a few other things and converting is very basic:
pandoc file.md -o file.htm
I’m in love, I’m in love, I’m in love :), as it will save me a good bit of time in editing/creating Documentation. Tomorrow, I’ll post a bash script to clean up the HTML to be able to put it in a WordPress Blog.
Warning: I got the base design from a Google+ website. I’m not sure if these are tradmarked logos and if Google in that case if they will have a problem with them. If they do, they will be removed.
I was hoping to use this for a Gmail notification icon but it didn’t turn out that way. I saw the Gmail icon but I couldn’t find it in scalable form, so I rebuilt it. Turned out pretty good. It’s under the CC license so be free to use it, however if you like to use it in a program please ask me and give attribution. Download.
Gmail – Unread (Symbolic)
Gmail – Read (Symbolic)
I wanted a way to easily download source files for quick editing. Sure
abs and numerous AUR-helpers do it but I wanted a simple all-together program/script that could do it, and it turned out to be pretty easy. I wanted to be able to define the repository, and then the package and I did it!
aur/ can be used here as well as the other repositories. I set up
$XDG_CONFIG_HOME/cower/config to use my pkgbuilds directory
TargetDir = /home/todd/.arch/pkgbuild/aur respectively) so it looks pretty nice:
aur extra own testing
If the repository is wrong it will list the available repositories:
Not a valid repository:
And it’s nice and it’s basic:
I created this because I liked the legacy logo and was inspired by Encelo’s Arch toon logo. It needs help on the gradient. To do a curved gradient, I had to rely on a blur (because Inkscape does not appear to be able to do curved gradients) and it bleeds a bit. But otherwise, I think it turned out pretty good. Under the CC license so be free to do what you want with it.
This one is not as important as the
pacman related script but I find I use it often too. I maintain several packages in the AUR and it comes in handy to quickly refer to common tasks related to
makepkg. The md5sum function still needs a bit of work (i.e. it requires the build function in the PKGBUILD be able to place the md5sums nicely). Otherwise it’s pretty ready. Here’s what it does:
mp <option> - common makepkg building tasks
b - build package (install dependencies if required)
m - update md5sums
r - remove previous build directories
s - create source files for upload, prompts for submission to the AUR
t - create PKGBUILD template
I once saw a wrapper-script for
pacman in the forums that was basically a short-hand version of common
pacman tasks. I thought this was a good idea and over the last couple years, I’ve expanded on it. It does just about everything I need it to. It’s real basic and I call it
arpa. Here is a basic synopsis:
arpa [option] [*package] - a generic package tasks wrapper script
-e, --explicit - install a package as explicit
-g, --get - get/download package upgrade(s) : -G get pkg upgrades all
-i, --install - install a package : -I install as dependency
-l, --list - list package files : -L list pkgs installed
-o, --owns - owning package of a file
-q, --query - query for an installed package : -Q query w/ description
-r, --remove - remove a pkg and its deps : -R force, no argue orphs
-s, --search - search for a package : -S search w/ description
-u, --upgrade - upgrade system : -U upgrade AUR
-y, --sync - sync package db
Good for me to have this around so I can remember everything :), and it is in the AUR.