[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pywikipediabot-users
Subject:    [Pywikipedia-l] Table of contents for scripts and fixes
From:       Bináris <wikiposta () gmail ! com>
Date:       2013-03-13 10:38:05
Message-ID: CAD0L+c8WZhWt7qmKKWR-61knaoYQz6CSTV86ri82jvvtT2kikw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi gurus,

I have suffered for a long time because I have quite a lot of fixes and I
can hardly find my way in this jungle and keep a logical order and find old
ones.
So I decided to write a script that creates a table of contents int
fixes.py/user-fixes.py.

Then I thought it should also list main-level variables and functions
(Python is very good at dissolving main-level things from others :-)). As I
already wrote earlier, I use several own functions for my fixes ([1]). And
also header lines of some predefined format. All this script needs a place
to insert the TOC which should be a predefined constant line, e.g.
# *** CONTENTS *** #
(If the script finds the corresponding END CONTENTS line, it clears the
previous TOC from between these two.)

But then I realized that enhanced with classes this would be useful for any
kind of scripts without extra work. For example in wikipedia.py which is
now long, long, and hard to overview.
Of course, there would be a possibility to leave some kind of data (e.g.
"no variables please, only functiions and classes"), and two approaches for
ordering (everything in original order, or fisrt the variables, then
functions, then fixes...).
Unfortunately, in some rare cases the length of a line may excced the 80
characters, which may cause PEP8 and/or Xqt beiing sad. :-)

How does this concept sound?

I will anyhow write it for my own purposes. It is just about community use
for complicated scripts such as fixes.py or wikipedia.py.

[1]
http://hu.wikipedia.org/wiki/Szerkeszt%C5%91:Bin%C3%A1ris/Fixes_and_functions_HOWTO
-- 
Bináris

[Attachment #5 (text/html)]

Hi gurus,<br><br>I have suffered for a long time because I have quite a lot of fixes \
and I can hardly find my way in this jungle and keep a logical order and find old \
ones.<br>So I decided to write a script that creates a table of contents int <a \
href="http://fixes.py/user-fixes.py">fixes.py/user-fixes.py</a>.<br> <br>Then I \
thought it should also list main-level variables and functions (Python is very good \
at dissolving main-level things from others :-)). As I already wrote earlier, I use \
several own functions for my fixes ([1]). And also header lines of some predefined \
format. All this script needs a place to insert the TOC which should be a predefined \
constant line, e.g.<br> # *** CONTENTS *** #<br>(If the script finds the \
corresponding END CONTENTS line, it clears the previous TOC from between these \
two.)<br><br>But then I realized that enhanced with classes this would be useful for \
any kind of scripts without extra work. For example in wikipedia.py which is now \
long, long, and hard to overview.<br> Of course, there would be a possibility to \
leave some kind of data (e.g. &quot;no variables please, only functiions and \
classes&quot;), and two approaches for ordering (everything in original order, or \
fisrt the variables, then functions, then fixes...).<br clear="all"> Unfortunately, \
in some rare cases the length of a line may excced the 80 characters, which may cause \
PEP8 and/or Xqt beiing sad. :-)<br><br>How does this concept sound?<br><br>I will \
anyhow write it for my own purposes. It is just about community use for complicated \
scripts such as fixes.py or wikipedia.py.<br> <br>[1] <a \
href="http://hu.wikipedia.org/wiki/Szerkeszt%C5%91:Bin%C3%A1ris/Fixes_and_functions_HO \
WTO">http://hu.wikipedia.org/wiki/Szerkeszt%C5%91:Bin%C3%A1ris/Fixes_and_functions_HOWTO</a><br>-- \
<br>Bináris


[Attachment #6 (text/plain)]

_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic