Giter Club home page Giter Club logo

anon's Introduction

Hi there ๐Ÿ‘‹

I am a software developer and design researcher with two decades of experience bridging the worlds of data management and the Web. I have worked in academia, startups, corporations and government. I work best as a member of agile, highly collaborative teams that focus on knowledge sharing and a commitment to sustainability.

If you want to get in touch please email me at [email protected]. You can also find me on fediverse at @[email protected], and some occasional posts on my website.

anon's People

Contributors

alightedlamp avatar cbeer avatar chrismeller avatar chrisrodrigue avatar dependabot[bot] avatar edsu avatar ffffelix avatar glench avatar hugovk avatar ineffyble avatar jarib avatar komachi avatar konklone avatar lokal-profil avatar mavrikant avatar mbklein avatar mjgiarlo avatar nickslevine avatar nwithan8 avatar pdelteil avatar ruebot avatar scronide avatar somuchforsubtlety avatar stefan2904 avatar sungmatt avatar tcyrus avatar tokyoq avatar tondatto avatar vnglst avatar wdenton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anon's Issues

Verify twitter app authentication

Here is a thought.

How about we add a check at the start which connects to twitter's api and verifies the config.json twitter settings ?

As we currently don't have logs, this check performed at startup will assist in debugging.

Check twitter api access at startup

anon.coffee was running fine for 24 hours and then the process died. No logs are available however as I redirected stout I can ascertain that this was due to an issue with the twitter api access:

{ [Error: Unknown Twitter API Error]
message: 'Unknown Twitter API Error',
statusCode: 401,
code: undefined,
allErrors: undefined,
twitterReply: '{"request":"/1.1/statuses/update.json","error":"Read-only
application cannot POST."}' }

Ideally Anon should check twitter access at startup thus preventing the application quitting upon such an error.

Ensure messages are below 140 chars

The bot should make sure messages are less than 140 chars by truncating the title of the Wikipedia page.

{ [Error: Status is over 140 characters.]
  message: 'Status is over 140 characters.',
  statusCode: 403,
  code: 186,
  allErrors: [ { code: 186, message: 'Status is over 140 characters.' } ],
  twitterReply: '{"errors":[{"code":186,"message":"Status is over 140 characters."}]}' }

This should probably hook into whatever templating solution we end up with.

Support non-English wikipedias

I want to run this bot to monitor edits by the Israeli Knesset. I'd would like the bot to monitor both English and Hebrew wikipedia, but I have no way to configure which wiki the bot will watch.

netmask throw errorr Invalid mask for ip4: 255

On nitrous.io node.js box I get error:
/home/action/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:672 throw err; ^ Error: Invalid mask for ip4: 255
and app terminates if ip ranges defined using netmask while using array everything works OK.
My IP ranges is ["193.41.81.0", "193.41.81.255"].

Clarify Install Instructions

Hi Ed! You kind of avoid documenting getting Twitter API stuff, which is fine and easily Googleable, but I missed the step to make the app Read and Write and got this error a few times:

{ [Error: Unknown Twitter API Error]
message: 'Unknown Twitter API Error',
statusCode: 401,
code: undefined,
allErrors: undefined,
twitterReply: '{"request":"/1.1/statuses/update.json","error":"Read-only application cannot POST."}' }

So maybe a reminder to make the Twitter app Read and Write instead of the default Read?

D

tweet status template in config

To support multiple languages it would be useful to make the status update text into a template that can be customized and placed into the config.

Time out

It's difficult for me to tell if this is just happening on my computer, or if its my instance of anon, but I've noticed that when I start the process it will run for a few hours and then my network monitor will stop reporting activity. Unless I reinitiate the process it will stay dead.

Accept accesslevel 'read-write-directmessages'

Currently having the access level as read-write-directmessages results in the error no read-write permission for access token. Strictly speaking this is not right, as the access level read-write-directmessages does give read-write permission, however only x-access-level: read-write is currently accepted.

(one could argue that since there is no need for access to direct messages, one should use that access level, but then the error-message should be changed a bit :)).

