Giter VIP home page Giter VIP logo

campfire_export's People

Contributors

alex-hofsteede avatar andrewwong1221 avatar chaselee avatar juno avatar pat avatar precipice 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

Watchers

 avatar  avatar  avatar  avatar  avatar

campfire_export's Issues

SSL timeout causes export to abort

Per title. Stack trace:

campfire/wesabe/Development/2007/12/12 ... exporting transcripts
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:560:in `initialize': Operation timed out - connect(2) (Errno::ETIMEDOUT)
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:560:in `open'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:560:in `connect'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/timeout.rb:53:in `timeout'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/timeout.rb:93:in `timeout'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:560:in `connect'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:553:in `do_start'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:542:in `start'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:1035:in `request'
    from /Library/Ruby/Gems/1.8/gems/httparty-0.7.8/lib/httparty/request.rb:69:in `perform'
    from /Library/Ruby/Gems/1.8/gems/httparty-0.7.8/lib/httparty.rb:390:in `perform_request'
    from /Library/Ruby/Gems/1.8/gems/httparty-0.7.8/lib/httparty.rb:342:in `get'
    from /Library/Ruby/Gems/1.8/gems/httparty-0.7.8/lib/httparty.rb:422:in `get'
    from /Library/Ruby/Gems/1.8/gems/campfire_export-0.0.1/lib/campfire_export.rb:42:in `get'
    from /Library/Ruby/Gems/1.8/gems/campfire_export-0.0.1/lib/campfire_export.rb:255:in `export_html'
    from /Library/Ruby/Gems/1.8/gems/campfire_export-0.0.1/lib/campfire_export.rb:230:in `export'
    from /Library/Ruby/Gems/1.8/gems/campfire_export-0.0.1/lib/campfire_export.rb:190:in `export'
    from /Library/Ruby/Gems/1.8/gems/campfire_export-0.0.1/lib/campfire_export.rb:157:in `export'
    from /Library/Ruby/Gems/1.8/gems/nokogiri-1.4.7/lib/nokogiri/xml/node_set.rb:239:in `each'
    from /Library/Ruby/Gems/1.8/gems/nokogiri-1.4.7/lib/nokogiri/xml/node_set.rb:238:in `upto'
    from /Library/Ruby/Gems/1.8/gems/nokogiri-1.4.7/lib/nokogiri/xml/node_set.rb:238:in `each'
    from /Library/Ruby/Gems/1.8/gems/campfire_export-0.0.1/lib/campfire_export.rb:155:in `export'
    from /Library/Ruby/Gems/1.8/gems/campfire_export-0.0.1/bin/campfire_export:57
    from /usr/bin/campfire_export:19:in `load'
    from /usr/bin/campfire_export:19

Add command line options

  • -h | --help
  • -v | --version
  • -a | --api-key
  • -s | --subdomain
  • -d | --directory
  • --start-date
  • --end-date
  • --timezone
  • --no-html
  • --no-xml
  • --no-plaintext
  • --no-uploads
  • --quiet

Export of tweet messages is broken

transcript.xml winds up containing 78 tweet tags with a bare object reference in them, and then one tweet tag that looks right. I'm guessing it's a nokogiri parsing path error.

Sound messages have description now

From @indirect:

MH, depending on whether you're using the API, you might also need to allow for descriptions on sounds now
I just noticed a pull request on the campfire library that wesabot uses because they added a description attribute

Uploads before 2009/8/28 with a `?` in the filename will 404

It is likely that uploads before 2009/8/28 or so which have a ? in the filename will fail to export and report a 404 error instead. This is due to a problem with S3 filenames.

The script should let people know if they are hitting this bug and should direct them to write [email protected] if they want help getting those files back.

Add some stats

Would be fun and maybe useful to have some stats show up at the end of the export:

  • Transcripts exported
  • Uploads exported
  • Deleted uploads
  • Errored uploads
  • Longest run of days in the room
  • Most posts by a user
  • Longest time in the room

Ruby 2 compatibility

Running campfire_export with Ruby 2.0 or 2.1 gives the following error:

Unable to export account: can't convert Date into String

Incompatible version issues

