Update lob

This commit is contained in:
Marcus Kammer 2021-05-27 16:51:59 +02:00
parent 185b10b6e7
commit 2f71c09f27

View file

@ -590,6 +590,7 @@ this default behavior. Below is a list of such options:
* Python
** Collect RSS Feeds
#+header: :results output drawer
#+name: collect-rss-feeds
#+begin_src python
#!/usr/bin/env python3
@ -658,22 +659,22 @@ this default behavior. Below is a list of such options:
#+end_src
** Contributing to git
#+begin_src python :results output drawer :exports results
import os
from git import Repo
import os
from git import Repo
repo = Repo(os.path.abspath('.'))
repo = Repo(os.path.abspath('.'))
def org_list(l: list) -> list:
return [f"\n- {i}\n" for i in l]
def org_list(l)
return [f"\n- {i}\n" for i in l]
def unique(l: list) -> list:
return sorted(set(l))
def unique(l)
return sorted(set(l))
def authors(commits: list) -> list:
return [f"{i.author.name} <{i.author.email}>" for i in commits]
def authors(commits)
return [f"{i.author.name} <{i.author.email}>" for i in commits]
def commits(repo: Repo) -> list:
return list(repo.iter_commits("master"))
def commits(repo)
return list(repo.iter_commits("master"))
print(*org_list(unique(authors(commits(repo)))))
print(*org_list(unique(authors(commits(repo)))))
#+end_src