{"id":13341955,"url":"https://github.com/ahr9n/cs50w-wiki","last_synced_at":"2025-03-11T23:30:44.172Z","repository":{"id":41855059,"uuid":"471988850","full_name":"ahr9n/cs50w-wiki","owner":"ahr9n","description":"A design of Wikipedia-like online encyclopedia. Project 1 for CS50’s Web Programming with Python and JavaScript.","archived":false,"fork":false,"pushed_at":"2022-04-26T07:37:12.000Z","size":92,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-24T10:08:32.124Z","etag":null,"topics":["cs50w","cs50web","cs50web-project1","django","encyclopedia","wiki"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahr9n.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-20T13:31:00.000Z","updated_at":"2023-04-07T18:20:20.000Z","dependencies_parsed_at":"2022-08-11T19:31:27.517Z","dependency_job_id":null,"html_url":"https://github.com/ahr9n/cs50w-wiki","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahr9n%2Fcs50w-wiki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahr9n%2Fcs50w-wiki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahr9n%2Fcs50w-wiki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahr9n%2Fcs50w-wiki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahr9n","download_url":"https://codeload.github.com/ahr9n/cs50w-wiki/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243129596,"owners_count":20241039,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cs50w","cs50web","cs50web-project1","django","encyclopedia","wiki"],"created_at":"2024-07-29T19:27:12.352Z","updated_at":"2025-03-11T23:30:43.802Z","avatar_url":"https://github.com/ahr9n.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n \u003cimg style=\"width: 35%;\" src=\"https://user-images.githubusercontent.com/52632898/161971512-2507472b-367f-4695-ba18-76f2f73bd0d4.png\" alt=\"Wikipedia, at last free knowledge for all!\"\u003e\n\u003c/div\u003e\n\n# Wiki\nProject 1 for CS50’s Web Programming with Python and JavaScript.\n\n## Overview\nA design of Wikipedia-like online encyclopedia.\n\n## Specifications\nThis project fulfills the following requirements:\n\n* **Entry Page**: Visiting `/wiki/TITLE`, where `TITLE` is the title of an encyclopedia entry, renders a page that displays the contents of that encyclopedia entry.\n  * The view gets the content of the encyclopedia entry by calling the appropriate `util` function.\n  * If an entry is requested that does not exist, the user is presented with an error page indicating that their requested page was not found.\n  * If the entry does exist, the user is presented with a page that displays the content of the entry. The title of the page includes the name of the entry.\n* **Index Page**: Updates `index.html` such that, instead of merely listing the names of all pages in the encyclopedia, user can click on any entry name to be taken directly to that entry page.\n* **Search**: Allowing the user to type a query into the search box in the sidebar to search for an encyclopedia entry.\n  * If the query matches the name of an encyclopedia entry, the user is redirected to that entry’s page.\n  * If the query does not match the name of an encyclopedia entry, the user instead is taken to a search results page that displays a list of all encyclopedia entries that have the query as a substring. For example, if the search query were `ytho`, then `Python` appears in the search results.\n  * Clicking on any of the entry names on the search results page takes the user to that entry’s page.\n* **New Page**: Clicking “Create New Page” in the sidebar takes the user to a page where they can create a new encyclopedia entry.\n  * Users are able to enter a title for the page and, in a [`textarea`](https://www.w3schools.com/tags/tag_textarea.asp), are able to enter the Markdown content for the page.\n  * Users are able to click a button to save their new page.\n  * When the page is saved, if an encyclopedia entry already exists with the provided title, the user is presented with an error message.\n  * Otherwise, the encyclopedia entry is saved to disk, and the user is taken to the new entry’s page.\n* **Edit Page**: On each entry page, the user is able to click a link to be taken to a page where the user can edit that entry’s Markdown content in a `textarea`.\n  * The `textarea` is pre-populated with the existing Markdown content of the page. (i.e., the existing content is the initial `value` of the `textarea`).\n  * The user is able to click a button to save the changes made to the entry.\n  * Once the entry is saved, the user is redirected back to that entry’s page.\n* **Random Page**: Clicking “Random Page” in the sidebar takes user to a random encyclopedia entry.\n* **Markdown to HTML Conversion**: On each entry’s page, any Markdown content in the entry file is converted to HTML before being displayed to the user. Referring to [`python-markdown2`](https://github.com/trentm/python-markdown2) package to perform this conversion, installable via `pip3 install markdown2`.\n\n## Setup\nRequires Python3 and the package installer for Python (pip) to run:\n\n* Install requirements (Django4 and Markdown2): `pip install -r requirements.txt`\n* After cloning the repository, refer to the project folder and run the app locally: `python3 manage.py runserver`\n* Visit the site: `http://localhost:8000` and enjoy!\n\n## Topics\nBuilt with [`Python`](https://www.python.org/downloads/), [`Django`](https://www.djangoproject.com/), [`Markdown`](https://pypi.org/project/Markdown/) and HTML/CSS.\n\n## Future Work\nSome challenges I would make in my free-time:\n* Try implementing the Markdown to HTML conversion without using any external libraries, supporting headings, boldface text, unordered lists, links, and paragraphs.\n  * Notice that using regular expressions in Python maybe helpful.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahr9n%2Fcs50w-wiki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahr9n%2Fcs50w-wiki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahr9n%2Fcs50w-wiki/lists"}