Re: [BangPypers] HTML to doc conversion

2015-09-30 Thread Anand B Pillai
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wednesday 30 September 2015 01:56 PM, Sandeep wrote:
> Hello Bangpypers,
> 
> I am working on a project where in I need to convert a HTML page
> which has the formatting information provided by CSS and also
> images in it into a word document.

This is not a Python specific problem.
> 
> I have searched for such packages but was not able to find a
> solution

Try pandoc [1]. See [2] for examples.

There is also a very nice package in PHP called dompdf [3] which
converts complex HTML with CSS etc into nicely formatted PDF. I have
used it to develop training material successfully taking the path from
markdown->html->pdf .

> 
> Can someone advise me on this problem
> 
> Thanks in advance Sandeep 
> ___ BangPypers mailing
> list BangPypers@python.org 
> https://mail.python.org/mailman/listinfo/bangpypers
> 

[1]: http://pandoc.org
[2]: http://pandoc.org/demos.html
[3]: https://github.com/dompdf/dompdf

- -- 
Regards,

- --Anand

- 
Software Architect/Consultant
anandpil...@letterboxes.org

Cell: +919880078014
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJWC6E+AAoJEHKU2n17CpvDetYIAKPpDbs0W+OUhhxu6rC7Fuw/
fMgf8UJQcX1ar1b/ytLU7KQDFaG3iqtZ1JQkVNBAZEp/w1b+asoEnVqvOBMGkOQs
lGW8JPhcpZQVDEdhEPkhgXE1FweHE7V/ud+rg0KMmrgdq11D0KrO+pbBxNbnXEtd
QpzyqY7ZpSmttbOuuC/aG+dwEy9PTCCO5/HKd9ZsL8wXKBcj/8azhSAQ/jTDbCNe
CENAGUgnS/Ijnz1XWZOg5dS59pTdDPRcI6aIj64AM62xpOM/KC8e/7Qu5obJb1WC
cfWuUhduDF7oqmIGd5QpbUwZwomp4K5aeVen9TdyUXYLpZbRxEvyz+WzBaoC0js=
=pM1x
-END PGP SIGNATURE-
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] HTML to doc conversion

2015-09-30 Thread Sandeep
Hello Bangpypers,

I am working on a project where in I need to convert a HTML page which has the 
formatting information provided by CSS and also images in it into a word 
document.

I have searched for such packages but was not able to find a solution

Can someone advise me on this problem

Thanks in advance
Sandeep
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] HTML to doc conversion

2015-09-30 Thread Sandeep
Hello prince

Thanks for the info

I have gone through this blog but the solution was specific to windows

I am trying to implement this module on Ubuntu and the solution will not work 
in this case

Let me know if there is any alternate

Regards
Sandeep

> On Sep 30, 2015, at 10:46 AM, Prince Sharma  wrote:
> 
> Tried going through this?
> 
> http://stackoverflow.com/questions/25290041/converting-html-to-doc-with-look-and-feel
> 
> Thanks,
> Prince
> 
>> On Wed, Sep 30, 2015 at 1:56 PM, Sandeep  wrote:
>> Hello Bangpypers,
>> 
>> I am working on a project where in I need to convert a HTML page which has 
>> the formatting information provided by CSS and also images in it into a word 
>> document.
>> 
>> I have searched for such packages but was not able to find a solution
>> 
>> Can someone advise me on this problem
>> 
>> Thanks in advance
>> Sandeep
>> ___
>> BangPypers mailing list
>> BangPypers@python.org
>> https://mail.python.org/mailman/listinfo/bangpypers
> ___
> BangPypers mailing list
> BangPypers@python.org
> https://mail.python.org/mailman/listinfo/bangpypers
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] HTML to doc conversion

2015-09-30 Thread Sandeep
Hello Anand

Thanks for the info

I am using xhtml2pdf for converting from HTML to PDF and it works perfectly fine

But I want a o convert HTML to word.

I have not explored pandoc yet and will give a try

Thanks in advance
Sandeep

