Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup: Remove outdated and unreasonable entries from the Article of Association. #13

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
095d10b
Feat: Build web preview with Docker and Docker Compose
kevinlee-06 Dec 16, 2024
2a5a29f
Delete CNAME
kevinlee-06 Dec 17, 2024
371db92
Docs: Add README.md for project overview and contribution guidelines.
kevinlee-06 Dec 17, 2024
d9554b9
Docs: Add README.md for project overview and contribution guidelines.
kevinlee-06 Dec 17, 2024
7a6fcc5
Fix: Import font directly from github.
kevinlee-06 Dec 17, 2024
f64ff8b
Merge pull request #9 from NTUT-NPC/docker-compose
kevinlee-06 Dec 17, 2024
058521d
已從 /docs/aoa.md 構建新的 /docs/index.html
kevinlee-06 Dec 17, 2024
eb81be2
Fix: Import font directly from github.
kevinlee-06 Dec 17, 2024
f9f6796
Merge pull request #10 from NTUT-NPC/docker-compose
kevinlee-06 Dec 17, 2024
7a2e646
已從 /docs/aoa.md 構建新的 /docs/index.html
kevinlee-06 Dec 17, 2024
9c5f76b
Fix:
kevinlee-06 Dec 17, 2024
9a0200d
Merge pull request #11 from NTUT-NPC/docker-compose
kevinlee-06 Dec 17, 2024
69a6f5e
已從 /docs/aoa.md 構建新的 /docs/index.html
kevinlee-06 Dec 17, 2024
e494fd8
Create LICENSE.md
kevinlee-06 Dec 17, 2024
f868f55
Update and rename licenses/OFL.txt to licenses/LICENSE/OFL.txt
kevinlee-06 Dec 17, 2024
a4d3800
Update and rename licenses/LICENSE/OFL.txt to LICENSE/OFL.txt
kevinlee-06 Dec 17, 2024
ca44128
Delete licenses directory
kevinlee-06 Dec 17, 2024
a761a78
Update LICENSE.md
kevinlee-06 Dec 17, 2024
f2e11b4
Create GPL-3.0.txt
kevinlee-06 Dec 17, 2024
65d79cf
Merge pull request #12 from kevinlee-06/main
kevinlee-06 Dec 17, 2024
9cbb3dd
Docs: Update README.md
kevinlee-06 Dec 17, 2024
46fde7d
Update .gitignore
kevinlee-06 Dec 17, 2024
172e9b5
Update .gitignore
kevinlee-06 Dec 17, 2024
14c63a3
Add files via upload
kevinlee-06 Dec 17, 2024
69f7717
Update aoa.md
kevinlee-06 Dec 17, 2024
f446ace
已從 /docs/aoa.md 構建新的 /docs/index.html
kevinlee-06 Dec 17, 2024
963b404
Rename docs/favicon.ico to docs/assets/favicon.ico
kevinlee-06 Dec 17, 2024
a2d11d5
Update aoa.md
kevinlee-06 Dec 17, 2024
8bf492a
已從 /docs/aoa.md 構建新的 /docs/index.html
kevinlee-06 Dec 17, 2024
b6f73f5
Cleanup: Remove outdated and unreasonable entries from the Article of…
kevinlee-06 Dec 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
.github
index.html
docs/index.html
CNAME
1 change: 0 additions & 1 deletion CNAME

This file was deleted.

