-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
164 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
id,name,description,link | ||
programs,תכניות,תכניות רווחה פעילות,programs/ | ||
responses,מענים,מענים בתחום הרווחה,responses/ | ||
situations,מצבי חיים,מצבי חיים,situations/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
<!DOCTYPE html> | ||
<html lang="en" dir="rtl"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>טקסונומיית משרד הרווחה</title> | ||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap" rel="stylesheet"> | ||
<style type="text/css"> | ||
* { | ||
font-family: "Open Sans", sans-serif; | ||
font-optical-sizing: auto; | ||
} | ||
body { | ||
margin: 0; | ||
padding: 20px; | ||
direction: rtl; | ||
display: flex; | ||
flex-flow: column; | ||
align-items: center; | ||
} | ||
body > div { | ||
width: 100%; | ||
max-width: 720px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div> | ||
<h1>דוגמא לפרסום טקסונומיה</h1> | ||
<p>מאגר קוד זה ידגים את האופן הרצוי בו אפשר לפרסם את הטקסונומיה המשרדית, בהתאם להגדרות המפורטות בקובץ ״מילון מושגי יסוד״.</p> | ||
<p>בדוגמה זו נראה פרסום של מספר טקסונומיות <strong>דמה</strong>:</p> | ||
<ul> | ||
<li><a href="situations/">טקסונומיית מצבי חיים</a></li> | ||
<li><a href="responses/">טקסונומיית מענים</a></li> | ||
<li><a href="programs/">טקסונומיית תכניות</a></li> | ||
</ul> | ||
<p>חשוב לשים לב שכלל המונחים פה הם מומצאים ואינם מיועדים לשימוש פומבי.</p> | ||
</div> | ||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# דוגמא לפרסום טקסונומיה | ||
|
||
מאגר קוד זה ידגים את האופן הרצוי בו אפשר לפרסם את הטקסונומיה המשרדית, בהתאם להגדרות המפורטות בקובץ ״מילון מושגי יסוד״. | ||
|
||
בדוגמה זו נראה פרסום של מספר טקסונומיות **דמה**: | ||
|
||
- [טקסונומיית מצבי חיים](situations/) | ||
- [טקסונומיית מענים](responses/) | ||
- [טקסונומיית תכניות](programs/) | ||
|
||
חשוב לשים לב שכלל המונחים פה הם מומצאים ואינם מיועדים לשימוש פומבי. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
id,name,description,parent,synonyms | ||
age_group,קבוצת גיל,,, | ||
infants,הגיל הרך,גיל לידה עד 6,age_group,"תינוקות" | ||
children,ילדים,גיל 6 עד 12,age_group,"ילדים" | ||
teenagers,נוער,גיל 12 עד 18,age_group,"נוער" | ||
adults,מבוגרים,,age_group,"מבוגרים" | ||
elderly,קשישים,מגיל 65 ומעלה,age_group,"זקנים,הגיל השלישי" | ||
religion,דת,,, | ||
jewish,יהודי,,religion, | ||
muslim,מוסלמי,,religion, | ||
christian,נוצרי,,religion, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
id,name,description,parent,synonyms | ||
age_group,קבוצת גיל,,, | ||
infants,הגיל הרך,גיל לידה עד 6,age_group,"תינוקות" | ||
children,ילדים,גיל 6 עד 12,age_group,"ילדים" | ||
teenagers,נוער,גיל 12 עד 18,age_group,"נוער" | ||
adults,מבוגרים,,age_group,"מבוגרים" | ||
elderly,אזרחים ותיקים,מגיל 65 ומעלה,age_group,"זקנים,הגיל השלישי" | ||
religion,דת,,, | ||
jewish,יהודי,,religion, | ||
muslim,מוסלמי,,religion, | ||
christian,נוצרי,,religion, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# דוגמא לפרסום טקסונומיה - מצבי חיים | ||
|
||
מאגר קוד זה ידגים את האופן הרצוי בו אפשר לפרסם טקסונומיה ספציפית - ״מצבי חיים״ - בהתאם להגדרות המפורטות בקובץ ״מילון מושגי יסוד״. | ||
|
||
חשוב לשים לב שכלל המונחים פה הם מומצאים ואינם מיועדים לשימוש פומבי. | ||
|
||
הגירסאות השונות הזמינות לטקסונומיה זו: | ||
- [גירסה 1.1.1/קובץ ראשי](1.1.1/situations.csv) | ||
- הגיל הרך ==> פעוטות | ||
- [גירסה 1.1.0/קובץ ראשי](1.1.0/situations.csv) | ||
- הוסף ענף עבור מצב משפחתי | ||
- [גירסה 1.0.1/קובץ ראשי](1.0.1/situations.csv) | ||
- קשישים ==> אזרחים ותיקים | ||
- [גירסה 1.0.0/קובץ ראשי](1.0.0/situations.csv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import os | ||
import markdown | ||
|
||
def render_markdown_to_html(markdown_file): | ||
"""Convert markdown file content to HTML.""" | ||
with open(markdown_file, 'r', encoding='utf-8') as f: | ||
text = f.read() | ||
html_content = markdown.markdown(text) | ||
return html_content | ||
|
||
def create_index_html(directory, html_content): | ||
"""Create an index.html file in the directory with the HTML content and RTL direction.""" | ||
index_file = os.path.join(directory, 'index.html') | ||
title = directory.replace('.', '').strip('/') | ||
title = ' - '.join(filter(None, ['טקסונומיית משרד הרווחה', title])) | ||
|
||
# HTML template with RTL direction | ||
html_template = f""" | ||
<!DOCTYPE html> | ||
<html lang="en" dir="rtl"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>{title}</title> | ||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap" rel="stylesheet"> | ||
<style type="text/css"> | ||
* {{ | ||
font-family: "Open Sans", sans-serif; | ||
font-optical-sizing: auto; | ||
}} | ||
body {{ | ||
margin: 0; | ||
padding: 20px; | ||
direction: rtl; | ||
display: flex; | ||
flex-flow: column; | ||
align-items: center; | ||
}} | ||
body > div {{ | ||
width: 100%; | ||
max-width: 720px; | ||
}} | ||
</style> | ||
</head> | ||
<body> | ||
<div> | ||
{html_content} | ||
</div> | ||
</body> | ||
</html> | ||
""" | ||
|
||
with open(index_file, 'w', encoding='utf-8') as f: | ||
f.write(html_template) | ||
print(f"Created {index_file}") | ||
|
||
def traverse_directory(base_directory): | ||
"""Traverse the directory tree and create index.html files.""" | ||
for root, _, files in os.walk(base_directory): | ||
if 'readme.md' in files: | ||
markdown_file = os.path.join(root, 'readme.md') | ||
html_content = render_markdown_to_html(markdown_file) | ||
create_index_html(root, html_content) | ||
|
||
if __name__ == "__main__": | ||
base_directory = '.' # Replace with your directory | ||
traverse_directory(base_directory) |