I tried fixing around the version issue but I am still getting the below error.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:212: warning: Insecure world writable dir /usr/local/ActivePerl-5.16/site in PATH, mode 040777
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in require': dlopen(/Users/Ravi/.rvm/gems/ruby-1.9.3-p545@global/gems/nokogiri-1.5.11/lib/nokogiri/nokogiri.bundle, 9): Library not loaded: @@HOMEBREW_PREFIX@@/opt/libxml2/lib/libxml2.2.dylib (LoadError) Referenced from: /Users/Ravi/.rvm/gems/ruby-1.9.3-p545@global/gems/nokogiri-1.5.11/lib/nokogiri/nokogiri.bundle Reason: Incompatible library version: nokogiri.bundle requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0 - /Users/Ravi/.rvm/gems/ruby-1.9.3-p545@global/gems/nokogiri-1.5.11/lib/nokogiri/nokogiri.bundle from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:inrequire'
from /Users/Ravi/.rvm/gems/ruby-1.9.3-p545@global/gems/nokogiri-1.5.11/lib/nokogiri.rb:28:in <top (required)>' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:inrequire'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in require' from /Users/Ravi/.rvm/gems/ruby-1.9.3-p545@global/gems/campfire_export-0.3.0/lib/campfire_export.rb:30:in<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:inrequire'
from /Users/Ravi/.rvm/gems/ruby-1.9.3-p545@global/gems/campfire_export-0.3.0/bin/campfire_export:28:in <top (required)>' from /usr/bin/campfire_export:23:inload'
from /usr/bin/campfire_export:23:in `

mapping values are not allowed in this context at line 4 column 52 (Psych::SyntaxError)

I am getting the following when the app tries to download a .js file.

cust_service_djenga.js ... /usr/lib/ruby/1.9.1/psych.rb:203:in parse': (<unknown>): mapping values are not allowed in this context at line 4 column 52 (Psych::SyntaxError) from /usr/lib/ruby/1.9.1/psych.rb:203:inparse_stream'
from /usr/lib/ruby/1.9.1/psych.rb:151:in parse' from /usr/lib/ruby/1.9.1/psych.rb:127:inload'
from /var/lib/gems/1.9.1/gems/crack-0.1.8/lib/crack/json.rb:12:in parse' from /var/lib/gems/1.9.1/gems/httparty-0.7.8/lib/httparty/parser.rb:116:injson'
from /var/lib/gems/1.9.1/gems/httparty-0.7.8/lib/httparty/parser.rb:136:in parse_supported_format' from /var/lib/gems/1.9.1/gems/httparty-0.7.8/lib/httparty/parser.rb:103:inparse'
from /var/lib/gems/1.9.1/gems/httparty-0.7.8/lib/httparty/parser.rb:66:in call' from /var/lib/gems/1.9.1/gems/httparty-0.7.8/lib/httparty/request.rb:217:inparse_response'
from /var/lib/gems/1.9.1/gems/httparty-0.7.8/lib/httparty/request.rb:189:in handle_response' from /var/lib/gems/1.9.1/gems/httparty-0.7.8/lib/httparty/request.rb:71:inperform'
from /var/lib/gems/1.9.1/gems/httparty-0.7.8/lib/httparty.rb:390:in perform_request' from /var/lib/gems/1.9.1/gems/httparty-0.7.8/lib/httparty.rb:342:inget'
from /var/lib/gems/1.9.1/gems/httparty-0.7.8/lib/httparty.rb:422:in get' from /var/lib/gems/1.9.1/gems/campfire_export-0.3.0/lib/campfire_export.rb:42:inget'
from /var/lib/gems/1.9.1/gems/campfire_export-0.3.0/lib/campfire_export.rb:463:in export_content' from /var/lib/gems/1.9.1/gems/campfire_export-0.3.0/lib/campfire_export.rb:436:inexport'
from /var/lib/gems/1.9.1/gems/campfire_export-0.3.0/lib/campfire_export.rb:289:in block in export_uploads' from /var/lib/gems/1.9.1/gems/campfire_export-0.3.0/lib/campfire_export.rb:286:ineach'
from /var/lib/gems/1.9.1/gems/campfire_export-0.3.0/lib/campfire_export.rb:286:in export_uploads' from /var/lib/gems/1.9.1/gems/campfire_export-0.3.0/lib/campfire_export.rb:235:inexport'
from /var/lib/gems/1.9.1/gems/campfire_export-0.3.0/lib/campfire_export.rb:177:in export' from /var/lib/gems/1.9.1/gems/campfire_export-0.3.0/bin/campfire_export:61:inblock in <top (required)>'
from /var/lib/gems/1.9.1/gems/campfire_export-0.3.0/bin/campfire_export:60:in each' from /var/lib/gems/1.9.1/gems/campfire_export-0.3.0/bin/campfire_export:60:in<top (required)>'
from /usr/local/bin/campfire_export:23:in load' from /usr/local/bin/campfire_export:23:in

'

Outside of this, it works great, but when it hits the .js file it just dies.

Thanks,

Use httparty's parsed result (and switch to JSON)

httparty is already parsing all of the XML responses; no need to use Nokogiri to do it again. Would be better to use the already-parsed results, and probably better to switch to JSON responses, too.

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.