general rename

thumb
km0 1 year ago
parent 896c38ea49
commit 223fc2ecd9

@ -51,7 +51,7 @@ def render_home():
meta, content = get_md_contents("home.md")
projects_list = []
for project in list_folders("./projects"):
project_info = get_md_contents("documentation.md",
project_info = get_md_contents(f"{project}.md",
f"./{projects}/{project}")[0]
project_date = datetime.strptime(project_info['date'], '%d/%m/%Y')
project_info['date'] = datetime.strftime(project_date, '%d %b, %y')
@ -116,7 +116,7 @@ def dynamic_page(slug=None):
# Single project
@app.route("/projects/<project>/")
def p_info(project=None):
meta, content = get_md_contents("documentation.md",
meta, content = get_md_contents(f"{project}.md",
f"./{projects}/{project}")
template = 'project.html'
if 'template' in meta:

@ -50,6 +50,6 @@ post = frontmatter.Post('', **project)
os.makedirs(f'projects/{slug}')
with open(f'projects/{slug}/documentation.md', 'w') as f:
with open(f'projects/{slug}/{slug}.md', 'w') as f:
documentation = frontmatter.dumps(post)
f.write(documentation)

@ -43,6 +43,7 @@ Documentation is a way to produce narrations around software. To create a world
- Read software documentation
- (manuals, guides, references, tutorial)
- (good ones, bad ones, ...)
- Which software needs documentation? or
- Which software do we want to document?
- Write software documentation

@ -102,4 +102,4 @@ because there are a lot of contents! so probably should really generate the proj
**update**
and that's what i did now. let's see if it works?
and that's what i did now.

@ -5,11 +5,11 @@ categories:
- Research
date: 03/11/2022
description: Outline for the thesis
slug: thesis-draft
title: Thesis Draft
slug: thesis-outline
title: Thesis Outline
---
Guidelines
## Guidelines
```
What do you WANT to write?

@ -0,0 +1,10 @@
import os
names = []
for entry in os.scandir('projects'):
if not entry.name.startswith('.') and entry.is_dir():
names.append(entry.name)
for name in names:
os.rename(f'projects/{name}/documentation.md', f'projects/{name}/{name}.md')
Loading…
Cancel
Save