> On Sep 30, 2015, at 10:45 AM, Anand B Pillai  
> wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
>> On Wednesday 30 September 2015 01:56 PM, Sandeep wrote:
>> Hello Bangpypers,
>> 
>> I am working on a project where in I need to convert a HTML page
>> which has the formatting information provided by CSS and also
>> images in it into a word document.
> 
> This is not a Python specific problem.
>> 
>> I have searched for such packages but was not able to find a
>> solution
> 
> Try pandoc [1]. See [2] for examples.
> 
> There is also a very nice package in PHP called dompdf [3] which
> converts complex HTML with CSS etc into nicely formatted PDF. I have
> used it to develop training material successfully taking the path from
> markdown->html->pdf .
> 
>> 
>> Can someone advise me on this problem
>> 
>> Thanks in advance Sandeep 
>> ___ BangPypers mailing
>> list BangPypers@python.org 
>> https://mail.python.org/mailman/listinfo/bangpypers
> 
> [1]: http://pandoc.org
> [2]: http://pandoc.org/demos.html
> [3]: https://github.com/dompdf/dompdf
> 
> - -- 
> Regards,
> 
> - --Anand
> 
> - 
> Software Architect/Consultant
> anandpil...@letterboxes.org
> 
> Cell: +919880078014
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
> 
> iQEcBAEBAgAGBQJWC6E+AAoJEHKU2n17CpvDetYIAKPpDbs0W+OUhhxu6rC7Fuw/
> fMgf8UJQcX1ar1b/ytLU7KQDFaG3iqtZ1JQkVNBAZEp/w1b+asoEnVqvOBMGkOQs
> lGW8JPhcpZQVDEdhEPkhgXE1FweHE7V/ud+rg0KMmrgdq11D0KrO+pbBxNbnXEtd
> QpzyqY7ZpSmttbOuuC/aG+dwEy9PTCCO5/HKd9ZsL8wXKBcj/8azhSAQ/jTDbCNe
> CENAGUgnS/Ijnz1XWZOg5dS59pTdDPRcI6aIj64AM62xpOM/KC8e/7Qu5obJb1WC
> cfWuUhduDF7oqmIGd5QpbUwZwomp4K5aeVen9TdyUXYLpZbRxEvyz+WzBaoC0js=
> =pM1x
> -END PGP SIGNATURE-
> ___
> BangPypers mailing list
> BangPypers@python.org
> https://mail.python.org/mailman/listinfo/bangpypers
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] HTML to doc conversion

2015-09-30 Thread Prince Sharma
Tried going through this?

http://stackoverflow.com/questions/25290041/converting-html-to-doc-with-look-and-feel

Thanks,
Prince

On Wed, Sep 30, 2015 at 1:56 PM, Sandeep  wrote:
> Hello Bangpypers,
>
> I am working on a project where in I need to convert a HTML page which has 
> the formatting information provided by CSS and also images in it into a word 
> document.
>
> I have searched for such packages but was not able to find a solution
>
> Can someone advise me on this problem
>
> Thanks in advance
> Sandeep
> ___
> BangPypers mailing list
> BangPypers@python.org
> https://mail.python.org/mailman/listinfo/bangpypers
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] HTML to doc conversion

2015-09-30 Thread harish badrinath
Hello,



On Wed, Sep 30, 2015 at 2:51 PM, Sandeep  wrote:
> Hello shoanm,
>
> The want to convert html to word document and not PDF
Just a small clarification will RTF do or do you have a preference for
MS word ??

Have you tried abiword as given in http://askubuntu.com/a/278759 ??


Regards,
Harish
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] HTML to doc conversion

2015-09-30 Thread Shoan Motwani
On Wed 30 Sep, 2015 13:56 Sandeep  wrote:

Hello Bangpypers,

I am working on a project where in I need to convert a HTML page which has
the formatting information provided by CSS and also images in it into a
word document.

I have searched for such packages but was not able to find a solution

Can someone advise me on this problem



Try wkhtmltopdf. It's a command line tool and works very well.
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] generating cisco config using templates?

2015-09-30 Thread Atul Tyagi
Hi All,

Has anyone tried to generate the cisco switch config using yaml + jinja.
Any experience, best practices or ideas that you might want to share?

I am trying to do this. It seems simple with a very basic yaml but it's
getting extremely confusing as I expand by yaml and make it more readable
(other than just key/value pairs

Any suggestions please?

Thanks,
Atul
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] HTML to doc conversion

2015-09-30 Thread Sandeep
Hello Harish 

I have not tried abiword yet, will use that and update you 

Regards
Sandeep

> On Sep 30, 2015, at 1:46 PM, harish badrinath  
> wrote:
> 
> Hello,
> 
> 
> 
>> On Wed, Sep 30, 2015 at 2:51 PM, Sandeep  wrote:
>> Hello shoanm,
>> 
>> The want to convert html to word document and not PDF
> Just a small clarification will RTF do or do you have a preference for
> MS word ??
> 
> Have you tried abiword as given in http://askubuntu.com/a/278759 ??
> 
> 
> Regards,
> Harish
> ___
> BangPypers mailing list
> BangPypers@python.org
> https://mail.python.org/mailman/listinfo/bangpypers
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] HTML to doc conversion

