From 24e11ffb89824e839e1c35459d213a870db2530b Mon Sep 17 00:00:00 2001 From: Marcus Kammer Date: Mon, 7 Jun 2021 17:43:50 +0200 Subject: [PATCH] Update lob --- library-of-babel.org | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/library-of-babel.org b/library-of-babel.org index 171d1ba7..f6c758de 100644 --- a/library-of-babel.org +++ b/library-of-babel.org @@ -639,7 +639,7 @@ this default behavior. Below is a list of such options: feed_name = item[0].upper() feed_url = item[1] parse_feed = feedparser.parse(req_feed(feed_url)) - entries = parse_feed.entries[:10] + entries = parse_feed.entries[:15] feeds[feed_name] = '\n'.join([entry_str.format(entry.link, entry.title) for entry in entries]) @@ -658,22 +658,23 @@ this default behavior. Below is a list of such options: return f"return tabulate({df}, headers={df}.columns, tablefmt='orgtbl')" #+end_src ** Contributing to git + #+name: git-contributing #+begin_src python :results output drawer :exports results import os from git import Repo repo = Repo(os.path.abspath('.')) - def org_list(l) + def org_list(l): return [f"\n- {i}\n" for i in l] - def unique(l) + def unique(l): return sorted(set(l)) - def authors(commits) + def authors(commits): return [f"{i.author.name} <{i.author.email}>" for i in commits] - def commits(repo) + def commits(repo): return list(repo.iter_commits("master")) print(*org_list(unique(authors(commits(repo)))))