Skip to content
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

Suggestion: creating main index file/checking logs on program startup #5

Open
unsolaci opened this issue Mar 2, 2010 · 3 comments
Open
Labels
Milestone

Comments

@unsolaci
Copy link

unsolaci commented Mar 2, 2010

Not sure if this qualifies here, even if it does, it's a minor issue. More of a suggestion I think.

If a channel directory(logs/#channel/) does not exist, the bot creates the directory and appends a link with the name of the channel to the main index.html file("Logged Channels").
Now, if you remove only the channel directory by hand, the bot will create it, and append the link to the main index.html as usual, even though one already exists there.

Might be a good idea to check the logs on startup, maybe recreate the main index.html file based on existing logs/ subdirectories.

@excid3
Copy link
Owner

excid3 commented Mar 8, 2010

Sorry for the slow reply. With a commit I pushed the other day, it should now create the files if they don't exist without issue. Let me know if it works for you better now.

@unsolaci
Copy link
Author

unsolaci commented Jun 7, 2010

First of all: Sorry for the super-late reply.
Secondly: I've just downloaded the latest revision and I'm afraid it still does that. What I meant was that if you run the bot, let it log a little, then kill it, then rm the channel dir(logs/#channel/), but leave the main logs dir(logs/), and then run it again, what it does is create the channel dir(just the way it should), but it will also append the main index file(logs/index.html) with the channel name(the thing is, the main index file already has the link in it.). So it never checks what channel dirs are present.
My suggestion was to maybe generate the main index file based on what directories exist in the logs/ directory.

Anyways, this is not so much of an issue, and can be easily corrected by hand. What I noticed now, there is a similar, but worse issue as described here: http://github.com/excid3/logbot/issues#issue/6

@excid3
Copy link
Owner

excid3 commented Jun 10, 2010

Yeah sorry about that. I've been pretty busy with life and working on other projects that I haven't had time to fix up this bot. I'll see what I can do though. It could use a good refactoring anyways.

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

No branches or pull requests

2 participants