Giter Site home page Giter Site logo

benbalter / word-to-markdown-server Goto Github PK

View Code? Open in Web Editor NEW
70.0 7.0 26.0 2.35 MB

A hosted version of the Word to Markdown gem

Home Page: https://word2md.com

License: MIT License

Ruby 58.47% Shell 1.26% HTML 26.03% Dockerfile 4.93% JavaScript 0.46% SCSS 0.80% Procfile 0.32% TypeScript 7.73%

word-to-markdown-server's Issues

Demo install

I've installed word-to-markdown and it's working fine. I'd like now to run the server so I can access through the browser like the Heroku version you have.

I can't find the script/server anywhere. How should I install it? Just copy the files and save on my server?

THanks,

POST to /raw does not seem to work

Hey!

I was playing with the API using curl, but I encounter a problem. Any idea?

$ curl -X POST -F doc=@/tmp/test.docx http://word-to-markdown.herokuapp.com/raw 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<HTML>
  <HEAD><TITLE>Internal Server Error</TITLE></HEAD>
  <BODY>
    <H1>Internal Server Error</H1>
    closed stream
    <HR>
    <ADDRESS>
     WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25) at
     word-to-markdown.herokuapp.com:80
    </ADDRESS>
  </BODY>
</HTML>

Installation on RHEL 7

I am getting the following error:

[root@EPSS-CMS-RENDER script]# sh server
which: no growlnotify in (/usr/local/rvm/gems/ruby-2.2.5/bin:/usr/local/rvm/gems/ruby-2.2.5@global/bin:/usr/local/rvm/rubies/ruby-2.2.5/bin:/usr/local/rvm/bin:/sbin:/bin:/usr/sbin:/usr/bin)
which: no terminal-notifier in (/usr/local/rvm/gems/ruby-2.2.5/bin:/usr/local/rvm/gems/ruby-2.2.5@global/bin:/usr/local/rvm/rubies/ruby-2.2.5/bin:/usr/local/rvm/bin:/sbin:/bin:/usr/sbin:/usr/bin)
which: no growlnotify in (/usr/local/rvm/gems/ruby-2.2.5/bin:/usr/local/rvm/gems/ruby-2.2.5@global/bin:/usr/local/rvm/rubies/ruby-2.2.5/bin:/usr/local/rvm/bin:/sbin:/bin:/usr/sbin:/usr/bin)
which: no terminal-notifier in (/usr/local/rvm/gems/ruby-2.2.5/bin:/usr/local/rvm/gems/ruby-2.2.5@global/bin:/usr/local/rvm/rubies/ruby-2.2.5/bin:/usr/local/rvm/bin:/sbin:/bin:/usr/sbin:/usr/bin)

12:41:16 [rerun] Script launched
12:41:16 [rerun] Rerun (11383) running Script (11396)
configuration /var/www/html/word-to-markdown-demo/script/config.ru not found
which: no growlnotify in (/usr/local/rvm/gems/ruby-2.2.5/bin:/usr/local/rvm/gems/ruby-2.2.5@global/bin:/usr/local/rvm/rubies/ruby-2.2.5/bin:/usr/local/rvm/bin:/sbin:/bin:/usr/sbin:/usr/bin)
which: no terminal-notifier in (/usr/local/rvm/gems/ruby-2.2.5/bin:/usr/local/rvm/gems/ruby-2.2.5@global/bin:/usr/local/rvm/rubies/ruby-2.2.5/bin:/usr/local/rvm/bin:/sbin:/bin:/usr/sbin:/usr/bin)
which: no growlnotify in (/usr/local/rvm/gems/ruby-2.2.5/bin:/usr/local/rvm/gems/ruby-2.2.5@global/bin:/usr/local/rvm/rubies/ruby-2.2.5/bin:/usr/local/rvm/bin:/sbin:/bin:/usr/sbin:/usr/bin)
which: no terminal-notifier in (/usr/local/rvm/gems/ruby-2.2.5/bin:/usr/local/rvm/gems/ruby-2.2.5@global/bin:/usr/local/rvm/rubies/ruby-2.2.5/bin:/usr/local/rvm/bin:/sbin:/bin:/usr/sbin:/usr/bin)

12:41:18 [rerun] Script Launch Failed
12:41:18 [rerun] Watching . for **/*.{rb,js,coffee,css,scss,sass,erb,html,haml,ru,yml,slim,md,feature,c,h} with Linux adapter

Any idea what may be causing this? Is there any documentation on how to get this running on a RHEL/CentOS server?

Word PNG files

Does this app handle PNG files in any way? We see a line that looks like below in the mark down. Is there something we can do to get it to render the PNG files?

Thanks for any assistance!

Unicode file name

Describe the bug

Webpage shows "Internal Server Error".

word-to-markdown-server's console shows "Encoding::CompatibilityError - incompatible character encodings: ASCII-8BIT and UTF-8"

Steps to reproduce the behavior

  1. Upload a docx file whose name includes unicode characters (for example 你好.docx)

Expected behavior

No error occurred.

Resolutions

  1. Remove unicode characters in file name then upload.

  2. Or, add .force_encoding('UTF-8') in server.rb

      render_template :display, md: md, html: html, filename: params['doc'][:filename].force_encoding('UTF-8').sub(/\.docx?$/, '')

Can't run demo project on Heroku

We've been playing with W2M for a few days now. Everything's working great locally but we're having some trouble getting it set up on Heroku. We keep encountering the same error when trying to convert documents:

Errno::ENOENT - No such file or directory @ rb_sysopen - /tmp/{random-file-name}.html

After trying a few different things, we decided to try installing you're demo project on Heroku ourselves. I believe I've followed the installation instructions faithfully...

  1. Cloned the project
  2. Created a Heroku app
  3. Added the multi-buildpack URL:
heroku config:add BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git
  1. Deploy to Heroku.

When I load the page, everything looks good. But I get a server error when attempting to convert a document:

Errno::ENOENT - No such file or directory @ rb_sysopen - /tmp/d20140630-2-7zv34/RackMultipart20140630-2-qwn9k7.html

Full backtrace: https://gist.github.com/coryschires/139e508d9c449534ec34.

Looks pretty similar. Any suggestions?

Initiation error

when i run ruby script/server Console display script/server:4:in

': undefined local variable or method rackup' for main:Object (NameError) my ruby version 2.6.5 my rails version is 2.1.0

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.