Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
d2fc406b
Commit
d2fc406b
authored
6 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Return to blocked words
parent
ab1a82a1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/freedombone-app-pleroma
+3
-3
3 additions, 3 deletions
src/freedombone-app-pleroma
src/freedombone-ignore
+6
-6
6 additions, 6 deletions
src/freedombone-ignore
src/freedombone-unignore
+13
-13
13 additions, 13 deletions
src/freedombone-unignore
with
22 additions
and
22 deletions
src/freedombone-app-pleroma
+
3
−
3
View file @
d2fc406b
...
@@ -411,11 +411,11 @@ function create_pleroma_blocklist {
...
@@ -411,11 +411,11 @@ function create_pleroma_blocklist {
echo
" if [
\$
{#blocked} -gt 2 ]; then"
;
echo
" if [
\$
{#blocked} -gt 2 ]; then"
;
echo
" if [[
\"\$
blocked
\"
!= '#'* ]]; then"
;
echo
" if [[
\"\$
blocked
\"
!= '#'* ]]; then"
;
echo
' # Create a filter string for the pleroma configuration'
;
echo
' # Create a filter string for the pleroma configuration'
;
echo
" blocked_
regex=
\"
~r/
\$
{blocked}
/iu
\"
"
;
echo
" blocked_
word=
\"
\$
{blocked}
\"
"
;
echo
" if [
\"\$
muted_words_str
\"
]; then"
;
echo
" if [
\"\$
muted_words_str
\"
]; then"
;
echo
" muted_words_str=
\"\$
{muted_words_str},
\\\"\$
{blocked_
regex
}
\\\"\"
"
;
echo
" muted_words_str=
\"\$
{muted_words_str},
\\\"\$
{blocked_
word
}
\\\"\"
"
;
echo
' else'
;
echo
' else'
;
echo
" muted_words_str=
\"\\\"\$
{blocked_
regex
}
\\\"\"
"
;
echo
" muted_words_str=
\"\\\"\$
{blocked_
word
}
\\\"\"
"
;
echo
' fi'
;
echo
' fi'
;
echo
' fi'
;
echo
' fi'
;
echo
' fi'
;
echo
' fi'
;
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-ignore
+
6
−
6
View file @
d2fc406b
...
@@ -112,13 +112,13 @@ if [ "$ALL_TEXT" ]; then
...
@@ -112,13 +112,13 @@ if [ "$ALL_TEXT" ]; then
if
[
-f
"
$PLEROMA_CONFIG
"
]
;
then
if
[
-f
"
$PLEROMA_CONFIG
"
]
;
then
if
grep
-q
':mrf_keyword'
"
$PLEROMA_CONFIG
"
;
then
if
grep
-q
':mrf_keyword'
"
$PLEROMA_CONFIG
"
;
then
lines
=
$(
grep
-Pzo
'.*mrf_keyword(.*\n)*'
"
$PLEROMA_CONFIG
"
)
lines
=
$(
grep
-Pzo
'.*mrf_keyword(.*\n)*'
"
$PLEROMA_CONFIG
"
)
blocked_
regex
=
"~r/
${
ALL_TEXT
}
/iu
"
blocked_
word
=
"
${
ALL_TEXT
}
"
recompile
=
recompile
=
if
[[
"
$lines
"
==
*
' reject: []'
*
]]
;
then
if
[[
"
$lines
"
==
*
' reject: []'
*
]]
;
then
# first muted words
# first muted words
sed
-i
"/mrf_keyword/{N;s|reject:.*|reject: [
\"
$blocked_
regex
\"
],|}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;s|reject:.*|reject: [
\"
$blocked_
word
\"
],|}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;N;s|federated_timeline_removal:.*|federated_timeline_removal: [
\"
$blocked_
regex
\"
],|}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;N;s|federated_timeline_removal:.*|federated_timeline_removal: [
\"
$blocked_
word
\"
],|}"
"
$PLEROMA_CONFIG
"
recompile
=
1
recompile
=
1
else
else
# subsequent muted words
# subsequent muted words
...
@@ -126,9 +126,9 @@ if [ "$ALL_TEXT" ]; then
...
@@ -126,9 +126,9 @@ if [ "$ALL_TEXT" ]; then
if
[
"
$curr_filter_words
"
]
;
then
if
[
"
$curr_filter_words
"
]
;
then
filter_words
=
$(
echo
-n
"
$curr_filter_words
"
|
sed
's| reject: [ ||g'
|
sed
's| ],||g'
)
filter_words
=
$(
echo
-n
"
$curr_filter_words
"
|
sed
's| reject: [ ||g'
|
sed
's| ],||g'
)
# does it already exist?
# does it already exist?
if
[[
"
$filter_words
"
!=
*
"
\"
${
blocked_
regex
}
\"
"
*
]]
;
then
if
[[
"
$filter_words
"
!=
*
"
\"
${
blocked_
word
}
\"
"
*
]]
;
then
sed
-i
"/mrf_keyword/{N;s|reject:.*|reject: [
${
filter_words
}
,
\"
$blocked_
regex
\"
],|}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;s|reject:.*|reject: [
${
filter_words
}
,
\"
$blocked_
word
\"
],|}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;N;s|federated_timeline_removal:.*|federated_timeline_removal: [
${
filter_words
}
,
\"
$blocked_
regex
\"
],|}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;N;s|federated_timeline_removal:.*|federated_timeline_removal: [
${
filter_words
}
,
\"
$blocked_
word
\"
],|}"
"
$PLEROMA_CONFIG
"
recompile
=
1
recompile
=
1
fi
fi
fi
fi
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-unignore
+
13
−
13
View file @
d2fc406b
...
@@ -106,22 +106,22 @@ if [ "$ALL_TEXT" ]; then
...
@@ -106,22 +106,22 @@ if [ "$ALL_TEXT" ]; then
if
[[
"
$lines
"
!=
*
' reject: []'
*
]]
;
then
if
[[
"
$lines
"
!=
*
' reject: []'
*
]]
;
then
curr_filter_words
=
$(
printf
"%s"
"
$lines
"
|
grep
' reject: '
)
curr_filter_words
=
$(
printf
"%s"
"
$lines
"
|
grep
' reject: '
)
if
[
"
$curr_filter_words
"
]
;
then
if
[
"
$curr_filter_words
"
]
;
then
blocked_
regex
=
"~r/
${
ALL_TEXT
}
/iu
"
blocked_
word
=
"
${
ALL_TEXT
}
"
recompile
=
1
recompile
=
1
if
[[
"
$curr_filter_words
"
==
*
",
\"
${
blocked_
regex
}
\"
"
*
]]
;
then
if
[[
"
$curr_filter_words
"
==
*
",
\"
${
blocked_
word
}
\"
"
*
]]
;
then
sed
-i
"/mrf_keyword/{N;s|,
\"
${
blocked_
regex
}
\"
||}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;s|,
\"
${
blocked_
word
}
\"
||}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;N;s|,
\"
${
blocked_
regex
}
\"
||}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;N;s|,
\"
${
blocked_
word
}
\"
||}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;N;N;s|,
\"
${
blocked_
regex
}
\"
||}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;N;N;s|,
\"
${
blocked_
word
}
\"
||}"
"
$PLEROMA_CONFIG
"
else
else
if
[[
"
$curr_filter_words
"
==
*
"
\"
${
blocked_
regex
}
\"
,"
*
]]
;
then
if
[[
"
$curr_filter_words
"
==
*
"
\"
${
blocked_
word
}
\"
,"
*
]]
;
then
sed
-i
"/mrf_keyword/{N;s|
\"
${
blocked_
regex
}
\"
,||}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;s|
\"
${
blocked_
word
}
\"
,||}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;N;s|
\"
${
blocked_
regex
}
\"
,||}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;N;s|
\"
${
blocked_
word
}
\"
,||}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;N;N;s|
\"
${
blocked_
regex
}
\"
,||}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;N;N;s|
\"
${
blocked_
word
}
\"
,||}"
"
$PLEROMA_CONFIG
"
else
else
if
[[
"
$curr_filter_words
"
==
*
"
\"
${
blocked_
regex
}
\"
"
*
]]
;
then
if
[[
"
$curr_filter_words
"
==
*
"
\"
${
blocked_
word
}
\"
"
*
]]
;
then
sed
-i
"/mrf_keyword/{N;s|
\"
${
blocked_
regex
}
\"
||}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;s|
\"
${
blocked_
word
}
\"
||}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;N;s|
\"
${
blocked_
regex
}
\"
||}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;N;s|
\"
${
blocked_
word
}
\"
||}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;N;N;s|
\"
${
blocked_
regex
}
\"
||}"
"
$PLEROMA_CONFIG
"
sed
-i
"/mrf_keyword/{N;N;N;s|
\"
${
blocked_
word
}
\"
||}"
"
$PLEROMA_CONFIG
"
else
else
recompile
=
recompile
=
fi
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment