Author
|
zPlus <zplus@peers.community>
2020-06-05 05:45:18
|
Committer
|
zPlus <zplus@peers.community>
2020-06-05 05:45:18
|
Commit
|
9d3c76a
(patch)
|
Tree
|
2ac3163
|
Parent(s)
|
|
Merge branch 'master' of https://notabug.org/zPlus/freepost.git
* 'master' of https://notabug.org/zPlus/freepost.git:
Add naive link duplication prevention
commits diff:
aa365c2..9d3c76a
6 files changed,
17 insertions,
19 deletions
—
download
Diffstat
Diff options
+1/-1
M README.md
9
|
9
|
|
## Setup Python3 virtual environment
|
10
|
10
|
|
|
11
|
11
|
|
cd freepost-directory
|
12
|
|
- |
python3 -m venv venv (if this doesn't work, try `virtualenv -p python3 venv`)
|
|
12
|
+ |
python3 -m venv venv (if this doesn't work, try `virtualenv -p /usr/bin/python3 venv`)
|
13
|
13
|
|
source venv/bin/activate
|
14
|
14
|
|
pip3 install -r requirements.txt
|
15
|
15
|
|
|
+1/-1
M freepost/__init__.py
66
|
66
|
|
# "bleach" library is used to sanitize the HTML output of jinja2's "md2html"
|
67
|
67
|
|
# filter. The library has only a very restrictive list of white-listed
|
68
|
68
|
|
# tags, so we add some more here.
|
69
|
|
- |
bleach.sanitizer.ALLOWED_TAGS += [ 'br', 'img', 'p', 'pre', 'h1', 'h2', 'h3' ]
|
|
69
|
+ |
bleach.sanitizer.ALLOWED_TAGS += [ 'br', 'img', 'p', 'pre', 'h1', 'h2', 'h3', 'hr' ]
|
70
|
70
|
|
bleach.sanitizer.ALLOWED_ATTRIBUTES.update ({
|
71
|
71
|
|
'img': [ 'src' ]
|
72
|
72
|
|
})
|
+1/-1
M freepost/templates/about.html
58
|
58
|
|
Terms of Use
|
59
|
59
|
|
</h3>
|
60
|
60
|
|
<p>
|
61
|
|
- |
By using this website, you irrevocably agree to release your posts and comments under the <a href="http://creativecommons.org/licenses/by/4.0">CC BY 4.0</a> License. A link is sufficient for CC BY 4.0 attribution.
|
|
61
|
+ |
By using this website, you irrevocably agree to release your posts and comments under the <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a> License. A link is sufficient for CC BY 4.0 attribution.
|
62
|
62
|
|
</p>
|
63
|
63
|
|
<p>
|
64
|
64
|
|
The website is offered in the hope that it will be useful, but we do not assume any sort of legal responsibility or liability and we do not offer any sort of warranty. We cannot be held responsible for any misuse or money loss derived from the use of the website.
|
+7/-5
M freepost/templates/banner.html
13
|
13
|
|
# To maintain alignment, keep al lines below of the same length
|
14
|
14
|
|
# and with no padding.
|
15
|
15
|
|
#}
|
|
16
|
+ |
|
16
|
17
|
|
{#
|
17
|
18
|
|
<pre class="new_year">
|
18
|
19
|
|
.''.
|
23
|
24
|
|
*_\/_* -= o =- /)\
|
24
|
25
|
|
* /\ * .'/.\'. '
|
25
|
26
|
|
*..* :
|
26
|
|
- |
____ ___ _ ___
|
27
|
|
- |
|___ \ / _ \/ |/ _ \
|
28
|
|
- |
__) | | | | | (_) |
|
29
|
|
- |
/ __/| |_| | |\__, |
|
30
|
|
- |
|_____|\___/|_| /_/
|
|
27
|
+ |
____ ___ ____ ___
|
|
28
|
+ |
|___ \ / _ \___ \ / _ \
|
|
29
|
+ |
__) | | | |__) | | | |
|
|
30
|
+ |
/ __/| |_| / __/| |_| |
|
|
31
|
+ |
|_____|\___/_____|\___/
|
31
|
32
|
|
</pre>
|
32
|
33
|
|
#}
|
33
|
34
|
|
|
|
35
|
+ |
|
34
|
36
|
|
{# Peers Jam #}
|
35
|
37
|
|
{% set datetime = now() %}
|
36
|
38
|
|
{% if datetime.isoweekday() == 5 and datetime['hour'] >= 19 and datetime['hour'] <= 20 %}
|
+5/-9
M freepost/templates/layout.html
100
|
100
|
|
</div>
|
101
|
101
|
|
|
102
|
102
|
|
<footer>
|
103
|
|
- |
<p>
|
104
|
|
- |
Text is available under a <a href="http://creativecommons.org/licenses/by/4.0">Creative Commons Attribution 4.0 International License</a>.
|
105
|
|
- |
</p>
|
106
|
|
- |
|
107
|
103
|
|
<ul>
|
108
|
104
|
|
<li>
|
109
|
|
- |
<img alt="Peers" title="" src="/images/peers.png" />
|
110
|
|
- |
<a href="http://peers.community">Peers</a>
|
111
|
|
- |
<a href="https://dokk.org/The_Peers_Community">Community</a>
|
112
|
|
- |
</li>
|
113
|
|
- |
<li>
|
114
|
105
|
|
<img alt="RSS" title="" src="/images/rss.png" />
|
115
|
106
|
|
<a href="/rss/hot">Hot</a> •
|
116
|
107
|
|
<a href="/rss/new">New</a> •
|
121
|
112
|
|
<a href="https://notabug.org/zPlus/freepost">Source code</a>
|
122
|
113
|
|
</li>
|
123
|
114
|
|
<li>
|
|
115
|
+ |
<img alt="Peers" title="" src="/images/peers.png" />
|
|
116
|
+ |
<a href="http://peers.community">Peers</a>
|
|
117
|
+ |
<a href="https://dokk.org/The_Peers_Community">Community</a>
|
|
118
|
+ |
</li>
|
|
119
|
+ |
<li>
|
124
|
120
|
|
<img alt="TuxFamily" title="" src="/images/tuxfamily.png" />
|
125
|
121
|
|
Hosted at <a href="https://dokk.org/TuxFamily">TuxFamily</a>
|
126
|
122
|
|
</li>
|
+2/-2
M freepost/templates/post.html
66
|
66
|
|
</div>
|
67
|
67
|
|
|
68
|
68
|
|
{# "shortcut-submit" is a class used exclusively from javascript
|
69
|
|
- |
# to submit the form when a key (Ctrl+Enter) is pressed.
|
70
|
|
- |
#}
|
|
69
|
+ |
# to submit the form when a key (Ctrl+Enter) is pressed.
|
|
70
|
+ |
#}
|
71
|
71
|
|
<form action="" method="post" class="new_comment shortcut-submit">
|
72
|
72
|
|
<textarea
|
73
|
73
|
|
name="new_comment"
|