Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

What I try to achieve

I need to review a bunch of C source code spread out into dozen of directories. I already have a bash script which does the following: It searches for all source codes in the directory I'm interested in. For each code found, it generates a pdf (where the source file is) using the following command:

a2ps $source -R --columns=1 --prologue='color' --line-numbers=1 -T2 -M A4 \
  --chars-per-line=100 --borders=no --encoding=iso1 -o - | \
  ps2pdf -sPAPERSIZE=a4 - $dest

Then it opens this generated pdf with a PDF viewer to let me review it using sticky notes. I then save it, close it and the script do the same for the next c source code, etc.

This way I can review all the source codes in an automatic way and distribute the review back in a handy pdf format.

Where it fails

I can't find a proper PDF reader which allows me to do exactly what I've mentioned above. Basically what I've tried :

Evince

Don't allow to save the sticky notes in the same file, I need to "Save as..." and evince then open the previous location used and not the location of the current pdf. This force me to manually navigates trought the directories to find the source pdf to override it.

Xournal

It don't have sticky notes and this is mandatory for me.

Okular

The sticky notes are not visible into Adobe Reader which is mandatory for me too.

Adobe Reader 9

This old version for Linux (thanks Adobe) don't support sticky notes.

Therefore what I need

To summarize what I've said above, I need a PDF reader that is :

  • able to save the annotated pdf directly or at least save as it in the same directory directly
  • using official pdf sticky notes
  • creates sticky notes that are visible into, at least, Adobe Reader and evince

Your help is much appreciated has it could save me a lot of time! Also feel free to suggest a whole different workflow idea if it's matching my requirement.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Quick idea involving evince and your bash script:

 dir=$(dirname $source)
 rm -f ~/evince_save
 ln -s $dir ~/evince_save

And when you "Save as" in evince, save into ~/evince_save. As you observe, evince will use the same directory every time, but the automation script will have replaced its link each time; you don't have to do any navigating and the file ends up in the right place.

The rm removes the symlink and not the directory; -f means no error if ~/evince_save doesn't exist yet.

share|improve this answer
    
Thanks, I like it, very simple, very clever! –  cid Nov 2 '13 at 11:41
add comment

If these C source file are not yet under revision control bring them under revision control (mercurial would be my suggestion). If they are under some outdated revision control system (SVN, CVS) convert the source base.

(After that,) clone the repository and make branch 'revision', use the normal editor with syntax highlighting (should be as readable as your PDFs) and some recognizable way to mark your comments:

/*CID: need to review the following in more detail */

The review feedback can be given by committing and pushing your changes and the others can just do a (graphical diff) to see what your comments where (per file or for a bunch of files).

You don't have to mark the comments, but if someone merges your 'changes' in your comments are more easily recognised.

(I am not entirely sure why you find the PDF format handy.)

share|improve this answer
    
Thanks for the idea but I need the PDF format for it frozen state. It's for evaluating purpose so the code should not be changed. –  cid Nov 1 '13 at 17:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.