config.py 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #!/usr/bin/env python
  2. """
  3. $Id$
  4. This file is part of the anontwi project, http://anontwi.03c8.net
  5. Copyright (c) 2012/2013/2014/2015 by psy <epsylon@riseup.net>
  6. anontwi is free software; you can redistribute it and/or modify it under
  7. the terms of the GNU General Public License as published by the Free
  8. Software Foundation version 3 of the License.
  9. anontwi is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  11. FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  12. details.
  13. You should have received a copy of the GNU General Public License along
  14. with anontwi; if not, write to the Free Software Foundation, Inc., 51
  15. Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. """
  17. # This file contains your API tokens and secrets for AnonTwi
  18. # Remember that you can bridge data across different social networking sites to evade tracking.
  19. # ex: HOME->Tor->IRC->GNUSocial->Twitter->Facebook..
  20. # - Create a third party APP on your profile.
  21. # + GNU/Social:
  22. # - Login to your account
  23. # - Go to: Settings
  24. # - Click on: "Register an OAuth client application"
  25. # - Click on: "Register a new application"
  26. # * <yoursocialnetwork.net>/settings/oauthapps/new
  27. # - Fill form correctly
  28. # * Icon: You can use AnonTwi website logo
  29. # * Name: (ex: AnonTwi)
  30. # * Description: (ex: Anontwi -GNU/Social edition-)
  31. # * Source URL: (ex: http://anontwi.03c8.net)
  32. # * Organization: (ex: AnonTwi)
  33. # * Homepage: (ex: http://anontwi.03c8.net)
  34. # * Callback URL: (leave this BLANK)
  35. # * Type of Application: Desktop
  36. # * Default access for this application: Read-Write
  37. # + Twitter:
  38. # - Login to your account
  39. # - Go to: https://apps.twitter.com/
  40. # - Click on: "Create New App"
  41. # * https://apps.twitter.com/app/new
  42. # - Fill form correctly
  43. # * Name: (ex: AnonTwi)
  44. # * Description: (ex: Anontwi -GNU/Social edition-)
  45. # * Website: (ex: http://anontwi.03c8.net)
  46. # * Callback URL: (leave this BLANK)
  47. # - Get your OAuth settings: Click on the name of your new APP connector (ex: AnonTwi)
  48. # - Open "config.py" (THIS FILE!) with a text editor, and enter tokens (below!)
  49. # - Remember:
  50. # * If you go to use shell mode, you should generate your tokens with command: --tokens
  51. # * For connect using TOR add: --proxy "http://127.0.0.1:8118"
  52. # - Run ./anontwi or python anontwi (To use interface: ./anontwi --gtk)
  53. from core.gtk.config_gtk import *
  54. #"""GTK Environment"""
  55. try:
  56. token = open(DIR_TOKENS + FILE_CONS_TKN).readlines()
  57. APItokens = [{'consumer_key': token[0].strip(),
  58. 'consumer_secret' : token[1].strip()}]
  59. api = open(DIR_TOKENS + FILE_SOURCE_API).readlines()
  60. APIsources = [{'source_api' : api[0].strip()}]
  61. except:
  62. """Non GTK"""
  63. APItokens = [
  64. {
  65. 'consumer_key' : "", # enter your consumer_key
  66. 'consumer_secret' : "", # enter your consumer_secret
  67. }
  68. ]
  69. APIsources = [
  70. {
  71. 'source_api' : "", # enter your source API: <yoursocialnetwork.net>/api
  72. }
  73. ]