10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM python:3.9-slim
RUN apt update
RUN apt install -y pandoc
RUN pip install Flask
WORKDIR /var/www/html
COPY docs .
COPY build .
RUN pandoc aoa.md -o index.html
EXPOSE 5000
CMD ["python", "app.py"]
39 changes: 39 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## 芫荽字體
- [`docs/assets/edukai-5.0.ttf`](docs/assets/edukai-5.0.ttf)
- **版權**:2022, But Ko (https://github.com/ButTaiwan/iansui)
- **保留字體名稱**:"iansui" 和 "芫荽"
- **授權**:[SIL Open Font License, Version 1.1](https://github.com/ButTaiwan/iansui?tab=OFL-1.1-1-ov-file)

[<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/OFL_logo_rect_color.svg/1020px-OFL_logo_rect_color.svg.png" style="width: 200px;"/>](https://github.com/ButTaiwan/iansui?tab=OFL-1.1-1-ov-file)

## 教育部標準楷書字形檔
- [`docs/assets/edukai-5.0.ttf`](docs/assets/edukai-5.0.ttf)
- **版權**:中華民國教育部
- **授權**:CC 「[姓名標示-禁止改作](https://tw.creativecommons.net/home-page/)」
- 如需引用,請標示「中華民國教育部」。

[<img src="https://tw.creativecommons.net/wp-content/uploads/sites/20/2020/11/by-nd-300x105.png" style="width: 200px;"/>](https://tw.creativecommons.net/home-page/)

## 北科程式設計研究社組織章程
- [`docs/aoa.md`](docs/aoa.md)
- [`docs/index.html`](docs/index.html)
- [`https://aoa.ntut.club`](aoa.ntut.club)
- **版權**:北科程式設計研究社
- **授權**:CC 「[姓名標示─相同方式分享 4.0 國際](https://creativecommons.org/licenses/by-sa/4.0/)」
- 如需引用,請標示「北科程式設計研究社」或「[@npc.designer](https://instagram.com/npc.designer)」或「[https://ntut.club](https://ntut.club)」。

[<img src="https://tw.creativecommons.net/wp-content/uploads/sites/20/2020/11/by-sa-300x105.png" style="width: 200px;"/>](https://creativecommons.org/licenses/by-sa/4.0/)

## 其餘部分皆以 GPL v3 授權

- **授權**:本項目中未明確標示的所有其他內容(包括但不限於程式碼、文檔、資源等)均根據 [**GNU 通用公共授權第 3 版(GPL v3)**](https://www.gnu.org/licenses/gpl-3.0.html) 授權。
- **版權**:北科程式設計研究社
- **使用條件**:
- 任何人都可以自由使用、修改和分發這些內容,但必須遵循 GPL v3 的條款。
- 如果你對這些內容進行了修改並重新發佈,必須以相同的 GPL v3 授權條款發佈衍生作品。
- 必須在分發時附上完整的 GPL v3 授權文件。
- 如需引用或使用這些內容,請標示「北科程式設計研究社」及其版權訊息,並附上 GPL v3 的授權聲明。


[<img src="https://www.gnu.org/graphics/gplv3-127x51.png" style="width: 200px;"/>](https://www.gnu.org/licenses/gpl-3.0.html)

674 changes: 674 additions & 0 deletions LICENSE/GPL-3.0.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion licenses/OFL.txt → LICENSE/OFL.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
OTHER DEALINGS IN THE FONT SOFTWARE.
103 changes: 103 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Contributing

The document [`docs/aoa.md`](docs/aoa.md) serves as the Articles of Association for our club. All members are encouraged to contribute by making updates or suggestions to the [`docs/aoa.md`](docs/aoa.md) file.

If you would like to contribute, please follow these steps:

1. **Fork the Repository**: Click the "Fork" button at the top right of the repository page to create your own copy of the repository.

2. **Make Changes**: Edit the [`docs/aoa.md`](docs/aoa.md) file to propose changes or updates to the Articles of Association.

3. **Submit a Pull Request**: Once you have made your changes, submit a pull request to the main repository. Please include a brief description of the changes you made and the reasons for them.

> Alternatively, if you have suggestions or issues that you would like to discuss without making direct changes, feel free to open an issue in the repository. Your feedback is valuable and helps ensure that our Articles of Association remain accurate and up-to-date!



# Web Preview with Docker and Docker Compose

This project sets up a Flask web application that serves an HTML preview generated from a Markdown file. The application is containerized using Docker and orchestrated with Docker Compose.

## Project Structure

```
NTUT-NPC/AoA
├── build
│ └── app.py
├── compose.yml
├── Dockerfile
├── docs
│ ├── aoa.md
│ ├── assets
│ │ ├── edukai-5.0.ttf
│ │ └── Iansui-Regular.ttf
│ ├── CNAME
│ └── index.html
├── .git
├── .github
│ └── workflows
│ └── markdown-to-html.yml
├── .gitignore
├── LICENSE
│ ├── GPL-3.0.txt
│ └── OFL.txt
├── LICENSE.md
└── README.md
```

## Prerequisites

Before you begin, ensure you have the following installed on your machine:

- [Docker](https://www.docker.com/get-started) (version 20.10 or later)
- [Docker Compose](https://docs.docker.com/compose/install/) (version 1.27 or later)

## Setup

1. **Clone the repository**:

```bash
git clone [email protected]:NTUT-NPC/AoA.git
cd AoA
```

2. **Build and start the application**:

Use Docker Compose to build the image and start the container:

```bash
docker compose up
```

This command will build the Docker image defined in the `Dockerfile` and start the Flask application.

## Preview the Changes

Once the application is running, you can preview the changes by opening your web browser and navigating to:

http://127.0.0.1:5000

You should see the HTML content generated from the `aoa.md` Markdown file.

### Get the HTML Source

To download the HTML source of the generated page, you can use the following command:

```bash
wget http://127.0.0.1:5000/index.html
```

This command will save the `index.html` file to your current directory.

## Stopping the Application

To stop the application, you can press `Ctrl+C` in the terminal where Docker Compose is running.

## License

Please see [licenses](https://github.com/NTUT-NPC/AoA/tree/main/licenses).

## Acknowledgments

- [Flask](https://flask.palletsprojects.com/) for the web framework.
- [Pandoc](https://pandoc.org/) for converting Markdown to HTML.
11 changes: 11 additions & 0 deletions build/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from flask import Flask, send_from_directory

app = Flask(__name__)

@app.route('/')
def serve_index():
return send_from_directory('.', 'index.html')

if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000)

6 changes: 6 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
services:
aoa-preview:
build: .
ports:
- "5000:5000"

14 changes: 2 additions & 12 deletions docs/aoa.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,20 +135,15 @@

- 四、 社員大會
- (一) 為社內最高決策機構。

- (二) 職權:
1. 修改本社組織章程。
1. 議決重要事項。

- (三) 時間:未定。

- (四) 原則:
1. 每學期至少召開乙次。
1. 由正副社長召開。
1. 必要時由社員總額之二分之一以上連署請求,並於兩週內召開社員大會。
1. 社員大會應有全體社員二分之一以上出席。
1. 決議方式除重大提案至少應經出席社員二分之一以上同意外,一般提案以相對多數通過。

- (五) 地點:以共同科館該學期上課之電腦教室為原則。

### 柒、 社團經費
Expand Down Expand Up @@ -307,18 +302,13 @@
- 八、 本章程經社員大會通過後由本社社長公告實施,修正時亦同。

---

<link rel="icon" href="https://github.com/NTUT-NPC/AoA/raw/refs/heads/main/docs/assets/favicon.ico" type="image/x-icon">
<button onclick="window.print(); " style="border: 0; border-radius: 5px; padding: 10px 100px; background-color: rgb(5, 134, 255); color: white; cursor: pointer;">列印</button>

<style>
/* @font-face {
font-family: 'iansui';
src: url('../assets/Iansui-Regular.ttf') format('truetype')
} */

@font-face {
font-family: 'edukai';
src: url('../assets/edukai-5.0.ttf') format('truetype')
src: url('assets/edukai-5.0.ttf') format('truetype')
}

@media print {
Expand Down
File renamed without changes.
File renamed without changes.
Binary file added docs/assets/favicon.ico
Binary file not shown.
12 changes: 3 additions & 9 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -415,18 +415,12 @@ <h3 id="壹拾-附則">壹拾、 附則</h3>
<li>八、 本章程經社員大會通過後由本社社長公告實施,修正時亦同。</li>
</ul>
<hr />
<button onclick="window.print(); " style="border: 0; border-radius: 5px; padding: 10px 100px; background-color: rgb(5, 134, 255); color: white; cursor: pointer;">
列印
</button>
<p><link rel="icon" href="https://github.com/NTUT-NPC/AoA/raw/refs/heads/main/docs/assets/favicon.ico" type="image/x-icon">
<button onclick="window.print(); " style="border: 0; border-radius: 5px; padding: 10px 100px; background-color: rgb(5, 134, 255); color: white; cursor: pointer;">列印</button></p>
<style>
/* @font-face {
font-family: 'iansui';
src: url('../assets/Iansui-Regular.ttf') format('truetype')
} */

@font-face {
font-family: 'edukai';
src: url('../assets/edukai-5.0.ttf') format('truetype')
src: url('assets/edukai-5.0.ttf') format('truetype')
}

@media print {
Expand Down
19 changes: 0 additions & 19 deletions licenses/README.md

This file was deleted.