2015-09-30 Thread Anand B Pillai
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wednesday 30 September 2015 02:51 PM, Sandeep wrote:
> Hello shoanm,
> 
> The want to convert html to word document and not PDF
> 
> Will wkhtmltopdf will do this ??

FYI - this hasnt got much to do with Python. You might be better off
posting in more generic forums.

To conclude my suggestion on pandoc, here is how you would use this.

$ pandoc -f html -t docx -S -s input.hml -o output.docx

I just tried this for a sample document and it produces readable
document which loads in Open office. You can adjust the conversion by
trying various options of pandoc (pandoc -h).

Suggest to try a bit yourselves before asking further help.


- -- 
Regards,

- --Anand

- 
Software Architect/Consultant
anandpil...@letterboxes.org

Cell: +919880078014
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJWC85wAAoJEHKU2n17CpvDjEAH/3wJ/+qmdU5rU1I1mwPG2pfz
Jokm0C1gX6JmnDBTwRpqyLH49YQdpBH4MKJVu49DZ2PE1jGuSUQ5AA32A7eUEOys
V8TzqsM8WWxK03s5ILF8v44jfEZoX/cYAghXxkJ1GVdd51GPEFnN6ypSXlfmyocp
2OiWGMqAnaNNrSBOAfcBqiHXLsrPkBukFXDAWcVSAOHTWCXHkWBGwZGrVoercV/7
SdRbUlVVJwTqwzDFWVaHT50dUNAQcxpFEuLNiGWGNxhSAp3ifu7gAAcsXXusarCY
GiYz3SOJWhI1uBCvwieFPRfTGqmz+/C5LgSeMUrgT+vuEfYe+tJLSItJn6Rg2OU=
=aD+V
-END PGP SIGNATURE-
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] Request for freelancer python+django programmers

2015-09-30 Thread Raghuraman Ramachandran
Dear All

We are a small start-up and we are looking for a freelancer with about
2 to 3 years experience in the python+django framework. The assignment
is initially for approximately 2 months but could be extended later.

I appreciate any help on this.

Many thanks and regards,
Raghu
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] Discussion on local Python communities @PyCon India

2015-09-30 Thread Shanki Singh Gandhi
Hi Bangpypers,

I am Shanki, volunteer PyCon India.

This email is to inform, PyCon India 2015 have planned to carry out open
session discussion on local Python communities and challenges being faced.
You can come and watch/take part in open session on local python
communities. For more information/timings feel free to reach Satyaakam @
satyaa...@gmail.com

Thanks
-Shanki
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] generating cisco config using templates?

2015-09-30 Thread sayantan bhattacharya
Can you please specify what configuration you are trying to generate? Are
you trying to configure multiple devices?

If yes, you can try using the Ansible module, provided you aim for
configuring devices issuing the master slave model.
On Sep 30, 2015 19:11, "Atul Tyagi"  wrote:

> Hi All,
>
> Has anyone tried to generate the cisco switch config using yaml + jinja.
> Any experience, best practices or ideas that you might want to share?
>
> I am trying to do this. It seems simple with a very basic yaml but it's
> getting extremely confusing as I expand by yaml and make it more readable
> (other than just key/value pairs
>
> Any suggestions please?
>
> Thanks,
> Atul
> ___
> BangPypers mailing list
> BangPypers@python.org
> https://mail.python.org/mailman/listinfo/bangpypers
>
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] generating cisco config using templates?

2015-09-30 Thread Atul Tyagi
Idea is to provision mds switches based on datacenter specifications. Since
the template would be consistent I can generate multiple configs depending
on what dc yaml is passed.

We dont use ansible here so I have already written a python script usin
netmiko to connect, scp the config to startup-config and the  reload the
device.

Only missing peice right now is generating thw config.
On 30 Sep 2015 19:58, "sayantan bhattacharya"  wrote:

> Can you please specify what configuration you are trying to generate? Are
> you trying to configure multiple devices?
>
> If yes, you can try using the Ansible module, provided you aim for
> configuring devices issuing the master slave model.
> On Sep 30, 2015 19:11, "Atul Tyagi"  wrote:
>
> > Hi All,
> >
> > Has anyone tried to generate the cisco switch config using yaml + jinja.
> > Any experience, best practices or ideas that you might want to share?
> >
> > I am trying to do this. It seems simple with a very basic yaml but it's
> > getting extremely confusing as I expand by yaml and make it more readable
> > (other than just key/value pairs
> >
> > Any suggestions please?
> >
> > Thanks,
> > Atul
> > ___
> > BangPypers mailing list
> > BangPypers@python.org
> > https://mail.python.org/mailman/listinfo/bangpypers
> >
> ___
> BangPypers mailing list
> BangPypers@python.org
> https://mail.python.org/mailman/listinfo/bangpypers
>
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] generating cisco config using templates?

