Giter Club home page Giter Club logo

journal2ebook's People

Contributors

adasilva avatar jasongullifer avatar monkeypuzzler 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

journal2ebook's Issues

quotes do not work when using subprocess instead of os.system

Changed: os.system('convert "%s.pdf" temp.png' % self.filename)
To: subprocess.call(['convert', self.filename+'.pdf', imFile])

Putting the filename in quotes within subprocess.call function ('"'+self.filename+'.pdf"') gives an error for me. Can you confirm that removing the quotes and changing to subprocess still works for you?

Install Issue: "ImportError: cannot import name ImageTk"

I have cloned the project into a directory; but when I try python journal2ebook.py , I get this error:

from PIL import ImageTk
ImportError: cannot import name ImageTk

I am running Python 2.7.6 (default, Mar 22 2014, 22:59:56), under Ubuntu 14.04

PIL.VERSION shows 1.1.7

Is this project still alive?

Hi,
is this project still alive?

Personally, I'm interested in this project and could look into updating it to python3 etc.

BR,
Constantin

import ImageTk errors out on Fedora 20

While launching after the given install steps, I had to manually change the source to import ImageTk as follows:

- import ImageTk
+ from PIL import ImageTk

Not sure whether this works for all distributions so not sending a pull request.

More useful file open dialog

I wonder if it's possible to get a more featureful open box (e.g., sort by date modified, type letters to zoom to the potential file)

extra options for post-processing

After processing, change the preview image to the new pdf. Or should it be in its own box? (A toggle between original pdf and new pdf?)

Use pdftk to allow (e.g.) removal of extra pages.

Error when cancel new file open then try to run coversion

Accidentally pressed New File and chose an invalid filename. Then clicked Ready to convert. Received this error:

Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1473, in call
return self.func(*args)
File "journal2ebook.py", line 497, in bReadyClick
subprocess.call(['k2pdfopt','-x','-col', str(n), '-ml', str(leftmargin), '-mr', str(rightmargin), '-mt', str(topmargin), '-mb', str(bottommargin), '-ui-','-o', newFileName, '"'+self.filename+'.pdf"'])
TypeError: cannot concatenate 'str' and 'tuple' objects

Windows Compatibility

Compatible with windows if the following are true:

*PIL is installed

*ImageMagick for windows is installed

*k2pdfopt.exe is in the windows path or included with journal2ebook

Page height adjustment

Window size should be flexible and easily adjustable (by clicking and dragging the window box). When the window size is adjusted, the pdf image size should adjust with it.

Clicking new file after using journal2ebook gives error about initdir

Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1437, in call
return self.func(*args)
File "journal2ebook.py", line 296, in bNewFileClick
newFilename=self.chooseImage(initdir=self.filedir)
TypeError: chooseImage() got an unexpected keyword argument 'initdir'

error if .conf file has blank lines

Traceback (most recent call last):
File "journal2ebook.py", line 423, in
myapp=Journal2ebook(root)
File "journal2ebook.py", line 50, in init
self.configVars={line.split(':')[0].replace(' ',''):line.split(':')[1].lstrip().rstrip('\n') for line in f} #dictionary of configuration variables
File "journal2ebook.py", line 50, in
self.configVars={line.split(':')[0].replace(' ',''):line.split(':')[1].lstrip().rstrip('\n') for line in f} #dictionary of configuration variables
IndexError: list index out of range

grab metadata?

e.g. from zotero - started work in branch master (see file grabMetadata.py)

allow saving parameters as a journal "profile"

A particular journal will likely have parameters that work for all articles in that journal. It would help to save the parameters for a particular journal, and add bulk conversion. (Can we read pdf metadata to get the journal? This might work best as a plugin for a reference manager.)

Won't work - gives an error when trying to load a pdf

I'm trying to get journal2ebook working on Ubuntu 18.04 and it exits with the error below when trying to load a PDF.

convert-im6.q16: not authorized /home/troy/Documents/some-file.pdf' @ error/constitute.c/ReadImage/412. convert-im6.q16: no images defined /home/troy/Documents/tempfiles/temp.png' @ error/convert.c/ConvertImageCommand/3258.
Couldn't load file: [Errno 2] No such file or directory: '/home/troy/Documents/tempfiles/temp.png'
Traceback (most recent call last):
File "/usr/local/bin/journal2ebook", line 481, in
myapp=Journal2ebook(root,filename)
File "/usr/local/bin/journal2ebook", line 94, in init
self.setup()
File "/usr/local/bin/journal2ebook", line 102, in setup
self.prepImage()
File "/usr/local/bin/journal2ebook", line 268, in prepImage
self.imgaspect = float(self.img.size[0]) / float(self.img.size[1])
AttributeError: 'NoneType' object has no attribute 'size'

getting up and running...

  1. I can't seem to get the program to work on os x 10.6.8. I know i have imagemagick, gs, and k2pdfopt installed and working. I have "python launcher" installed. I don't know how to see if I have PIL. (I installed Pillow instead of PIL)
  2. When I run from terminal I get:
    File "/usr/local/bin/journal2ebook", line 69
    self.configVars={line.split(':')[0].replace(' ',''):line.split(':')[1].lstrip().rstrip('\n') for line in f} #dictionary of configuration variables
    SyntaxError: invalid syntax

There seems to be a caret under the word "for"

I am only a beginner at linux, so I need somewhat explicit directions.

  1. If I fail to get it to work, I wonder how i go about uninstalling it. Nonetheless, I look forward to being able to try it out.
  2. Also, running tesseract I get the following:
    Error opening data file ...TessOCR-1.08.-5074127fdf195/TessOCR-1.08/tessdata/eng.traineddata
    Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory.
    Failed loading language 'eng'
    Tesseract couldn't load any languages!
    Could not initialize tesseract.

I do have a tessdata folder,
/Applications/VietOCR3 App/tesseract-ocr/tessdata
(But I havent been able to get vietocr3 to work. another story)
How do I set the tessdata_prefix??

thx

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.