Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

Create required .json files on startup #39

Open
zachkont opened this issue Nov 22, 2017 · 7 comments
Open

Create required .json files on startup #39

zachkont opened this issue Nov 22, 2017 · 7 comments

Comments

@zachkont
Copy link
Owner

The utils.py module should probably create the grouplist.json, userlist.json, previousblogposts.json, previousmagesunite.json, previouscyborgmatt.json, previousbelvedere.json and previouswykrhm .json and initialize them as json files.

This is a temporary enhancement until #15 is addressed

@TimJentzsch
Copy link
Contributor

Yea, good point, currently if you are setting the project up some parts dont work because the json files don't exist.

@yusdacra
Copy link
Contributor

Hello! I was searching for some "beginner" issues and this seems to be a one. I could help, but i wanted to ask a question first. If i understand correctly, this just needs to "create a blank JSON file" right? Or, create a JSON file with some blank variables?

@zachkont
Copy link
Owner Author

Blank JSON file as in an empty document with opening and closing curly braces and a newline between them. The newline is for formatting purposes only (in case I'm debugging and need to check the saved list for some reason)

@RhysRead
Copy link

Hi, is this issue still open to fix?

@zachkont
Copy link
Owner Author

Yeap

@RhysRead
Copy link

Okay, I will take a look at this later on.

mathagician pushed a commit to mathagician/dotaUpdatesBot that referenced this issue Apr 28, 2018
mathagician pushed a commit to mathagician/dotaUpdatesBot that referenced this issue Apr 28, 2018
@Mindavi Mindavi mentioned this issue Aug 23, 2018
4 tasks
@BenHargreaves
Copy link
Contributor

BenHargreaves commented Oct 18, 2018

Hey would love to tackle this one if its still open. Seems fairly straightforward.

Not fully sure of the impact of the Utils.py code just yet, so I'm thinking I can just throw it in its own Method, which can be called on setup - rather than having the utils.py file potentially overwrite the existing JSON files every time its called

Update: Created a PR #56 for this - needed to import os.path to the utils.py file for the purpose of checking if the json files already exist before creating them to prevent them getting overwritten. Let me know if you think I should be handling this a different way, or if it needs polishing. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants