Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM tiangolo/uwsgi-nginx-flask:python3.6
COPY ./ /
34 changes: 34 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
pipeline {
agent any

stages {
stage('MakeDatabasefile') {
steps {
sh 'touch ./database.db && rm -f ./database.db'
sh 'cat ./database.sql | sqlite3 ./database.db'
}
}
stage('BuildIt') {
steps {
echo 'Building..'
sh 'sudo docker build -t OAPS-TreeLib .'
sh 'sudo docker stop $(docker ps -aq)'
sh 'sudo docker run -d -p 91:80 -v /var/lib/jenkins/workspace/SPM-Spring2021-2599-徐坚苗201831990136_master/frequency:/frequency -t OAPS-TreeLib'
}
}
stage('TestIt') {
steps {
echo 'Testing..'
sh 'sudo docker run -d -p 4444:4444 selenium/standalone-chrome'
sh 'pip3 install pytest -U -q'
sh 'pip3 install selenium -U -q'
sh 'pytest -v -s --html=TreeLibTestReport.html .'
}
}
stage('DeployIt') {
steps {
echo 'Deploying (TBD)'
}
}
}
}
101 changes: 6 additions & 95 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,100 +1,11 @@
# TreeLib
我们做了以下几个小细节的改动:

TreeLib is a simple online application that provides open access
publishing service to authors who love to share their ideas and
findings in a non-blocking fashion. The author could publish an
article as long as he provides a valid email address. No need to sign
up.
​ 首页在点击顶部导航栏跳转之后导航栏样式并不会改变,导致用户容易错认界面,截图如下:

Check this link http://lanlab.org/course/2018f/oo/project_description.pdf for more detail.
https://ftp.bmp.ovh/imgs/2021/03/df7b7b2951de9e50.png

https://ftp.bmp.ovh/imgs/2021/03/1f76538100646cc6.png

​ 在使用顶部导航栏中的搜索框进行搜索之后,显示的页面底部对搜索出的文章头有多余部分,截图如下:


# Mission

TreeLib puts authors' needs first and values massive review.



# How to Contribute

We welcome your participation in this project.

Your participation does not have to be in the form of contributing code. You could help us on ideas, suggestions, documentation, etc.

You need to be an invited member of Lan Laboratory before you can push your feature branch or bugfix branch to the central reops at https://github.com/lanlab-org

Send Hui (lanhui at zjnu.edu.cn) an email message including your GitHub account name so that he could invite you to be a member of Lan Laboratory.

As of March 31 2020, there are 30 members in Lan Laboratory (https://github.com/orgs/lanlab-org/people).

You will use the feature-branching workflow (see below) when interacting with the central repo. The main point of this workflow is that you work on a branch on your local drive, push that branch to the central repo, and create a Pull Request (i.e., Pull Me Request) at GitHub for other people to review your changes. When everything is OK, then someone could merge your changes to the master branch in the central repo.

I believe that code review at the Pull Request stage is important for both improving code quality and improving team quality.


## The Feature-branching Workflow

We will use the feature-branching workflow for collaboration. The idea is that you make your own branch, work on it, and push this branch to the central repo for review.

Check the section The feature-branching workflow in the following link for more detail:

https://github.com/spm2020spring/TeamCollaborationTutorial/blob/master/team.rst



# Version History

## Ibrahim M.I Ismail & Yussuf Mohamed Mahdi

Ibrahim M.I Ismail & Yussuf Mohamed Mahdi maintained the software in 2019.

GitHub repo: https://github.com/hema-001/TreeLib

This section lists all the latest and major changes in this project,
to save your time from going through all the commits, since a bunch of
them are not important.

* **2019-11-05:** like and dislike functionality now has been improved, you can now, like then un-like, and dislike then un-dislike, Which makes the interactions easier, by allowing the users to change their votes according to some changes in their points of view.<br/>
See commit https://github.com/hema-001/TreeLib/commit/38f97329e442ffecb9c699615f80bf5b3df1d7f1 for more details.

* **2019-11-06:** The search functionality now more convenient.<br/> Before, users had to select a section to search in, for example: if the user wanted to look for an article, he/she had to specify that from the drop menu before entering the keyword. Which was uncomfortable for the user due to many reasons.<br/> Now all what the user has to do is simply type the keyword he/she would like to search for, then he/she will be given all the available results.<br/> See commit https://github.com/hema-001/TreeLib/commit/db2d6be568daf65b71ec479993eb99890c2478ab for more details.

* **2019-11-07:** Total source file clean-up.<br/>To improve the readability, and to make the code more understandable by the upcoming maintainers.
See commit https://github.com/hema-001/TreeLib/commit/bb7965ccd6966c34e8d416deeae69f13c30058df for more details.

* **2019-11-09:** Admin functions has been added.</br>
Administrators now, can manipulate the website by, deleting articles/comments, and hide/show articles to the public.</br>
Since the library is an open access service, such a functionality is needed to monitor any inappropriate posts or articles.</br>
For now, administrators can be granted access to the website by the maintainers. However, in the future this can be changed.</br>
See commit https://github.com/hema-001/TreeLib/commit/8263abaa2c63882bf2e984ca9a2f809319182462 for more details.


## Yun Dabang & Ni Zhongjie

Yun Dabang & Ni Zhongjie developed the first version of TreeLib in 2018.

Project home page: http://118.25.96.118/gsrycloud/TreeLib/


# Contributor List

- Bob984456043-包振丰-201732120111
- ZhenCi-陈真赐-201732120114
- dzr201732120115-戴泽荣-201732120115
- ileaderx-WARD-201732120143
- almasoodi-SAEED-201732120146
- tarmommohammed-MOHAMMED TARMOM-201732120166
- hemo-khalil-ABDALMUHAYMN KHALIL-201730210234
- sanoussibarkay--barkay sanoussi sanoussi--201732120151
- AhamedSabuj--ahamed sabuj--201732120141
- charif13282--hossain arif--201732120157
- Agonza--agonza lewis conrad--201732120140
- lbynote-陆博业-201732120119
- EaLIFe-吕伊豪-201732120120
- 201732120130-周仙龙-201732102130
- Zhengkefu-郑可富-201732102129
- karro26-陈冬卉-201732120102
- Joffool-陈金龙-201732120112
- Weichao-Chen-陈伟超-201732120113
https://ftp.bmp.ovh/imgs/2021/03/0d4af19c7c9a9ee2.png
36 changes: 24 additions & 12 deletions templates/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{ message }}
{% endif %}

