-
Notifications
You must be signed in to change notification settings - Fork 9
Substitute words loaded from separate file, new additions #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Ahoy there @belliriccardo, Welcome to the crew. ☠️ Ye have landed plenty'o shiny phrases in that there CSV. But surely it should be a CSR file..? Ye say it, "Sea, yes! Arrr..!" (but I jest). This'll need fixing up before we sail it to the PyPI lagoons. Anyone doing Summat for ye to patch up before we hoist this sail..? But happy to accept your contribution to the crew when patched. Arrrrrr! 🏴☠️ |
Ye're right matey, but I be missin' th' skill to package this altogether. If ye need me, I'll be in th' quarters below deck, cap'n... |
Aye. I'll keel haul this out in the coming week or so. 👍 |
Disregard me last pigeon message, I 'ave figured it out! Should be jolly an' ready to go. |
…ectly. Example: Before: "How are you?" -> "How be you?" Now: "How are you?" -> "How be ye?" Also don't de-capitalize words in the main dict so that names don't get lowercase'd (Ex. "Jack" -> "jack" inside a string of text no longer happens)
Hmm... I've just tested it and it doesn't work. I think I know why, and will fix/check/merge when done. 👍 |
arrr.py
Outdated
@@ -24,66 +24,25 @@ | |||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||
""" | |||
import argparse as arrrgparse # Geddit..? ;-) | |||
from csv import reader as HELMSMAN # He be the only lad aboard who can read! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are ye screaming lads? helmsman
be the good and usual way.
#: MAJOR, MINOR, RELEASE, STATUS [alpha, beta, final], VERSION | ||
_VERSION = (1, 0, 3) | ||
|
||
_VERSION = (1, 1, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your editor be removing all them nice blank lines. Mates need restin betwen workin, ya know?
arrr.py
Outdated
} | ||
|
||
_PIRATE_WORDS = dict() | ||
with open('BLABBER.csv') as NONSENSE: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This here data file needs to be in yon package there mate, and ye be better usin pkgutil or importlib.resources to access it in a portable way!
setup.py
Outdated
@@ -31,5 +31,6 @@ | |||
"Topic :: Communications", | |||
"Topic :: Software Development :: Internationalization", | |||
], | |||
include_package_data=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This here line is good but does nothin’ for now: yon CSV trove must be inside yon package to be included as package booty!
Ahoy @merwok ! Me've forgotten a-boot(harharhar) this 'ere galley. Me've been' havin' a not so jolly time doin' me last pirate exams. About that there CSV file, I 'ave added it to th' MANIFEST.in file, I was thinkin' that was what was needed. If ye have any more comments or if I'm missin' somethin', feel free to tell! I'll go walk the plank now |
Nah laddie, yon manifest is for loading extra cargo say readme and such into yon sdist barrel, but that’s not gonna install them there files! Trust me old head and move yon file into yon package, that’s what ye need to get it packaged and installed and accessed, yarr! |
Ahoy there mateys..! @merwok you be an old sea dog full of packaging tales and lore for getting the booty in th'right place? Perchance you'd scrawl a treasure map for crew mate @belliriccardo to bury his CSV treasure in the right place? Yarrrrr... Rum and a rebase may be needed too, before this plan can happen (but it sounds like a profitable piratical enterprise). |
This here chart shows the way to get what I be sayin: belliriccardo#1 |
Ahoy there me maties..! Merry Christmas and wishing you good plunderin' in the new year. Yarrrr. If @belliriccardo lets @merwok's on board, I'll make it walk the plank into the shark infested waters o'this project. |
turn module into package, fix packaging
Allright! Sorry for me absence, ya know me've been plunderin' all these holidays! I 'ave merged @merwok pull request, sould be jolly now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yo ho ho
@@ -35,55 +33,16 @@ | |||
Documentation here: https://arrr.readthedocs.io/en/latest/ | |||
""" | |||
|
|||
|
|||
#: MAJOR, MINOR, RELEASE, STATUS [alpha, beta, final], VERSION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#: MAJOR, MINOR, RELEASE, STATUS [alpha, beta, final], VERSION | |
#: MAJOR, MINOR, RELEASE, STATUS [alpha, beta, final], VERSION |
#: MAJOR, MINOR, RELEASE, STATUS [alpha, beta, final], VERSION | ||
_VERSION = (1, 0, 3) | ||
|
||
_VERSION = (1, 1, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_VERSION = (1, 1, 0) | |
_VERSION = (1, 1, 0) |
|
||
del nonsense, gibberish | ||
|
||
#: A list of Pirate phrases to randomly insert before or after sentences. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#: A list of Pirate phrases to randomly insert before or after sentences. | |
#: A list of Pirate phrases to randomly insert before or after sentences. |
"Summat went awry, me lovely! Arrr..." | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Summat went awry, me lovely! Arrr..." | |
) | |
"Summat went awry, me lovely! Arrr...", | |
file=sys.stderr, | |
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ye should complain on tha stderr room laddie!
"Ye filthy bilge rat, don't try to fool me! I will gut yer insides!" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Ye filthy bilge rat, don't try to fool me! I will gut yer insides!" | |
) | |
"Ye filthy bilge rat, don't try to fool me! I will gut yer insides!", | |
file=sys.stderr, | |
) | |
sys.exit(1) |
you're,ye be | ||
you,ye | ||
your,yer | ||
yourself,yerself |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yourself,yerself | |
yourself,yerself |
"meeting": "parley with rum and cap'n", | ||
} | ||
_PIRATE_WORDS = dict() | ||
with open('BLABBER.csv') as nonsense: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python landlubbers think it good practiss to eschew side effects at importin’ time, like openin’ and readin’ file.
That’s fine thinkin’ but it requires ye to go roundabout and add some init
function like this here: https://github.com/python/cpython/blob/main/Lib/mimetypes.py#L336-L337
So me wonder what cap’n be thinkin’. Be fine to keep this simple if arrr
be mainly a command-line program, not a module for other landlubbers to use.
Made it such that new additions can just be appended at the end of the
.csv
file to keep the main file more clean. Also, there are plenty more substitutions. Arrr.