[pywikibot] Re: Working with wikitables

2022-12-22 Thread Bináris
William Avery ezt írta (időpont: 2022. dec. 22., Cs, 11:12): > FWIW, I wrote a bot script to sort some tables a while ago. > > > https://bitbucket.org/WilliamAvery/wikipythonics/src/master/draftPickSortBot.py > Thank you, I will test it! ___ pywikibot

[pywikibot] Re: Working with wikitables

2022-12-22 Thread William Avery
FWIW, I wrote a bot script to sort some tables a while ago. https://bitbucket.org/WilliamAvery/wikipythonics/src/master/draftPickSortBot.py On Thu, 22 Dec 2022, 08:56 Bináris, wrote: > Thank you! I never used this module. I want to physically sort rows and > columns of a table, so I have to

[pywikibot] Re: Working with wikitables

2022-12-21 Thread JJMC89
mwparserfromhell.nodes.tag.Tag can represent any HTML-style tag. mwparserfromhell will parse wikitext tables into the HTML tag equivalents

[pywikibot] Re: Working with wikitables

2022-12-21 Thread Bináris
I don't find the description of objects and available tags in documentation, can you help me? Are there cells, rows, columns, headings? ___ pywikibot mailing list -- pywikibot@lists.wikimedia.org To unsubscribe send an email to

[pywikibot] Re: Working with wikitables

2022-12-21 Thread JJMC89
You can use mwparserfromhell to filter the type of tag. wikicode = mwparserfromhell.parse(text) for table in wikicode.ifilter_tags(matches=lambda tag: tag.tag.lower()=="table"): wikicode.remove(table) On Wed, Dec 21, 2022 at 8:58 AM Bináris wrote: > Do we have anything to exclude tables