{% if articles%}
{% if articles %}
<table class="table table-hover table-striped">
<thead>
<tr>
Expand Down Expand Up @@ -36,27 +36,39 @@
{% endif %}


{% if comments%}
{% if comments %}
{% if comments[0] %}
<table class="table table-hover table-striped">
<thead>
<tr>
<th>article_title</th>
<th>comment</th>
<th>time</th>
<th>author</th>
</tr>
</thead>
<tbody>
{% for comment in comments %}
<thead>
<tr>
<th>article_title</th>
<th>comment</th>
<th>time</th>
<th>author</th>
</tr>
</thead>
{% endif %}
<tbody>
{%for comment in comments%}
<tr>
<td><a href="/article/{{ comment.article_id }}">{{ Tool.highlight_matched_parts(comment.article.title, kwd) | safe }}</a></td>
<td>{{ Tool.highlight_matched_parts(Tool.sensitive_words_filter(comment.body), kwd) | safe }}</td>
<td>{{ comment.time.strftime("%Y-%m-%d %H:%M") }}</td>
<td><a href="/author/{{ comment.author_id }}">{{ Tool.email_display_filter(comment.author.mail) }}</a></td>
</tr>
{% endfor %}
<!-- {% for comment in comments %}-->
<!-- <tr>-->
<!-- <td><a href="/article/{{ comment.article_id }}">{{ Tool.highlight_matched_parts(comment.article.title, kwd) | safe }}</a></td>-->
<!-- <td>{{ Tool.highlight_matched_parts(Tool.sensitive_words_filter(comment.body), kwd) | safe }}</td>-->
<!-- <td>{{ comment.time.strftime("%Y-%m-%d %H:%M") }}</td>-->
<!-- <td><a href="/author/{{ comment.author_id }}">{{ Tool.email_display_filter(comment.author.mail) }}</a></td>-->
<!-- </tr>-->
<!-- {% endfor %}-->
</tbody>
</table>


{% endif %}

{% endblock %}
14 changes: 13 additions & 1 deletion templates/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<body>
<nav class="navbar navbar-expand-sm bg-dark navbar-dark">
<ul class="navbar-nav">
<li class="nav-item active">
<li class="nav-item">
<a class="nav-link" href="/">ZJNUservice</a>
</li>
<li class="nav-item">
Expand Down Expand Up @@ -83,6 +83,18 @@
<div class="footer bg-primary navbar-fixed-bottom">

</div>

<!-- 实现共同头部的导航效果-->
<script>
   $(function(){
            $(".navbar-nav li a").each(function(){  
                $this = $(this);  
                if($this[0].href==String(window.location)){  
                    $this.parent("li").addClass("active");  
                }
            });
        });
</script>
</body>
<br>
<br>
Expand Down
Binary file added 效果演示.mp4
Binary file not shown.