Brief video on setting up clean seed files for your RoR project.
Seed file can be difficult to work with, especially as dataset grows with your application. Several strategies that I have found useful:
- Use comments and print statements as a guide
- Store attributes in a hash, then pass them into new records
- Build out incrementally so that you can check errors
- Remember to link up records using user_id, etc.
Posted in rails, ruby
Tagged rails, RoR, ruby
Editing locked PDF files can be a mess; however, GIMP can be a good option for making small edits by converting the file to image, then back into PDF after revision.
Google Docs and the Preview app on Mac are good tools for opening/converting files; however, if they are unable to open/convert the files then Acrobat may be required to do so.
That said, here are the general steps:
- Open the file – if it is password protected, then consider options of unlocking the file here.
- Convert into image – Convert the file into image, PNG format worked well in my experience.
- Open GIMP – Download available here.
- Edit image using GIMP – Cut/paste selection is especially useful and tutorials are located here.
- Save image file into XCF format – GIMP editable format is XCF, so save into this format until image is ready for export.
- Export XCF back into image – Once complete, then convert XCF file back into image format (PNG or otherwise).
- Export/print as PDF – Convert the image back into PDF, using tools such as Google Drive, the Preview app, etc.
Some gotchas along the way:
- Unlocked PDF files – Sites available online are not always reliable and often charge for doing so.
- Image formatting – Good for minor changes and side-steps the securing of PDF features.
- File conversion – Converting between PDF/image may cause some issues, so be sure to experiment with combinations of applications that work with your files.
- Acrobat, when all else fails – Acrobat can accomplish all of the above, so use it when all else fails then GIMP for image editing.
In conclusion, GIMP has been a great resource in my experience by offering just the right level of image editing functionality to make minor edits to locked PDF files without spending hours converting/unlocking them.
Posted in PDF, unix
Tagged PDF, unix
My East Bay Rails presentation last week covered “Delivering Weather Data in Rails”, and I reviewed how weather data can be presented in a web application in the context of environmental compliance.
There are 5 short video clips and an introduction (posted above) from the presentation – the remaining videos are posted here: