[Trac] Re: Converting from Trac's Wiki Syntax to Markdown

2014-10-16 Thread RjOllos


On Tuesday, September 16, 2014 12:56:05 PM UTC-7, Guy Rutenberg wrote:
>
> Hi,
>
> I want to convert pages in the Wiki syntax used by Trac to markdown. Is 
> there a good solution?
>
> I found a few very shorts scripts that attempt to do so, but none that 
> really looked promising. I've also considered using WikiParser from 
> trac.wiki to get a DOM tree of the trac wiki and then write code that will 
> convert it to markdown, but I've ran into problems using WikiParser.
>
> I've tried:
>
> from trac.wiki import WikiParser
> from trac.core import ComponentManager
>
> wp = WikiParser(ComponentManager())
> wp.parse(my_wiki_text)
>
> But the last line simply returns my_wiki_text as is, instead of a WikiDOM 
> tree as the documentations says. Any idea what I did wrong?
>

You didn't do anything wrong. The "parse" method hasn't been implemented 
yet, and the Trac API doesn't produce a WikiDOM tree yet:
http://trac.edgewall.org/browser/trunk/trac/wiki/parser.py?marks=222,225&rev=12732#L211

You might take a look at this proposal, but I don't know of anything that 
will directly help you at the moment.
http://trac.edgewall.org/wiki/TracDev/Proposals/WikiParserFormatterSplit

 

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: email2trac keyw...@something.example.com

2014-10-16 Thread Lukasz Szybalski
On Fri, Sep 12, 2014 at 8:50 AM, Lukasz Szybalski 
wrote:

> Hello,
>
> How can I configured email2trac so that any email to something.example.com
> will be routed to email2trac, and the keyword part of the email be assign
> to "keyword" field.
>
> keyw...@something.example.com
>
> I'm trying to set this up so that people send questions about particular
> contract.
>
> example:
>
> incontract2...@something.example.com
> would create a ticket and add a keyword INcontract2014
> Then who ever gets the ticket will know who it came from and know the
> contract #.
>
> Thanks
> Lucas
>
>

Hello,
Just for your record I was able to do that using procmail.


http://lucasmanual.com/mywiki/procmail

How to convert/route all subdomains emails to one email and modify a
subject line to contain the local part aka

1...@bugs.example.com to incom...@example.com and have a subject line be
#1234: + original subject.
aka localpart + subject line.

This allows email2trac plugin to pickup the ticket# from subject and append
the email to existing ticket#.
In other cases you can route let say a contract# and have it displayed on a
subject line for your corporate coworkers to find easy.

Or if you are paperless and scanning your bills to trac. This would place
the account# in subject and you can setup separate rules and set milestones
/version based on some formula...

Enjoy.

Lucas


http://lucasmanual.com/ 

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Re: Obfuscate Usernames By Role

2014-10-16 Thread Steffen Hoffmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 16.10.2014 21:02, akor...@smartsoftwareinc.com wrote:
> I did find a trac-hacks plugin that was doing something similar to what
> I wanted, which lead me to the IRequestFilter interface that seems to
> work for my purposes (although it's a bit hackish).

Yeah, the name of the site is there for some reason. :-)

> My next step is submitting a search request to an LDAP server to
> determine the group my user is in. I've installed the python-ldap
> library on my machine and confirmed that scripts on my machine can use
> the library, but when I add "import ldap" to my plugin it immediately
> fails to load with an ImportError: No module named ldap. I'm guessing
> this is an issue with getting the python-ldap library into the scope of
> my trac virtual environment but I'm lost beyond that. Has anyone seen
> this issue before?

I guess you installed python-ldap after creating that virtual env? There
are some ways to make globally installed libraries known to a virtual
env too, and you should really find hints about it on the net easily.
Anyway, other than making all libs (exiting at time of virtual env
creation time) known to a new virtual env, there is a method I use [1]
to do this later on and selectively.

Steffen Hoffmann


[1]
http://codersbuffet.blogspot.com/2009/09/mercurial-subversion-and-virtualenv.html
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlRANmQACgkQ31DJeiZFuHfo7ACZAYDp7I5uBoJNcNKUxeZ+bXG8
jS4AoNyG9Rivm6xrvT3cw+Tre8+Mj3DJ
=Eu79
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Re: Obfuscate Usernames By Role

2014-10-16 Thread akorkki
Thank you for your response hasienda. I found the Chrome.format_author() 
method as instructed but I didn't see a way to hook into that method using 
a plugin or otherwise unobtrusively modify the method. I'm really trying to 
avoid modifying core code, I want my solution to be a plugin so it can be 
easily added to the live environment and toggled if something goes wrong. I 
did find a trac-hacks plugin that was doing something similar to what I 
wanted, which lead me to the IRequestFilter interface that seems to work 
for my purposes (although it's a bit hackish).

My next step is submitting a search request to an LDAP server to determine 
the group my user is in. I've installed the python-ldap library on my 
machine and confirmed that scripts on my machine can use the library, but 
when I add "import ldap" to my plugin it immediately fails to load with an 
ImportError: No module named ldap. I'm guessing this is an issue with 
getting the python-ldap library into the scope of my trac virtual 
environment but I'm lost beyond that. Has anyone seen this issue before?

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.