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

Added ability to run main.py without being in the repo's folder, updated readme.md and changed a false information in readme.md #30

Closed
wants to merge 1 commit into from

Conversation

tE3m
Copy link

@tE3m tE3m commented Jan 2, 2019

-Added variable db to fix #17 (comment) in main.py (it wasn't possible to create it inside of setting.json because main.py first has to know the path to settings.json)
-Updated readme.md

  1. Added description for function above
  2. Changed false order at /set

-Added variable db in main.py (it wasn't possible to create it inside of setting.json because main.py first has to know the path to settings.json)
-Updated readme.md
 1. Added description for function above
 2. Changed false order at /set
@Tkd-Alex
Copy link
Owner

Tkd-Alex commented Jan 4, 2019

I'm not sure is a good idea insert another settings for the user.
Normaly a script is executed in the main folder.

Anyway, I'm happy you want to collab! :) Do the following fix and I'll accept your pr.

  • Replace db variable with settings_path and set it default as
    settings_path = './

  • Fix the readme:

  1. Populate settings.json with your data.
{
    "telegram_token": "xxxx",
    "instapy_folder": "/home/xxxx/GitHub/instapy_bot",
    "allowed_id": [ "chat_id from GiveChatId_Bot", "342342" ]
}

If you want to execute the script by another folder that main edit the following line in main.py
settings_path = '/path/to/Telegram-InstaPy-Scheduling/'

@tE3m
Copy link
Author

tE3m commented Jan 4, 2019

I could also only leave this feature in my fork of your repo if you don't think it's relevant for all users.

@tE3m tE3m closed this Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FileNotFoundError: [Errno 2] No such file or directory: 'settings.json'
2 participants