Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
8
83bot
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Elizabeth Myers
83bot
Commits
dd1ea06b
Commit
dd1ea06b
authored
Aug 22, 2018
by
Elizabeth Myers
💬
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://code.foxkit.us/Elizafox/83bot
parents
77750e3d
04328465
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
eightdotthree.py
eightdotthree.py
+7
-7
No files found.
eightdotthree.py
View file @
dd1ea06b
...
...
@@ -71,7 +71,7 @@ class Generator:
if
total_len
>
13
:
# Even with continuations we can't exceed this, but let's
# give a random chance to shorten, or try again.
if
random
.
randint
(
0
,
5
)
==
0
:
if
random
.
randint
(
0
,
14
)
==
0
:
filename
+=
word
filename
=
filename
[:
6
]
filename
+=
"~1"
...
...
@@ -96,22 +96,22 @@ class Generator:
filename
+=
word
# Special cases
if
total_len
==
6
and
random
.
randint
(
0
,
9
)
!=
0
:
# 1 in 1
0
chance of a ~1 substitution
if
total_len
==
6
and
random
.
randint
(
0
,
14
)
!=
0
:
# 1 in 1
5
chance of a ~1 substitution
filename
+=
"~1"
elif
total_len
==
7
and
random
.
randint
(
0
,
19
)
!=
0
:
# 1 in 20 chance of continuing, otherwise consider adding ~1 or
# a character, then the extension
if
random
.
randint
(
0
,
4
)
==
0
:
# 1 in 5 chance of adding ~1
if
random
.
randint
(
0
,
1
4
)
==
0
:
# 1 in
1
5 chance of adding ~1
filename
=
filename
[:
6
]
+
"~1"
else
:
filename
+=
random
.
choice
(
self
.
validlast
)
filename
+=
random
.
choice
(
self
.
extlist
).
upper
()
elif
total_len
==
8
:
# 1 in 1
0
chance we change it to ~1
if
random
.
randint
(
0
,
9
)
==
0
:
# 1 in 1
5
chance we change it to ~1
if
random
.
randint
(
0
,
14
)
==
0
:
filename
=
filename
[:
6
]
+
"~1"
# Add extension and call it a day
...
...
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