all repos — website @ 96036175549cda9d6a2330dc3cd5cdb315f2f6c1

personal website hosted at prithu.xyz, built using hugo

remove files
Prithu Goswami prithugoswami524@gmail.com
Tue, 28 Apr 2020 17:30:31 +0530
commit

96036175549cda9d6a2330dc3cd5cdb315f2f6c1

parent

f823bd0016e6870369b9e98a7b582fc848d5748e

2 files changed, 0 insertions(+), 113 deletions(-)

jump to
D _posts/example-post.md

@@ -1,58 +0,0 @@

-# This is an example post - -When ever you think of static site generators, you think about something like - -Gatsby, Hugo, Jekyll, etc. But I think all these are overkill. I won't even use -majority of the features they provide for my simple blog. So the best thing to -do is to build something for yourself. This can be done with simple bash -scripts with the help of `pandoc` - -## Example - -```python -import tmdbsimple as tmdb -from imdbpie import Imdb -from mutagen.mp4 import MP4, MP4Cover - -# The following subtitle codecs are ingored if found in the file as they are -# not supported by the mp4 container. These are mainly picture-based subtitles -sub_codec_blacklist = ("dvdsub", "dvd_subtitle", "pgssub", "hdmv_pgs_subtitle") - -def collect_stream_metadata(filename): - """ - Returns a list of streams' metadata present in the media file passed as - the argument (filename) - """ - command = 'ffprobe -i "{}" -show_streams -of json'.format(filename) - args = shlex.split(command) - p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, - universal_newlines=True) - out, err = p.communicate() - - json_data = JSONDecoder().decode(out) - - return json_data -``` - -This is very simple code. - -- I am going to pretend that I am explaing this piece of code in bullet points -- But let me tell you that you shouldn't expect anything like that. I am just - doing this so that I can see how bullet points look. -- I am going to make this third bullet point a little bigger, because why not? - I am now going to add some gibberish as I can't come up with something - creative. asff kdjfh addf aitng hgjffg kfsdgye al;kjgj ghjadshnb gjhafg fgh - fghf h3 g jbh dhandg hjafjg an - - -## Snippets - -**Using awk, tr, to get the remote info of a git repo** - -This will output the (fetch) remote of a git repository and -put the contents into the clipboard - - $ git remote -v | awk '{print $2}' | head -1 | tr -d '\n' | xsel -ib - -## Here's an Image - -![](https://i.stack.imgur.com/cv2wX.png)
D template-post.sh

@@ -1,55 +0,0 @@

-#!/usr/bin/bash - -postc=$(cat "$1") - -cat <<EOF -<!DOCTYPE html> -<html lang="en"> -<head> - - <meta charset="utf-8"> - <title>Prithu Goswami</title> - <meta name="description" content="Prithu Goswami's personal website"> - <meta name="author" content="Prithu Goswami"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - - <link href="https://fonts.googleapis.com/css?family=Roboto+Mono:300,400,700" rel="stylesheet"> - <link rel="stylesheet" href="/css/main.css"> - <link rel="stylesheet" href="/css/blog.css"> - <link rel="icon" type="img/png" href="/img/favicon.png"> - -</head> - -<body> - <p class="wip">WIP</p> - <nav> - <ul> - <li><a href="/">About me</a></li> - <li><a href="/projects">Projects</a></li> - <li><a href="/blog.html">Blog</a></li> - <li><a href="/links">Links</a></li> - </ul> - </nav> - - <div class="bcontainer"> - <div class="bcontent"> - <h1>Post title goes here </h1> - <p class="post-date">Januaray 19, 2019</p> - <div class="post-labels"> - $( for a in tag1 tag2 tag3 - do - echo "<div class=post-label>$a</div>" - done - ) - <div class=post-label>Linux</div> - </div> - <div class="post-text"> - $postc - </div> - </div> - </div> - -</body> - -</html> -EOF