Skip to content

Commit

Permalink
feat: badges for the project
Browse files Browse the repository at this point in the history
::by sergio giraldo
@ 20240513T2201CEST, gpg signed
  • Loading branch information
sergiorgiraldo committed May 13, 2024
1 parent dff804b commit 502b716
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 76 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/issue2project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
steps:
- uses: actions/add-to-project@v1.0.1
with:
# You can target a project in a different organization
# to the issue
project-url: https://github.com/users/sergiorgiraldo/projects/3
github-token: ${{ secrets.GH_PAT_PHD }}
labeled: search, analyze, refine, write, teacher, decide, review
Expand Down
23 changes: 3 additions & 20 deletions .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,37 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll site to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Get site source
uses: actions/checkout@v3
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v3

# Deploy job
deploy:
# Add a dependency to the build job
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
pages: write
id-token: write

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion ITERATION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.147
0.0.148
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ https://github.com/users/sergiorgiraldo/projects/3

*status*

![Static Badge](https://img.shields.io/badge/Doing-1-green?style=for-the-badge)

![Static Badge](https://img.shields.io/badge/Backlog-2-red?style=for-the-badge)

![Static Badge](https://img.shields.io/badge/Prioritized-1-blue?style=for-the-badge)

![Static Badge](https://img.shields.io/badge/Doing-1-green?style=for-the-badge)
4 changes: 2 additions & 2 deletions _site/about/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ <h3 id="project">Project</h3>

<p><a href="https://github.com/users/sergiorgiraldo/projects/3">Follow</a></p>

<p><img src="https://img.shields.io/badge/Doing-1-green?style=for-the-badge" alt="Static Badge" /></p>

<p><img src="https://img.shields.io/badge/Backlog-2-red?style=for-the-badge" alt="Static Badge" /></p>

<p><img src="https://img.shields.io/badge/Prioritized-1-blue?style=for-the-badge" alt="Static Badge" /></p>

<p><img src="https://img.shields.io/badge/Doing-1-green?style=for-the-badge" alt="Static Badge" /></p>

</div><div class="border-t border-porcelain py-4 text-caption">
<div class="text-center desktop:flex desktop:justify-between space-y-2">
<p>
Expand Down
2 changes: 1 addition & 1 deletion _site/feed.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.3">Jekyll</generator><link href="https://sergiorgiraldo.github.io/phd/feed.xml" rel="self" type="application/atom+xml" /><link href="https://sergiorgiraldo.github.io/phd/" rel="alternate" type="text/html" /><updated>2024-05-13T21:45:42+02:00</updated><id>https://sergiorgiraldo.github.io/phd/feed.xml</id><title type="html">PHD SRG.</title><subtitle>Sergio Giraldo, PhD student.</subtitle><author><name>Sergio Giraldo</name></author><entry><title type="html">AI Based Banking Data Analysis with a Design Thinking Approach</title><link href="https://sergiorgiraldo.github.io/phd/2024/05/09/AI-Based-Banking-Data-Analysis-with-a-Design-Think.html" rel="alternate" type="text/html" title="AI Based Banking Data Analysis with a Design Thinking Approach" /><published>2024-05-09T14:54:36+02:00</published><updated>2024-05-09T14:54:36+02:00</updated><id>https://sergiorgiraldo.github.io/phd/2024/05/09/AI-Based-Banking-Data-Analysis-with-a-Design-Think</id><content type="html" xml:base="https://sergiorgiraldo.github.io/phd/2024/05/09/AI-Based-Banking-Data-Analysis-with-a-Design-Think.html"><![CDATA[]]></content><author><name>Sergio Giraldo</name></author><category term="design-thinking" /><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">Leiden</title><link href="https://sergiorgiraldo.github.io/phd/2024/05/05/uni-leiden.html" rel="alternate" type="text/html" title="Leiden" /><published>2024-05-05T22:37:00+02:00</published><updated>2024-05-05T22:37:00+02:00</updated><id>https://sergiorgiraldo.github.io/phd/2024/05/05/uni-leiden</id><content type="html" xml:base="https://sergiorgiraldo.github.io/phd/2024/05/05/uni-leiden.html"><![CDATA[<p><a href="https://www.universiteitleiden.nl/en/science/graduate-school-of-science">Faculty of Science</a></p>]]></content><author><name>Sergio Giraldo</name></author><category term="unis" /><summary type="html"><![CDATA[Faculty of Science]]></summary></entry><entry><title type="html">Erasmus Rotterdam</title><link href="https://sergiorgiraldo.github.io/phd/2024/05/05/uni-erasmus.html" rel="alternate" type="text/html" title="Erasmus Rotterdam" /><published>2024-05-05T22:34:00+02:00</published><updated>2024-05-05T22:34:00+02:00</updated><id>https://sergiorgiraldo.github.io/phd/2024/05/05/uni-erasmus</id><content type="html" xml:base="https://sergiorgiraldo.github.io/phd/2024/05/05/uni-erasmus.html"><![CDATA[<p>I couldnt find a suitable program in the topics I chose. I’ll try again by EOY, maybe new fields arise.</p>]]></content><author><name>Sergio Giraldo</name></author><category term="unis" /><summary type="html"><![CDATA[I couldnt find a suitable program in the topics I chose. I’ll try again by EOY, maybe new fields arise.]]></summary></entry><entry><title type="html">University of Amsterdam - UvA</title><link href="https://sergiorgiraldo.github.io/phd/2024/05/05/uni-amsterdam.html" rel="alternate" type="text/html" title="University of Amsterdam - UvA" /><published>2024-05-05T22:28:00+02:00</published><updated>2024-05-05T22:28:00+02:00</updated><id>https://sergiorgiraldo.github.io/phd/2024/05/05/uni-amsterdam</id><content type="html" xml:base="https://sergiorgiraldo.github.io/phd/2024/05/05/uni-amsterdam.html"><![CDATA[<p>I couldnt find a suitable program in the topics I chose. I’ll try again by EOY, maybe new fields arise.</p>]]></content><author><name>Sergio Giraldo</name></author><category term="unis" /><summary type="html"><![CDATA[I couldnt find a suitable program in the topics I chose. I’ll try again by EOY, maybe new fields arise.]]></summary></entry><entry><title type="html">Design Thinking Topics</title><link href="https://sergiorgiraldo.github.io/phd/2024/05/03/homedt.html" rel="alternate" type="text/html" title="Design Thinking Topics" /><published>2024-05-03T17:02:00+02:00</published><updated>2024-05-03T17:02:00+02:00</updated><id>https://sergiorgiraldo.github.io/phd/2024/05/03/homedt</id><content type="html" xml:base="https://sergiorgiraldo.github.io/phd/2024/05/03/homedt.html"><![CDATA[<h4 id="2024-05-08">2024-05-08</h4>
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.3">Jekyll</generator><link href="https://sergiorgiraldo.github.io/phd/feed.xml" rel="self" type="application/atom+xml" /><link href="https://sergiorgiraldo.github.io/phd/" rel="alternate" type="text/html" /><updated>2024-05-13T22:01:43+02:00</updated><id>https://sergiorgiraldo.github.io/phd/feed.xml</id><title type="html">PHD SRG.</title><subtitle>Sergio Giraldo, PhD student.</subtitle><author><name>Sergio Giraldo</name></author><entry><title type="html">AI Based Banking Data Analysis with a Design Thinking Approach</title><link href="https://sergiorgiraldo.github.io/phd/2024/05/09/AI-Based-Banking-Data-Analysis-with-a-Design-Think.html" rel="alternate" type="text/html" title="AI Based Banking Data Analysis with a Design Thinking Approach" /><published>2024-05-09T14:54:36+02:00</published><updated>2024-05-09T14:54:36+02:00</updated><id>https://sergiorgiraldo.github.io/phd/2024/05/09/AI-Based-Banking-Data-Analysis-with-a-Design-Think</id><content type="html" xml:base="https://sergiorgiraldo.github.io/phd/2024/05/09/AI-Based-Banking-Data-Analysis-with-a-Design-Think.html"><![CDATA[]]></content><author><name>Sergio Giraldo</name></author><category term="design-thinking" /><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">Leiden</title><link href="https://sergiorgiraldo.github.io/phd/2024/05/05/uni-leiden.html" rel="alternate" type="text/html" title="Leiden" /><published>2024-05-05T22:37:00+02:00</published><updated>2024-05-05T22:37:00+02:00</updated><id>https://sergiorgiraldo.github.io/phd/2024/05/05/uni-leiden</id><content type="html" xml:base="https://sergiorgiraldo.github.io/phd/2024/05/05/uni-leiden.html"><![CDATA[<p><a href="https://www.universiteitleiden.nl/en/science/graduate-school-of-science">Faculty of Science</a></p>]]></content><author><name>Sergio Giraldo</name></author><category term="unis" /><summary type="html"><![CDATA[Faculty of Science]]></summary></entry><entry><title type="html">Erasmus Rotterdam</title><link href="https://sergiorgiraldo.github.io/phd/2024/05/05/uni-erasmus.html" rel="alternate" type="text/html" title="Erasmus Rotterdam" /><published>2024-05-05T22:34:00+02:00</published><updated>2024-05-05T22:34:00+02:00</updated><id>https://sergiorgiraldo.github.io/phd/2024/05/05/uni-erasmus</id><content type="html" xml:base="https://sergiorgiraldo.github.io/phd/2024/05/05/uni-erasmus.html"><![CDATA[<p>I couldnt find a suitable program in the topics I chose. I’ll try again by EOY, maybe new fields arise.</p>]]></content><author><name>Sergio Giraldo</name></author><category term="unis" /><summary type="html"><![CDATA[I couldnt find a suitable program in the topics I chose. I’ll try again by EOY, maybe new fields arise.]]></summary></entry><entry><title type="html">University of Amsterdam - UvA</title><link href="https://sergiorgiraldo.github.io/phd/2024/05/05/uni-amsterdam.html" rel="alternate" type="text/html" title="University of Amsterdam - UvA" /><published>2024-05-05T22:28:00+02:00</published><updated>2024-05-05T22:28:00+02:00</updated><id>https://sergiorgiraldo.github.io/phd/2024/05/05/uni-amsterdam</id><content type="html" xml:base="https://sergiorgiraldo.github.io/phd/2024/05/05/uni-amsterdam.html"><![CDATA[<p>I couldnt find a suitable program in the topics I chose. I’ll try again by EOY, maybe new fields arise.</p>]]></content><author><name>Sergio Giraldo</name></author><category term="unis" /><summary type="html"><![CDATA[I couldnt find a suitable program in the topics I chose. I’ll try again by EOY, maybe new fields arise.]]></summary></entry><entry><title type="html">Design Thinking Topics</title><link href="https://sergiorgiraldo.github.io/phd/2024/05/03/homedt.html" rel="alternate" type="text/html" title="Design Thinking Topics" /><published>2024-05-03T17:02:00+02:00</published><updated>2024-05-03T17:02:00+02:00</updated><id>https://sergiorgiraldo.github.io/phd/2024/05/03/homedt</id><content type="html" xml:base="https://sergiorgiraldo.github.io/phd/2024/05/03/homedt.html"><![CDATA[<h4 id="2024-05-08">2024-05-08</h4>

<ul>
<li>
Expand Down
4 changes: 2 additions & 2 deletions docs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ permalink: /about/

[Follow](https://github.com/users/sergiorgiraldo/projects/3)

![Static Badge](https://img.shields.io/badge/Doing-1-green?style=for-the-badge)

![Static Badge](https://img.shields.io/badge/Backlog-2-red?style=for-the-badge)

![Static Badge](https://img.shields.io/badge/Prioritized-1-blue?style=for-the-badge)

![Static Badge](https://img.shields.io/badge/Doing-1-green?style=for-the-badge)
22 changes: 11 additions & 11 deletions newpost
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ from datetime import datetime, timedelta, timezone

def main(args):
if len(args) < 3:
print('usage: newpost <name> <title> <categories>')
print('title should be quoted')
print('categories should be quoted and separated by commas')
print("usage: newpost <name> <title> <categories>")
print("title should be quoted")
print("categories should be quoted and separated by commas")
sys.exit(2)

name = args[0]
Expand All @@ -25,14 +25,14 @@ def main(args):
short_dt = now.strftime("%Y-%m-%d")
full_dt = now.strftime("%Y-%m-%d %H:%M:%S %z")

with open('docs/_posts/' + short_dt + '-' + name + '.md', 'w') as f:
f.write('---\n')
f.write('layout: post\n')
f.write('title: "' + title + '"\n')
f.write('date: ' + full_dt + '\n')
f.write('categories: [' + cats + ']\n')
f.write('---\n\n')
with open("docs/_posts/" + short_dt + "-" + name + ".md", "w") as f:
f.write("---\n")
f.write("layout: post\n")
f.write("title: "" + title + ""\n")
f.write("date: " + full_dt + "\n")
f.write("categories: [" + cats + "]\n")
f.write("---\n\n")


if __name__ == '__main__':
if __name__ == "__main__":
main(sys.argv[1:])
33 changes: 16 additions & 17 deletions newreview
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@ from datetime import datetime, timedelta, timezone
import requests
import re


def main(args):
if len(args) < 3:
print('usage: newreview <title> <doi> <categories>')
print('title should be quoted')
print('categories should be quoted and separated by commas')
print("usage: newreview <title> <doi> <categories>")
print("title should be quoted")
print("categories should be quoted and separated by commas")
sys.exit(2)

title = args[0]
name = get_name(title)
doi = args[1]
cats = args[2]
cite = ''
cite = ""

now_ = datetime.now(timezone.utc)
tz_offset = timezone(timedelta(hours=3)) # NL
Expand All @@ -34,24 +33,24 @@ def main(args):
headers = {"Accept": "text/x-bibliography; style=apa"}
response = requests.get(url, headers=headers, allow_redirects=True)

cite = response.text if response.status_code == 200 else 'error retrieving cite'
cite = response.text if response.status_code == 200 else "error retrieving cite"

with open('docs/_posts/' + short_dt + '-' + name + '.md', 'w') as f:
f.write('---\n')
f.write('layout: review\n')
f.write('title: "' + title + '"\n')
f.write('doi: "' + doi + '"\n')
f.write('cite: "' + cite + '"\n')
f.write('date: ' + full_dt + '\n')
f.write('categories: [' + cats + ']\n')
f.write('---\n\n')
with open("docs/_posts/" + short_dt + "-" + name + ".md", "w") as f:
f.write("---\n")
f.write("layout: review\n")
f.write("title: "" + title + ""\n")
f.write("doi: "" + doi + ""\n")
f.write("cite: "" + cite + ""\n")
f.write("date: " + full_dt + "\n")
f.write("categories: [" + cats + "]\n")
f.write("---\n\n")


def get_name(title):
cleaned_title = re.sub(r'\s+', '-', title)
cleaned_title = re.sub(r"\s+", "-", title)

return cleaned_title[:50] if len(cleaned_title) > 50 else cleaned_title


if __name__ == '__main__':
if __name__ == "__main__":
main(sys.argv[1:])
20 changes: 2 additions & 18 deletions queryproject
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,15 @@
import subprocess
import json

# Execute the command-line command
command = """
gh api graphql -f query='
query{
node(id: "PVT_kwHOABF2LM4AhB76") {
... on ProjectV2 {
items(first: 20) {
nodes{
fieldValues(last: 5) {
fieldValues(last: 1) {
nodes{
... on ProjectV2ItemFieldTextValue {
field {
... on ProjectV2FieldCommon {
name
}
}
}
... on ProjectV2ItemFieldDateValue {
field {
... on ProjectV2FieldCommon {
name
}
}
}
... on ProjectV2ItemFieldSingleSelectValue {
name
field {
Expand Down Expand Up @@ -84,6 +69,5 @@ if result.returncode == 0:
print("\n\n".join(badges))

else:
# Handle command execution error
error_message = result.stderr.decode('utf-8')
error_message = result.stderr.decode("utf-8")
print(f"Error: {error_message}")

0 comments on commit 502b716

Please sign in to comment.