I am a web designer trying to improve... These last few days I had decided to study Haml and SCSS and other things, but I just discovered Markdown and now I don't understand the difference between Markdown and Haml. Do they serve the same purpose? Which of the two is better? I've read they can be combined... Maybe should I learn both tools?
Thanks in advance.
Markdown
From Markdown's syntax page.
Markdown’s syntax is intended for one purpose: to be used as a format
for writing for the web.
Markdown is not a replacement for HTML, or even close to it. ...
It is useful for writing purposes only. A fitting example is Stackoverflow. You can easily format your questions to include some basics such as a list, a header or a quote.
HAML
HAML on the other hand is used for developing websites. It provides everything HTML does in a cleaner way. This includes all HTML attributes (such as ID's & classes) and embedded Ruby code. They have a great tutorial to get a brief overview.
My experience with HAML has been great. It's clearer and simpler to use than normal HTML. I'd definitely give it a try ;)
Related
As the title says. I need some tool, library or workaround which can take a code file i.e., JS, Python, C# etc and make that code displayable in HTML page.
Kind of like what GitHub do when someone tries to open a code in project.
It would be nice if there is some Python implementation for this. But others like nodejs, php, or plain js will do as well.
Any kind of help would be appreciated. Thanks!
EDIT:
Since, it's not allowed to get recommendation regarding libraries, I will add what I have attempted. So far I have been thinking only vital part while displaying the code will be to retain white spaces. So probably replace these with probably. But I'm sure there are better solutions out there. And that's exactly what I am here for.
We have a Wiki-Page. Where we document our work and projects. From this page you can download the articles in different formats, like Text-File, HTML-File or as DocBook.
Now I need to transform the DocBook into a PDF. This part works, I did it with dblatex.
dblatex doc.xml
But the PDF-Document needs our Cooperate Identity (Headline & Foot-line). I have no idea how to do that.
Any suggestions?
I have done a lot of work with the DocBook XSLT stylesheets that produce Formatting Objects (FO). That's a different way to publish PDF from DocBook source.
There is an excellent set of documentation that explains how to customize PDF output if you're using the FO workflow. Here's the section about that:
http://www.sagehill.net/docbookxsl/PrintHeaders.html
Learning how to customize the dblatex conversion might be a great choice. I have never used it so I'm offering the FO conversion as an alternative.
Good luck!
I'm a beginner in dojo. First of all is everything javascript based? For example to create a form I have to use JavaScript or HTML tags?
Also I cannot understand their documentation and tutorials. It's very confusing.
Is there a proper website (other then dojo itself) that has good tutorials?
You can use Dojo's components's (widgets) in two ways. Programmatic and declaritive. The programmatic way (what you are talking about) is by defining widgets through the use of javascript. With declaritive you can define them using HTML markup. David Walsh has a nice short writeup and if you search for "declaritive programmatic dojo" you'll find some questions and answers on the matter:
https://davidwalsh.name/dojo-widget
Difference between programmatically vs declaratively created widgets in dojo?
Declarative coding or programmatic coding in Dojo Projects?
Declarative or programatic approach in DOJO?
If you're having trouble with the tutorials on the Dojo website, i suspect you're better off, first diving into some basic beginner javascript tutorials before trying to learn a framework like Dojo. I concur with the comment Ferry made on your question, there are no better resources than the actual Dojo website. I recommend following every tutorial, starting with the Hello Dojo tutorial and working your way up so that you don't miss out on the basic concepts which you'll need when you read the harder tutorials. Good luck!
For your first question: dojo is javascript-based platform that provide you with a basic javascript library and a bunch of basic widgets (UI controls like button, dialogue, layouts,...), and some extra things. However, you don't really have to use dojo all the time: you still can use dojo to manipulate a html form button; it's just dojo button comes with extra functionalities and might save you some time.
For the second question, I agree with iH8 that dojo website is the best place to start. There are three different ways dojo websites can help you:
Look at the tutorial: Basic steps on how to set it up and use provided functionalities as-is
Look at thetoolkit api: This provides a very detailed view of dojo javascript object (See what extra things you can do with dojo objects)
Look at the nightlytest: I found this very helpful in term of showing me what can be done outside of the tutorial (i.e. how to use things you found in the api)
Other than these, you can look at existing implementation to learn about the toolkit.
Basically, this is how I am learning Dojo. Without more-specific questions, it's hard to tell what is confusing about the tutorial. I would recommend you give it a try and post a question: everyone here will be willing to help you.
I recommend starting with some video tutorial like this.
When you understand the concept, you can try to copy and paste some code from Dojo documentation tutorials or Reference Guide, because all books are out-of-date.
Also you may find some useful information on IBM-related sites like http://www.ibm.com/developerworks because IBM invested in Dojo and uses it for its products.
If you have enough resources ($) you can take participation in Workshops (sitepen.com/workshops)
I would like to know on how wikipedia (http://en.wikipedia.org/) creates PDF? It seem to be using some application at the back-end. Could anyone please let me know on how this is done?
Thanks
Srikanth
Wikipedia runs Mediawiki.
A Google check tells me that they have two PDF extensions.
This one is the one who's still mantained: PDF_Writer
It doesn't use a PHP HTML→PDF generator, (though there are some)
It actually does something trickier and more clever.
The PDF Writer uses the Python Reportlab libraries to generate PDF based on a
DOM derived from parsing mediawiki-markup using the mwlib parser.
To confirm ZJR's answer, these are the document properties:
What I need is to read pdf, make some transformations (generate TOC bookmarks) and write it back.
I found this http://hackage.haskell.org/package/HPDF , but it only mentions generating pdf, not the parsing (although I could have missed it)
Haskell is chosen purely for (self)educational purposes.
There are a few tools for PDF manipulation, though they seem to bias towards generation, rather than parsing:
http://johnmacfarlane.net/pandoc/
Pandoc is a great cross-markup library, but doesn't support PDF parsing (it does support PDF generation from a variety of formats).
There's also:
http://hackage.haskell.org/package/HsHaruPDF
http://hackage.haskell.org/package/pdf2line -- tool for extracting text from pdf
http://hackage.haskell.org/package/HPDF -- another pdf generation library
I'm not sure we have a good parsing tool yet.
Also as a learning exercise, I started a PDF parsing library in Haskell, but it's incomplete and has been languishing a bit from lack of attention. I'd be happy to share it with you, and would love feedback, improvements, etc. It's not currently hosted on hackage, but if you're interested in working with an incomplete implementation, let me know and I'll ask some colleagues for advice on getting it up there.
Here's a haskell binding to parts of xpdf:
http://hackage.haskell.org/package/pdf2line
Checkout pdf-toolbox library. It's support for PDF file generating is low level, but powerful enough for your task.
Here is an example how to change title of an existing PDF file using incremental update feature.
Another package to consider is rakhana which is also on hackage.