Skip to content

30 comments

I haven't tested this but I have a question. Why three files? You could put everything inside archupdate and put the corresponding shebang on top like #! /usr/bin/env python3.

You should maybe look into setuptools and create a Makefile with a install and uninstall subcommand. This may be over the top but it makes installing and uninstalling way easier.

And, by the sake of god, please don't use camelCase. This may be personal preference but it is so hard to read. PEP8.

24 points

You're correct that snake case is proper Python style (and its what I use when I write python), but I personally find camel case far easier to read, particularly when the name is made up of more than 2 words. To each his own I guess

22 points

Snake case is way (and I mean wayyy) more grep-able than camel case though. One of the reasons why I prefer it.

8 points

PEP8 notwithstanding, don't browbeat somebody about consistent labeling that differs from your preference. Some find underscore-laden names easier to read than mixed case. At least one other (me) finds that the extra length harms readability more than it helps by increasing the frequency of line breaks or extra-long lines in single statements.

As PEP8 indicates, the guide is about infra-project consistency and legibility. With some debate over optimal legibility, recognize that others have different tastes and move on.

The only reason to promote strict adherence to any style guide is when software is being considered for inclusion in a standard library and ought to be consistent with other parts of the library. Because most Python software will never be included in the standard library (nor should it, especially for tasks like "fetch a list of Arch Linux news"), critiques of which style is applied are most often gratuitous.

4 points

Everyone has its own preference but I think one should at least somewhat follow pythons style guide if the code is made public. I won't judge someone just because he doesn't follow PEP8. I just don't like camelCase :D

2 points

Yeah, one should follow the recommendations. I use both python and java for different things and of course I use camelCase in java.

4 points

Thanks for the recommendations.

I used camel case just because it comes naturally to me, but I might do an update to make it more standard.

I'm gonna look into how to make it installable at some point, so thank you for for those recs too

I separated the files out just cos for me it was easier to read/update - i like separation for separate things

3 points

A makefile?! Why not just a standard pypi package?

1 points

It was just a suggestion. I use a Makefile to simplify some commands. Most of the time I have at lest make clean to delete build files and make init to create a virtual environment and install all requirements.

2 points

That's really interesting, I didn't know that about python. I don't find camel case hard to read, but I will certainly keep this in mind!

1 points

I've now updated it to use snake case rather than camel case :)

1 points

Some concerns:

  1. I believe it will fail if username is different from the home folder name. That's why I usually just store files in the same dir as a script.

  2. If you still want to use user folder, some people don't like a folder created by every software appearing in $HOME (even hidden). Unix-way would be storing temp files in .cache/software-name

3 points

First suggestion is actually a good suggestion I hadn't thought of, I'll look into it.

Thanks for bringing .cache to my attention, that's a great idea thank you

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

โ†orโ†’
Previous / next file
โ†‘orโ†“
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.