GTG

A q&d way to export to a pocketmod

Bug #630404 reported by Jan Girlich
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GTG
Fix Released
Wishlist
Luca Invernizzi

Bug Description

I really grew fond of the pocketmod printout of Thinking Rock and won't switch to gtg until it has a similar feature. So I hacked a quick and dirty way to create one for gtg 0.2.4

You need:
- export plugin
- pdflatex
- pdfjam
- pdftk
- files attached to this report

1. activate export plugin and place template_pocketmod.tex in /usr/share/gtg/GTG/plugins/export/export_templates/
2. export to a tex-file using the new export option
3. run pdflatex on your exported file
4. run pocketmod input.pdf output.pdf
5. print output.pdf

Restrictions:
- since I do have a lot of tasks I only print the tasknames, but not the task texts.
- you need to have enough tasks to create 8 or more pdf pages in step 3.
- it's designed for A4 format

This was written and tested on an up-to-date Ubuntu 10.04.

My hope is to get the discussion going for a proper export feature.

Revision history for this message
Jan Girlich (vollkorn) wrote :
Revision history for this message
Jan Girlich (vollkorn) wrote :

btw: how do I flag this for the 'wishlist'?

Revision history for this message
Thibault Févry (thibaultfevry) wrote :

 You can't, it must be a gtg-developper.

Changed in gtg:
importance: Undecided → Wishlist
status: New → Confirmed
milestone: none → 0.4
Revision history for this message
Luca Invernizzi (invernizzi) wrote :

Hi Jan. I'm a gtg developer and the creator of the export plugin.
I've tried your template, and it works just great! It would be good for people who prefer the pen and paper.

So, to make it quick to create a pocketmod we would need:
 - a way to run scripts on the file generated with the template. I'm thinking we could have, in the same directory of template_example a file script_example. If it exists, GTG automatically runs ./scripts example file_generated_from_the_template output_file. Any eventual parameter for the script should be passed in the template (but I don't think it will be necessary).
 This is quite easy to do.
- A way to decide if the task text should be inserted in the template or not. A possible quick way would be to have two different templates, since the template file would need to be changed anyway. Easy too.
- Padding in the template to make the output file at least 8 pages long. The quickest way that comes to my mind is generate the pdflatex file, get the length of the file (something like pdfinfo brochure.pdf |grep 'Pages'|sed 's/Pages:\s*\([0-9]*\)/\1/' ), and insert enough /newpage to have it long enough.

What do you think?

Changed in gtg:
assignee: nobody → Luca Invernizzi (invernizzi)
Revision history for this message
Jan Girlich (vollkorn) wrote :

Adding a function to run a script after the export sounds like a suitable way to get the full export process done.

Also I would go for the solution of two different templates to choose between text and titles only.

I think using a regexp for padding the pages would work, too.

The only thing I can't figure out yet is how to tell pdflatex how to call the outputfile. Would make scripting things easier.

Also I still think this is just a interim solution and we should look into different, more elegant, templating mechanisms with less external dependencies (LaTeX) for creating PDFs.

Revision history for this message
Luca Invernizzi (invernizzi) wrote :

Hello there.
I've added pocketmod to the export plugin.
it should solve all the problems listed above. The only "issue" is that the maximum length of a pocketmod is 8 pages (shorter tasks sets are automatically padded). If someone reports it, I'll fix it :)
 Have a try and tell me what you think.
Download from here:https://code.edge.launchpad.net/~gtg-user/gtg/plugin-api-refactoring/ and be sure to run the debug version (just in case, this doesn't touch your saved tasks - it uses a fake task set instead).

bzr branch lp:~gtg-user/gtg/plugin-api-refactoring/
cd plugin-api-refactoring
./scripts/debug.sh

Changed in gtg:
status: Confirmed → In Progress
milestone: 0.4 → 0.3
Changed in gtg:
status: In Progress → Fix Committed
Changed in gtg:
milestone: 0.3 → 0.2.9
Izidor Matušov (izidor)
Changed in gtg:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.