Autogenerate configuration

Perhaps it would be useful to autogenerate a config file when anon is first run, which would prompt the user for the necessary information and persist it to ~/.anon which would be the new default location for the configuration file?

Change "by" to "from"

I think the "edited anonymously by" language in the standard tweets is giving a false sense of authorship. Really, all we can say for sure about these edits is that they they come from IP ranges that belong to Congress (or wherever), not that they are attributable to an organization like U.S. Senate. It seems more accurate to change this wording to "edited anonymously from" rather than "by", and let followers make up their own minds whether the edit comes from an elected official, staff, intern, or someone on public wifi.

Specifying multiple conf/range.json files in config.json

I think it would be useful to be able to specify an array of JSON range files in config.json, like so:

{
    "nick": "yourIrcNickHere",
    "accounts": [
    {
      "consumer_key": "",
      "consumer_secret": "",
      "access_token": "",
      "access_token_secret": "",
      "template": "{{page}} Wikipedia article edited anonymously by {{name}} {{&url}}",
      "ranges":  ["conf/range_one.json", "conf/range_two.json"]
      }
    ]
}

Combine multiple edits in a short time period

As you can see currently at my AussieParlEdits bot ( http://twitter.com/aussieparledits ), someone editing a page several times in a few minutes can end up being quite spammy.

I'd suggest some sort of collate feature. Perhaps tweet the first edit immediately, but if another edit to that page comes in within a time period, hold it, and wait until new edits stop appearing, then tweet something along the lines of "Edited 7 times by..."

IP Range Error

I've been running the process on --noop so far and just received the first hit, but the IP address isn't making sense based on the range.

https://en.wikipedia.org/w/index.php?diff=616917941&oldid=604169949

The IP address range I gave it for this specific agent is:

"Agent": [
  ["199.19.16.0", "199.19.27.255"],
  ["4.42.247.224", "4.42.247.255"]
]

I don't believe an address of 199.19.250.20 should be attributed to this agent.

Error: Missing required parameter status

I had anon running for about half an hour (with latest fixes), and it threw this error:

{ [Error: Missing required parameter: status.]
message: 'Missing required parameter: status.',
statusCode: 403,
code: 170,
allErrors: [ { code: 170, message: 'Missing required parameter: status.' } ],
twitterReply: '{"errors":[{"code":170,"message":"Missing required parameter: s
tatus."}]}' }

Hmm...

Error when loading config

Hey, so I've been in the process of setting up my first anon instance and this is the output I'm getting. Does anyone know what is wrong or how I could fix it?

~/anon $ ./anon.coffee
loaded config from ./config.json
/mnt/sdh1/arkie/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:672
throw err;
^
TypeError: undefined is not a function
at isIpInAnyRange (/mnt/sdh1/arkie/anon/anon.coffee:45:10)
at inspect (/mnt/sdh1/arkie/anon/anon.coffee:105:12)
at /mnt/sdh1/arkie/anon/anon.coffee:136:11
at Client. (/mnt/sdh1/arkie/anon/node_modules/wikichanges/wikichanges.js:34:9)
at Client.emit (events.js:118:17)
at Client. (/mnt/sdh1/arkie/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:477:22)
at Client.emit (events.js:107:17)
at /mnt/sdh1/arkie/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:669:22
at Array.forEach (native)
at Socket. (/mnt/sdh1/arkie/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:666:15)
at Socket.emit (events.js:107:17)
at readableAddChunk (_stream_readable.js:162:16)
at Socket.Readable.push (_stream_readable.js:125:10)
at TCP.onread (net.js:514:20)

Error: Invalid net address: Jordy12345678900

I get an error listed below while runing anon on nitrous.io node.js box.
Any hits to find a sollution? This errorr occurs approximately 30-60 secs after I start an app.

Thank you for support.

/home/action/node_modules/wikichanges/node_modules/irc/libirc.js:672 throw err; ^ Error: Invalid net address: Jordy12345678900 at new Netmask (/home/action/node_modules/netmask/lib/netmask.js:67:15) at Netmask.contains (/home/action/node_modules/netmask/lib/netmask.js:80:67) at isIpInRange (/home/action/anon/anon.coffee:31:31) at isIpInAnyRange (/home/action/anon/anon.coffee:35:8) at /home/action/anon/anon.coffee:53:12 at Client.<anonymous> (/home/action/node_modules/wikichanges/wikichanges.js:34:9) at Client.EventEmitter.emit (events.js:106:17) at Client.<anonymous> (/home/action/node_modules/wikichanges/node_modules/irc/lib/irc.js:477:22) at Client.EventEmitter.emit (events.js:95:17) at /home/action/node_modules/wikichanges/node_modules/irc/lib/irc.js:669:22 at Array.forEach (native) at Socket.<anonymous> (/home/action/node_modules/wikichanges/node_modules/irc/lib/irc.js:666:15) at Socket.EventEmitter.emit (events.js:95:17) at Socket.<anonymous> (_stream_readable.js:746:14) at Socket.EventEmitter.emit (events.js:92:17) at emitReadable_ (_stream_readable.js:408:10) at emitReadable (_stream_readable.js:404:5) at readableAddChunk (_stream_readable.js:165:9) at Socket.Readable.push (_stream_readable.js:127:10) at TCP.onread (net.js:528:21)

something broke overnight

running anon instance on a VPS in a tmux session. went to check the session, came back to this:

/root/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:672
                    throw err;
                          ^
ReferenceError: message is not defined
  at Client.<anonymous> (/root/anon/node_modules/wikichanges/wikichanges.js:45:34)
  at Client.EventEmitter.emit (events.js:95:17)
  at Client.<anonymous> (/root/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:550:26)
  at Client.EventEmitter.emit (events.js:95:17)
  at /root/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:669:22
  at Array.forEach (native)
  at Socket.<anonymous> (/root/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:666:15)
  at Socket.EventEmitter.emit (events.js:95:17)
  at Socket.<anonymous> (_stream_readable.js:746:14)
  at Socket.EventEmitter.emit (events.js:92:17)
  at emitReadable_ (_stream_readable.js:408:10)
  at emitReadable (_stream_readable.js:404:5)
  at readableAddChunk (_stream_readable.js:165:9)
  at Socket.Readable.push (_stream_readable.js:127:10)
  at TCP.onread (net.js:526:21)

any help? using ubuntu with universe nodejs packages.

Script crashes when a duplicate tweet is tweeted

Ideally speaking it should not be tweeting duplicates.

Here is the error log:

{ [Error: Status is a duplicate.]
  message: 'Status is a duplicate.',
  statusCode: 403,
  code: 187,
  allErrors: [ { code: 187, message: 'Status is a duplicate.' } ],
  twitterReply: '{"errors":[{"code":187,"message":"Status is a duplicate."}]}' }

Monitor anonymous (or all) edits to articles about congress people?

via @dwhly it should be possible to build a list of all Wikipedia articles about congressional representatives, and then also tweet anonymous edits from anywhere.

This would substantially broaden the scope of what anon is doing currently, and could get quite noisy/ranty, but it might be worth an experiment.

TypeError

Just updated to the most recent version to test and was the lucky recipient of the following error:

Goldmans-MacBook-Air-3:anon Goldman$ ./anon.coffee --verbose

/Users/Goldman/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:672
                    throw err;
                          ^
TypeError: Cannot read property 'length' of undefined
  at /Users/Goldman/anon/anon.coffee:87:5
  at Client.<anonymous> (/Users/Goldman/anon/node_modules/wikichanges/wikichanges.js:34:9)
  at Client.emit (events.js:106:17)
  at Client.<anonymous> (/Users/Goldman/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:477:22)
  at Client.emit (events.js:95:17)
  at /Users/Goldman/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:669:22
  at Array.forEach (native)
  at Socket.<anonymous> (/Users/Goldman/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:666:15)
  at Socket.emit (events.js:95:17)
  at Socket.<anonymous> (_stream_readable.js:748:14)
  at Socket.emit (events.js:92:17)
  at emitReadable_ (_stream_readable.js:410:10)
  at emitReadable (_stream_readable.js:406:5)
  at readableAddChunk (_stream_readable.js:168:9)
  at Socket.Readable.push (_stream_readable.js:130:10)
  at TCP.onread (net.js:528:21)

Twit: command not found

I'm trying to run anon on centos

./anon.coffee
./anon.coffee: line 1: Twit: command not found
./anon.coffee: line 2: syntax error near unexpected token (' ./anon.coffee: line 2:Netmask = require('netmask').Netmask'

Any ideas ? I'm thinking some libraries were not found ? I tried a npm install -g twit but same.

Multiple Twitter accounts

It would be cool to have a single bot that posts to several accounts, i.e.:

{
  "nick": "yourIrcNickHere",
  "accounts": [
      {
          "consumer_key": "",
          "consumer_secret": "",
          "access_token": "",
          "access_token_secret": "",
          "ranges": {
              "US House of Representatives": [
                  ["143.231.0.0", "143.231.255.255"],
                  ["137.18.0.0", "137.18.255.255"],
                  ["143.228.0.0", "143.228.255.255"],
                  ["12.185.56.0", "12.185.56.7"],
                  ["12.147.170.144", "12.147.170.159"],
                  ["74.119.128.0", "74.119.131.255"]
              ],
              "US Senate": [
                  ["156.33.0.0", "156.33.255.255"]
              ]
          }
      }
  ]
 }

That way I can set up multiple accounts for different purposes without having to run multiple instances of the bot.

irc.js:672 : status is not defined

./anon.coffee

/home/xxxx/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:672
throw err;
^
ReferenceError: status is not defined
at /home/xxxx/anon/anon.coffee:59:55
at Client. (/home/xxxx/anon/node_modules/wikichanges/wikichanges.js:34:9)
at Client.emit (events.js:106:17)
at Client. (/home/xxxx/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:477:22)
at Client.emit (events.js:95:17)
at /home/xxxx/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:669:22
at Array.forEach (native)
at Socket. (/home/xxxx/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:666:15)
at Socket.emit (events.js:95:17)
at Socket. (stream_readable.js:748:14)
at Socket.emit (events.js:92:17)
at emitReadable
(_stream_readable.js:410:10)
at emitReadable (_stream_readable.js:406:5)
at readableAddChunk (_stream_readable.js:168:9)
at Socket.Readable.push (_stream_readable.js:130:10)
at TCP.onread (net.js:528:21)

Any ideas what is happening here? anon runs for 20 mins then crap out here.

Error: Unexpected token

I have all dependencies, but when I finally try to run the bot script using the command "coffee anon.coffee", I get the following output:

C:\Users\user\anon>coffee anon.coffee
SyntaxError: C:\Users\user\anon\config.json: Unexpected token ]
at Object.parse (native)
at Object.Module._extensions..json (module.js:482:27)
at Module.load (C:\Users\user\AppData\Roaming\npm\node_modules\coffe e-script\lib\coffee-script\register.js:45:36)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at getConfig (C:\Users\user\anon\anon.coffee:42:10)
at main (C:\Users\user\anon\anon.coffee:45:12)
at Object.<anonymous> (C:\Users\user\anon\anon.coffee:63:3)
at Object.<anonymous> (C:\Users\user\anon\anon.coffee:3:1)
at Module._compile (module.js:456:26)

However, when I run the bot script using the unix-format command "./anon.coffee" in cygwin, there is no output. Any ideas?

Limit to main namespace? (Enhancment)

Appologies if this ends up being a wikichanges issue.

Would it be possible to limit anon (through a toggle in config) to only look at contributions to the main namespace (articles for Wikipedia, more complicated for Commons). I would argue that the other namespaces are often of less interest to the average tweet reader. The main reason for the suggestion however is that edits to other pages, especially talk pages of various kinds, often risks linking usernames with IP addresses and thus the companies/departments they are working in.

As a concrete example: I picked up on an anon edit to a talk page which was immediately followed by an entry where a user signed the entry.

Separate IP Ranges from Bot Config

Now that individual IP ranges are being contributed back, it's gotten more difficult to maintain your own bot config.

With IP ranges and the rest of your bot's config in the same file you either have to maintain separate configs (one for actual use, one for contributing your IP ranges) or manually wipe out your Twitter credentials every time you want to push a new update (and hope you don't accidentally commit the whole thing because you're drunk not paying attention).

I suggest an easy backwards-compatible change: In your main config file if the "ranges" key appears to be an object, we treat it as a list of ranges (the current behavior). If it is a string, it is considered a separate config file containing the ranges object that gets loaded instead.

Logs ?

How can I verify anon is working ?

Imagine anon is running in a country where anonymous edits are few and far between. Anon is running but how do I know it's actually working? I don't see log files, perhaps we should add a log file?

I can see a node process that is spawned. What happens when this process dies, no logs right ?

Maybe there are logs that I'm not seeing ?

Thanks.

Script crashing after processing several hundred edits

As mentioned on the chat. Here is the Stack trace. I've replaced the path to anon repo with [path]:

loaded config from ./config.json
[path]/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:672
                    throw err;
                          ^
TypeError: Cannot read property 'compareTo' of undefined
  at compareIps ([path]/anon/anon.coffee:28:19)
  at isIpInRange ([path]/anon/anon.coffee:38:5)
  at [path]/anon/anon.coffee:45:28
  at Array.filter (native)
  at isIpInAnyRange ([path]/anon/anon.coffee:45:10)
  at inspect ([path]/anon/anon.coffee:105:12)
  at [path]/anon/anon.coffee:136:11
  at Client. ([path]/anon/node_modules/wikichanges/wikichanges.js:34:9)
  at Client.emit (events.js:118:17)
  at Client. ([path]/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:477:22)
  at Client.emit (events.js:107:17)
  at [path]/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:669:22
  at Array.forEach (native)
  at Socket. ([path]/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:666:15)
  at Socket.emit (events.js:107:17)
  at readableAddChunk (_stream_readable.js:161:16)
  at Socket.Readable.push (_stream_readable.js:128:10)
  at TCP.onread (net.js:514:20)

Appears to be a network issue? We're on an Amazon instance if that's relevant.

Problem with nitrous.io installation

Ed,

when i trying to run anon in nitrous.io box, I get error:

Error: Cannot find module './config.json'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.main as run
at Object. (/home/action/.parts/lib/node_modules/anon/bin/anon:12:8)
at Object. (/home/action/.parts/lib/node_modules/anon/bin/anon:14:4)
at Module._compile (module.js:456:26)

Also, I would like to ask you how to configure to track not only wikipedia.com but also lt.wikipedia.com and lt.wikipedia.com domains. Thank you.

Issue with some CIDR

Any suggest to know exactly which IP are "expanded" from CIDR and the full set of IP monitored?
Not sure if related with #40 b/c I don't get any error but it fail in recognizing IP to monitor with wikipedia updates.
I tried out too some IP/CIDR I know are incorrect, they require additional cfgs. Online IP CIDR fail too in getting that kind. I expected to get some errors. Nothing.

Requesting access on Wikimedia tool server

Per the instructions at https://tools.wmflabs.org/anon/ I'm requesting access to set up on the tool server shared instance. I'm trying to stand up an instance for the alternative medicine industry at @AltMedEdits - I've gotten anon running and have a few ranges, but I have yet to get a hit. So I figure a shared instance would be a good bet rather than paying to run an instance that rarely gets any hits.

One note: I am very interested in using the whitelist functionality as well, but I note in another issue you're thinking of removing it from this project. Please advise - are you going to set up a shared instance of the Congress Edits fork too?

My Tools account is also named krelnik.

politikedits ip ranges are too broad

@jarib wrote in the austriaedits (now politikedits) pull request #64

A quick glance at the top IPs, it seems to me that you're covering a bit too much. Edits made by universitites/educational institutions aren't really interesting, IMHO.

Your config also has the same range listed multiple times, i.e. it claims that 193.170.0.0/15 belongs to Statistik Austria, Verteidigungsminsiterium, Verkehrsministerium, which isn't going to be helpful (I bet anon will just use the first match, "Statistik Austria", for all edits from there).

I took a look at one tweet:

https://twitter.com/politikedits/status/491513774760001536

If you follow through to the diff you'll see that the IP in question (193.170.127.132) is from a university. The description of the politikedits bot makes it sound like it is only tweeting changes from the Government.

Isn't this problematic?

Enhancment: @metadata in ranges.json

For a completely externalised ranges.json file it might be nice to add an "@metadata" object containing information such as source of ranges, last date they were verified etc.

I'm currently unsure how adding a field like this would be handled by the app since I can't figure out how it deals with incorrectly formatted range objects. If it does throw a wrench in the works would it be possible to make it skip name=@metadata (or some similar convention)?

Missing first edits from an IP on launch

It seems that the first time that an IP address in range makes an edit after anon is launched, the edit is ignored. In --noop mode, I've been able to reproduce this on several different IP addresses while testing. It would seem to me that this means that the first edit from any IP in range is missed, after each launch of anon.

  1. Start anon
  2. Edit a page from an IP in range (let's say 127.0.0.2)
  3. Nothing listed in the console
  4. Edit a page from the same IP in range (again, 127.0.0.2)
  5. Appears in console
  6. Edit a page from 127.0.0.3
  7. Nothing listed in console
  8. Edit a page from 127.0.0.3 again
  9. Appears in console
  10. Edit a page from 127.0.0.3 again
  11. Appears in console
  12. Control+C to kill anon
  13. Start anon again
  14. Edit a page from 127.0.0.3 again
  15. Nothing appears in console
  16. Edit a page from 127.0.0.3 again
  17. Now it re-appears in console.

As provided here, the second, third, and so on are all showing up just fine. The first one never does. And even if an IP has made a change before, that is forgotten and the first update on re-launch of anon is missed again.

Instance Inventory?

Now that anon no longer has the configuration files maybe we should at least have an inventory of known instances in the README.md? Note: this is related to #37 which has been closed.

config.json: Unexpected token c

I did a pull tonight, now I got problems, any ideas ? config.json is valid json

./anon.coffee
SyntaxError: /home/xxxxx/anon/config.json: Unexpected token c
at Object.parse (native)
at Object.Module._extensions..json (module.js:482:27)
at Module.load (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at getConfig (/home/xxxxx/anon/anon.coffee:41:3)
at main (/home/xxxxx/anon/anon.coffee:63:12)
at Object. (/home/xxxxx/anon/anon.coffee:80:3)
at Object. (/home/xxxxx/anon/anon.coffee:3:1)
at Module._compile (module.js:456:26)

app's permission to write was revoked

twitter revoked my app's permission to write tweets... getting errors spammed in the console because of this. just filed an appeal with twitter.

anyone else had this issue? upset with twitter because of it.

Running 'anon' can't find config

When I run the command 'anon' after setting up the install and config file, I get this error despite being in the correct directory:

Error: Cannot find module './config.json'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.main as run
at Object. (/usr/local/lib/node_modules/anon/bin/anon:12:8)
at Object. (/usr/local/lib/node_modules/anon/bin/anon:14:4)
at Module._compile (module.js:456:26)

Is it possible I need to change permissions?

Making an organization-independent implementation

I'm wondering how hard it would be to make an implementation of this that would not require initially setting IP ranges. Rather, the bot would look at every anonymous Wikipedia edit, try to link the IP address of the edit with an organization on the fly using reverse DNS, and, if successful, tweet a link to the edit with the name of the organization just found.

Error: Cannot find module 'mustache'

I did a git pull, got the latest and greatest and now :

./anon.coffee

Error: Cannot find module 'mustache'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/railo/anon/anon.coffee:7:17)
at Object. (/home/railo/anon/anon.coffee:3:1)
at Module._compile (module.js:456:26)

Did pull request
Add template support via Mustache #22
#22 break this by chance ?

Invalid net address: Ad90189018

Sometimes when there is a anonymous edit, there seems to be a address when the application cannot handle well at the moment. Output:

{ channel: '#en.wikipedia',
  flag: 'hit',
  page: 'Special:Log/abusefilter',
  pageUrl: 'http://en.wikipedia.org/wiki/Special:Log/abusefilter',
  url: '',
  delta: null,
  comment: 'Ad90189018 triggered [[Special:AbuseFilter/354|filter 354]], performing the action "edit" on [[\u000302User talk:Ad90189018\u000310]]. Actions taken: Tag ([[Special:AbuseLog/10618251|details]])',
  wikipedia: 'English Wikipedia',
  wikipediaUrl: 'http://en.wikipedia.org',
  wikipediaShort: 'en',
  wikipediaLong: 'English Wikipedia',
  user: 'Ad90189018',
  userUrl: 'http://en.wikipedia.org/wiki/User:Ad90189018',
  unpatrolled: false,
  newPage: false,
  robot: false,
  anonymous: true,
  namespace: 'special' }

/home/typist/Projects/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:672
                    throw err;
                          ^
Error: Invalid net address: Ad90189018
  at new Netmask (/home/typist/Projects/anon/node_modules/netmask/lib/netmask.js:67:15)
  at Netmask.contains (/home/typist/Projects/anon/node_modules/netmask/lib/netmask.js:80:67)
  at isIpInRange (/home/typist/Projects/anon/anon.coffee:26:31)
  at isIpInAnyRange (/home/typist/Projects/anon/anon.coffee:30:8)
  at /home/typist/Projects/anon/anon.coffee:45:12
  at Client.<anonymous> (/home/typist/Projects/anon/node_modules/wikichanges/wikichanges.js:34:9)
  at Client.EventEmitter.emit (events.js:106:17)
  at Client.<anonymous> (/home/typist/Projects/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:477:22)
  at Client.EventEmitter.emit (events.js:95:17)
  at /home/typist/Projects/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:669:22
  at Array.forEach (native)
  at Socket.<anonymous> (/home/typist/Projects/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:666:15)
  at Socket.EventEmitter.emit (events.js:95:17)
  at Socket.<anonymous> (_stream_readable.js:746:14)
  at Socket.EventEmitter.emit (events.js:92:17)
  at emitReadable_ (_stream_readable.js:408:10)
  at emitReadable (_stream_readable.js:404:5)
  at readableAddChunk (_stream_readable.js:165:9)
  at Socket.Readable.push (_stream_readable.js:127:10)
  at TCP.onread (net.js:528:21)

purpost of whitelist

I don't see the whiltelist array in the config file documented in readme.md. What is it's purpose ?

"whitelist": {
"English Wikipedia": {
"Sherrod Brown": true,
"Maria Cantwell": true,
"Ben Cardin": true,
"Tom Carper": true
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.