2015-09-30 Thread Atul Tyagi
By the way I use salt here but it does not have a out of the box way to
manage network devices. Proxy stuff seemed too complicated to me so haven't
even given it a shot.
On 30 Sep 2015 20:23, "Atul Tyagi"  wrote:

> Idea is to provision mds switches based on datacenter specifications.
> Since the template would be consistent I can generate multiple configs
> depending on what dc yaml is passed.
>
> We dont use ansible here so I have already written a python script usin
> netmiko to connect, scp the config to startup-config and the  reload the
> device.
>
> Only missing peice right now is generating thw config.
> On 30 Sep 2015 19:58, "sayantan bhattacharya"  wrote:
>
>> Can you please specify what configuration you are trying to generate? Are
>> you trying to configure multiple devices?
>>
>> If yes, you can try using the Ansible module, provided you aim for
>> configuring devices issuing the master slave model.
>> On Sep 30, 2015 19:11, "Atul Tyagi"  wrote:
>>
>> > Hi All,
>> >
>> > Has anyone tried to generate the cisco switch config using yaml + jinja.
>> > Any experience, best practices or ideas that you might want to share?
>> >
>> > I am trying to do this. It seems simple with a very basic yaml but it's
>> > getting extremely confusing as I expand by yaml and make it more
>> readable
>> > (other than just key/value pairs
>> >
>> > Any suggestions please?
>> >
>> > Thanks,
>> > Atul
>> > ___
>> > BangPypers mailing list
>> > BangPypers@python.org
>> > https://mail.python.org/mailman/listinfo/bangpypers
>> >
>> ___
>> BangPypers mailing list
>> BangPypers@python.org
>> https://mail.python.org/mailman/listinfo/bangpypers
>>
>
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] generating cisco config using templates?

2015-09-30 Thread Nitin Kumar
Hi Atul,

You can refer below link. This is an example which is used to configure
Juniper devices.
the code is using YAML and Jinja2 as you are looking for.

https://github.com/vnitinv/pyez-examples/blob/master/6_load_temp_conf.py

corresponding yaml and jinja2 template can be found at
https://github.com/vnitinv/pyez-examples


Nitin Kr

On Wed, Sep 30, 2015 at 9:35 PM, Atul Tyagi  wrote:

> As I said I have not explored salt for network devices yet. It's more for
> system build automation. For this network device requirement I ended up
> writing my own python script to push the config to device. We can probably
> use salt-ssh to integrate that into salt but I haven't explored it yet.
>
> On Wed, Sep 30, 2015 at 9:24 PM, kracekumar ramaraju <
> kracethekingma...@gmail.com> wrote:
>
> > On Wed, Sep 30, 2015 at 8:26 PM, Atul Tyagi 
> wrote:
> >
> > > By the way I use salt here but it does not have a out of the box way to
> > > manage network devices. Proxy stuff seemed too complicated to me so
> > haven't
> > > even given it a shot.
> > >
> > >
> > I am using Salt, if you can share some sample code, we can help.
> > ___
> > BangPypers mailing list
> > BangPypers@python.org
> > https://mail.python.org/mailman/listinfo/bangpypers
> >
> ___
> BangPypers mailing list
> BangPypers@python.org
> https://mail.python.org/mailman/listinfo/bangpypers
>
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] generating cisco config using templates?

2015-09-30 Thread Atul Tyagi
As I said I have not explored salt for network devices yet. It's more for
system build automation. For this network device requirement I ended up
writing my own python script to push the config to device. We can probably
use salt-ssh to integrate that into salt but I haven't explored it yet.

On Wed, Sep 30, 2015 at 9:24 PM, kracekumar ramaraju <
kracethekingma...@gmail.com> wrote:

> On Wed, Sep 30, 2015 at 8:26 PM, Atul Tyagi  wrote:
>
> > By the way I use salt here but it does not have a out of the box way to
> > manage network devices. Proxy stuff seemed too complicated to me so
> haven't
> > even given it a shot.
> >
> >
> I am using Salt, if you can share some sample code, we can help.
> ___
> BangPypers mailing list
> BangPypers@python.org
> https://mail.python.org/mailman/listinfo/bangpypers
>
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] generating cisco config using templates?

2015-09-30 Thread kracekumar ramaraju
On Wed, Sep 30, 2015 at 8:26 PM, Atul Tyagi  wrote:

> By the way I use salt here but it does not have a out of the box way to
> manage network devices. Proxy stuff seemed too complicated to me so haven't
> even given it a shot.
>
>
I am using Salt, if you can share some sample code, we can help.
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers