René's URL Explorer Experiment


Title: Feature Request: Paragraph.get_listnum() · Issue #471 · python-openxml/python-docx · GitHub

Open Graph Title: Feature Request: Paragraph.get_listnum() · Issue #471 · python-openxml/python-docx

X Title: Feature Request: Paragraph.get_listnum() · Issue #471 · python-openxml/python-docx

Description: following from #180 #25 #217 ... especially #25 Proposed Feature: Paragraph method computing/yielding a string of the paragraph number/heading as it would appear in the open microsoft word document (e.g. '9.1', '(a)', '(i)', 'Article III...

Open Graph Description: following from #180 #25 #217 ... especially #25 Proposed Feature: Paragraph method computing/yielding a string of the paragraph number/heading as it would appear in the open microsoft word document...

X Description: following from #180 #25 #217 ... especially #25 Proposed Feature: Paragraph method computing/yielding a string of the paragraph number/heading as it would appear in the open microsoft word document...

Opengraph URL: https://github.com/python-openxml/python-docx/issues/471

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Feature Request: Paragraph.get_listnum()","articleBody":"following from #180 #25 #217 ...  especially #25 \r\n\r\nProposed Feature:  Paragraph method computing/yielding a string of the paragraph number/heading as it would appear in the open microsoft word document (e.g. '9.1', '(a)', '(i)', 'Article III',  etc.) ; \r\n\r\nIn obtaining the above, assuming (based on very preliminary review of this helpful article: [https://msdn.microsoft.com/en-us/library/office/ee922775(v=office.14).aspx](https://msdn.microsoft.com/en-us/library/office/ee922775(v=office.14).aspx) that the following need to first be obtained (let me know what's missing!)\r\n(i) the abstract numbering format\r\n(ii) the level of current paragraph within numbered list if nested e.g. ('9.' in example below would be level1 and '9.1' would be level2\r\n(iii) the index of the current paragraph within the immediate nested list  ('(a)' index 0 , '(b)' index 1 etc).  \r\n(iv) overrides? \r\n\r\nif preferred, the get_listnum() method could return a  tuple of (numText, format, level, index) --\u003e (\"9.1\", '%1.%2' , 2, 0)\r\n\r\n\r\nFor example, \r\n\r\n###### \u003ci\u003e when open in microsoft word the docx appears as below:\u003c/i\u003e \r\n\r\n### \u003chr\u003e\r\n### SECTION 5\u003c/b\u003e \u003c/br\u003e INTEREST PAYMENTS\u003c/div\u003e\r\n\r\n### 9.          INTEREST\r\n\r\n#### 9.1       Calculation of interest\r\n\r\nThe rate of interest on each Loan for each period is the percentage rate per annum which is the aggregate of the applicable:\r\n\r\n##### (a)        margin; and\r\n\r\n##### (b)       LIBOR.\r\n### \u003chr\u003e\r\n\r\n\r\n###### \u003ci\u003e currently,  (paragraph.text, paragraph.style) yields:\u003c/i\u003e \r\nSECTION 5 INTEREST PAYMENTS  ,  _ParagraphStyle(\"Normal\")\r\n INTEREST , _ParagraphStyle(\"Style1\")\r\n Calculation of interest , _ParagraphStyle(\"Style2\")\r\nThe rate of interest on each Loan for each period is the percentage rate per annum which is the aggregate of the applicable:\r\nmargin; and , _ParagraphStyle(\"Style3\")\r\nLIBOR. _ParagraphStyle(\"Style3\")\r\n\r\nparagraph.listnum_text() would yield:\r\n''\r\n'9.'\r\n'9.1'\r\n''\r\n'(a)'\r\n'(b)' \r\netc.\r\n\r\nThoughts, comments?  Interest in a concerted effort to finally solve this issue and add it to the library?  I realise a lot of people have already spent significant time on this and that there are a bunch of pitfalls I'm not considering (if it were that easy, we'd have the feature already...)\r\n\r\nStill, I feel like if you solved this you could basically circumvent microsoft word entirely! \r\n\r\n","author":{"url":"https://github.com/nikeqiang","@type":"Person","name":"nikeqiang"},"datePublished":"2018-02-07T13:52:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/471/python-docx/issues/471"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:54e6b06b-ac16-6bc5-5f41-a850eb0092f0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCE78:28003F:24709A:341751:696FA268
html-safe-nonce13c02d8e957f733994e403670f91e45e4b67b6c03bb27fdef45fa840f99576c1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTc4OjI4MDAzRjoyNDcwOUE6MzQxNzUxOjY5NkZBMjY4IiwidmlzaXRvcl9pZCI6IjIzNDc0MDE5ODIxMjIxMDc0OTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaca0b69b38ad091fd3f80049971565058d4f347feb2b3c56edccda30ce1d71fe2d
hovercard-subject-tagissue:295145111
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-openxml/python-docx/471/issue_layout
twitter:imagehttps://opengraph.githubassets.com/eb4b74c81a6eb293820301bcc623847e758ec7caaadd358eaf6392a7021b9d3d/python-openxml/python-docx/issues/471
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/eb4b74c81a6eb293820301bcc623847e758ec7caaadd358eaf6392a7021b9d3d/python-openxml/python-docx/issues/471
og:image:altfollowing from #180 #25 #217 ... especially #25 Proposed Feature: Paragraph method computing/yielding a string of the paragraph number/heading as it would appear in the open microsoft word document...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamenikeqiang
hostnamegithub.com
expected-hostnamegithub.com
None0ca8d8c65612640b9a1a588b3eed68222ca723ed2d028b18fe81b28936d535eb
turbo-cache-controlno-preview
go-importgithub.com/python-openxml/python-docx git https://github.com/python-openxml/python-docx.git
octolytics-dimension-user_id3403760
octolytics-dimension-user_loginpython-openxml
octolytics-dimension-repository_id13592924
octolytics-dimension-repository_nwopython-openxml/python-docx
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id13592924
octolytics-dimension-repository_network_root_nwopython-openxml/python-docx
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release95f60616ce2765d1114fe6da4af405a58c6d26d2
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python-openxml/python-docx/issues/471#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openxml%2Fpython-docx%2Fissues%2F471
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openxml%2Fpython-docx%2Fissues%2F471
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python-openxml%2Fpython-docx
Reloadhttps://github.com/python-openxml/python-docx/issues/471
Reloadhttps://github.com/python-openxml/python-docx/issues/471
Reloadhttps://github.com/python-openxml/python-docx/issues/471
python-openxml https://github.com/python-openxml
python-docxhttps://github.com/python-openxml/python-docx
Notifications https://github.com/login?return_to=%2Fpython-openxml%2Fpython-docx
Fork 1.3k https://github.com/login?return_to=%2Fpython-openxml%2Fpython-docx
Star 5.4k https://github.com/login?return_to=%2Fpython-openxml%2Fpython-docx
Code https://github.com/python-openxml/python-docx
Issues 577 https://github.com/python-openxml/python-docx/issues
Pull requests 121 https://github.com/python-openxml/python-docx/pulls
Actions https://github.com/python-openxml/python-docx/actions
Projects 0 https://github.com/python-openxml/python-docx/projects
Wiki https://github.com/python-openxml/python-docx/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python-openxml/python-docx/security
Please reload this pagehttps://github.com/python-openxml/python-docx/issues/471
Insights https://github.com/python-openxml/python-docx/pulse
Code https://github.com/python-openxml/python-docx
Issues https://github.com/python-openxml/python-docx/issues
Pull requests https://github.com/python-openxml/python-docx/pulls
Actions https://github.com/python-openxml/python-docx/actions
Projects https://github.com/python-openxml/python-docx/projects
Wiki https://github.com/python-openxml/python-docx/wiki
Security https://github.com/python-openxml/python-docx/security
Insights https://github.com/python-openxml/python-docx/pulse
New issuehttps://github.com/login?return_to=https://github.com/python-openxml/python-docx/issues/471
New issuehttps://github.com/login?return_to=https://github.com/python-openxml/python-docx/issues/471
Feature Request: Paragraph.get_listnum()https://github.com/python-openxml/python-docx/issues/471#top
numberinghttps://github.com/python-openxml/python-docx/issues?q=state%3Aopen%20label%3A%22numbering%22
https://github.com/nikeqiang
https://github.com/nikeqiang
nikeqianghttps://github.com/nikeqiang
on Feb 7, 2018https://github.com/python-openxml/python-docx/issues/471#issue-295145111
#180https://github.com/python-openxml/python-docx/issues/180
#25https://github.com/python-openxml/python-docx/issues/25
#217https://github.com/python-openxml/python-docx/issues/217
#25https://github.com/python-openxml/python-docx/issues/25
https://msdn.microsoft.com/en-us/library/office/ee922775(v=office.14).aspxhttps://msdn.microsoft.com/en-us/library/office/ee922775(v=office.14).aspx
numberinghttps://github.com/python-openxml/python-docx/issues?q=state%3Aopen%20label%3A%22numbering%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.