Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wantzel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
9
Issues
9
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
La Quadrature du Net
rpteam
wantzel
Commits
46221f03
Commit
46221f03
authored
Jan 08, 2017
by
Mindiell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajout d'un debug sur le touittage de la RP
parent
8edbf21a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
wantzel.py
wantzel.py
+4
-3
No files found.
wantzel.py
View file @
46221f03
...
...
@@ -174,9 +174,10 @@ def tweet(message):
twitter
=
Twitter
(
auth
=
auth
)
try
:
Utils
.
debug
(
"Tweeting: %s"
%
message
)
twitter
.
statuses
.
update
(
status
=
message
)
result
=
twitter
.
statuses
.
update
(
status
=
message
)
Utils
.
debug
(
"Result: %s"
%
result
)
except
Exception
:
pass
Utils
.
error
(
"Erreur lors du tweet"
)
class
Wantzel
(
object
):
...
...
@@ -827,7 +828,7 @@ class Wantzel(object):
if
len
(
title
)
+
min
(
len
(
link
),
23
)
>
135
:
# What is the number of chars we need to remove
excess
=
len
(
title
)
+
min
(
len
(
link
),
23
)
-
135
title
=
''
.
join
([
title
[:
-
(
excess
+
4
)],
' ...
'
])
title
=
''
.
join
([
title
[:
-
(
excess
+
2
)],
' …
'
])
tweet
(
messages
[
"tweet_rp_%s"
%
language
]
%
(
title
,
link
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment