Update lob
This commit is contained in:
parent
3a852d9c9e
commit
9adb0cfbf5
1 changed files with 23 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
# Created 2021-04-29 Thu 09:07
|
||||
#+TITLE: The Library of Babel
|
||||
#+AUTHOR: Org-mode People
|
||||
#+startup: hideblocks
|
||||
|
||||
|
||||
* Introduction
|
||||
|
||||
|
@ -642,7 +642,7 @@ this default behavior. Below is a list of such options:
|
|||
for entry in entries])
|
||||
|
||||
for k,v in feeds.items():
|
||||
print(f'{k}\n{v}\n')
|
||||
print(f'\n{k}\n{v}\n')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@ -655,3 +655,24 @@ this default behavior. Below is a list of such options:
|
|||
from tabulate import tabulate
|
||||
return f"return tabulate({df}, headers={df}.columns, tablefmt='orgtbl')"
|
||||
#+end_src
|
||||
** Contributing to git
|
||||
#+begin_src python :results output drawer :exports results
|
||||
import os
|
||||
from git import Repo
|
||||
|
||||
repo = Repo(os.path.abspath('.'))
|
||||
|
||||
def org_list(l: list) -> list:
|
||||
return [f"\n- {i}\n" for i in l]
|
||||
|
||||
def unique(l: list) -> list:
|
||||
return sorted(set(l))
|
||||
|
||||
def authors(commits: list) -> list:
|
||||
return [f"{i.author.name} <{i.author.email}>" for i in commits]
|
||||
|
||||
def commits(repo: Repo) -> list:
|
||||
return list(repo.iter_commits("master"))
|
||||
|
||||
print(*org_list(unique(authors(commits(repo)))))
|
||||
#+end_src
|
||||
|
|
Loading…
Add table
Reference in a new issue