René's URL Explorer Experiment


Title: Headers and Footers API by eupharis · Pull Request #236 · python-openxml/python-docx · GitHub

Open Graph Title: Headers and Footers API by eupharis · Pull Request #236 · python-openxml/python-docx

X Title: Headers and Footers API by eupharis · Pull Request #236 · python-openxml/python-docx

Description: This PR is way not ready to actually be merged. Just want to get some feedback on the API before I go farther. All existing tests pass (Except for 3 hash comparison tests since I added a header and footer to tests/expanded_docx/. I skipped them for now.) There are 5 new passing tests for header and 5 new passing tests for footer. There obviously need to be many, many more unittests before this is ready for primetime. The code needs much cleanup. Here's a sample: header_style = document.styles.add_style('Bar', ...) header_style.font = Pt(32) document = Document() header = document.add_header() header_p = header.add_paragraph('foo', style='Bar') header_p.add_run('alice') header_p.add_run().add_picture(img_file, width, height) Fuller API notes below in docs/header_footer.rst.

Open Graph Description: This PR is way not ready to actually be merged. Just want to get some feedback on the API before I go farther. All existing tests pass (Except for 3 hash comparison tests since I added a header an...

X Description: This PR is way not ready to actually be merged. Just want to get some feedback on the API before I go farther. All existing tests pass (Except for 3 hash comparison tests since I added a header an...

Opengraph URL: https://github.com/python-openxml/python-docx/pull/236

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:e842ca71-6bd3-32c9-8a91-5df1e63201de
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id950A:2CD2CB:4FA8B:6796E:6AFF7E3A
html-safe-nonce7661f8e88777349b9d6615d33040c27b9195549111eff1ef09509c71d6c8c68e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTBBOjJDRDJDQjo0RkE4Qjo2Nzk2RTo2QUZGN0UzQSIsInZpc2l0b3JfaWQiOiI5NTE5MDE4ODQzMDQ1NTU1NzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac6772c8d47d07bacc3ff29e47df6e1b0c119ad71cf80431ebeb21208695be20ef
hovercard-subject-tagpull_request:52579136
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python-openxml/python-docx/pull/236/files
twitter:imagehttps://avatars.githubusercontent.com/u/847862?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/847862?s=400&v=4
og:image:altThis PR is way not ready to actually be merged. Just want to get some feedback on the API before I go farther. All existing tests pass (Except for 3 hash comparison tests since I added a header an...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb5a2047dbbde77e0ba2f8dfd78621e8a7313a105f7437ca693fcccd16cd137ee
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release83e3dfa4de364d61589204ed35e53b2b7f77fba2
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python-openxml/python-docx/pull/236/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openxml%2Fpython-docx%2Fpull%2F236%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openxml%2Fpython-docx%2Fpull%2F236%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python-openxml%2Fpython-docx
Reloadhttps://github.com/python-openxml/python-docx/pull/236/files
Reloadhttps://github.com/python-openxml/python-docx/pull/236/files
Reloadhttps://github.com/python-openxml/python-docx/pull/236/files
python-openxmlhttps://github.com/python-openxml
python-docxhttps://github.com/python-openxml/python-docx
Codehttps://github.com/python-openxml/python-docx
Issues387 (387)https://github.com/python-openxml/python-docx/issues
Pull requests167 (167)https://github.com/python-openxml/python-docx/pulls
Actionshttps://github.com/python-openxml/python-docx/actions
Projectshttps://github.com/python-openxml/python-docx/projects
Wikihttps://github.com/python-openxml/python-docx/wiki
Security and qualityhttps://github.com/python-openxml/python-docx/security
Insightshttps://github.com/python-openxml/python-docx/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpython-openxml%2Fpython-docx%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython-openxml%2Fpython-docx%2Fissues%2Fnew%2Fchoose
eupharishttps://github.com/eupharis
python-openxml:develophttps://github.com/python-openxml/python-docx/tree/develop
eupharis:masterhttps://github.com/eupharis/python-docx/tree/master
Conversation 14 https://github.com/python-openxml/python-docx/pull/236
Commits 26 https://github.com/python-openxml/python-docx/pull/236/commits
Checks 0 https://github.com/python-openxml/python-docx/pull/236/checks
Files changed https://github.com/python-openxml/python-docx/pull/236/files
Please reload this pagehttps://github.com/python-openxml/python-docx/pull/236/files
Headers and Footers API https://github.com/python-openxml/python-docx/pull/236/files#top
Show all changes 26 commits https://github.com/python-openxml/python-docx/pull/236/files
e8fb68e docs: document header/footer feature analysis Mar 16, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/e8fb68e743046240aed0d6396ef9cb1381cde4b4
c08ca7e reformat single-line xml, add header eupharis Nov 30, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/c08ca7e080f28ddfa493cf833dc3653c4cbdd81b
4b37134 temporarily skip sha tests eupharis Nov 30, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/4b3713491cf7cce177d305b57bbbf69888147f80
9c0544a add v1 HeaderPart eupharis Nov 30, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/9c0544a02a46d1e40cbd66cb77ff8d99e15c2f41
a4999fe v1 of remove headers eupharis Nov 30, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/a4999fe6050468a15fdd03cc652a7b4affa92c5a
90e453c move header methods to _body eupharis Nov 30, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/90e453c6bc479d6da2e582205718e2943fe20ea8
a460f3b wip eupharis Dec 1, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/a460f3ba9299d996e9016830c9e5dec947c87385
2a69e3f add header v1 works! eupharis Dec 1, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/2a69e3ff659293c8c804866d907b89c870aa5d28
205819e remove null-op subclass of XmlPart eupharis Dec 1, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/205819ed3999999e50154ca71ce218872e4df332
34161ec footer methods and tests, all except add_footer eupharis Dec 1, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/34161ec231adfc16ed138d5d9e0257e2648c3a22
07566b5 add add_footer method eupharis Dec 1, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/07566b5049e27f9c2667780a495e00cd472ad4a2
5093714 make header / footer rels and styles play nicely eupharis Dec 2, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/5093714cc3d76cf4aa10a0a89b433aebc89062fc
b601615 put header and footer ref at proper locs eupharis Dec 2, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/b6016158defb3d0ef8349216eb11e8c127c09056
3cf0802 add v1 header / footer api docs eupharis Dec 3, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/3cf080226f0ae24986fc2111c801d1c5ca54d7f8
67ae998 cleanup eupharis Dec 3, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/67ae998f71d5153593cf41e05dc0006e6d63604c
178d8f7 cleanup eupharis Dec 3, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/178d8f7023f4e38949d257bcdfe1717cc0c2d971
bab2801 fix tests on python3 eupharis Dec 8, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/bab2801abc1a1fc612ea7144905525f29a98f88a
3f3791f define header structure eupharis Dec 10, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/3f3791f4ecf5a34b34febe99affeaa06ad46c22b
8f843f4 v1 header-footer protocol eupharis Dec 11, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/8f843f419e99484e32d0030ea04f588f7721ebd2
e4d92c3 tweak eupharis Dec 11, 2015 https://github.com/python-openxml/python-docx/pull/236/commits/e4d92c387f33ab49722f6bec6ffa0b51208bfa2d
b1f33b6 fix: a couple small fixes Jan 26, 2016 https://github.com/python-openxml/python-docx/pull/236/commits/b1f33b64f62eb6a0188ed5641dcaec37ce0d015f
6a125cf Merge branch 'feature/header' of github.com:python-openxml/python-doc… eupharis Feb 22, 2016 https://github.com/python-openxml/python-docx/pull/236/commits/6a125cf260f7c03f809d65ac27572e63e5041afc
329e990 add failing test for section.add_header method eupharis Feb 22, 2016 https://github.com/python-openxml/python-docx/pull/236/commits/329e990023f32ebb8196daef25913c80cbcdbfa7
188e943 wip eupharis Feb 22, 2016 https://github.com/python-openxml/python-docx/pull/236/commits/188e9435889ee0851e0f5e3928b379aa37cd0b53
26899a7 finish fleshing out header / footer analysis eupharis Feb 23, 2016 https://github.com/python-openxml/python-docx/pull/236/commits/26899a72095dba056b501888799a9330eded68f2
17d47bc cleanup eupharis Feb 23, 2016 https://github.com/python-openxml/python-docx/pull/236/commits/17d47bce0edff200fb8eb90aa0e0b6c777f0e508
Clear filters https://github.com/python-openxml/python-docx/pull/236/files
Please reload this pagehttps://github.com/python-openxml/python-docx/pull/236/files
Please reload this pagehttps://github.com/python-openxml/python-docx/pull/236/files
header-footer.rst https://github.com/python-openxml/python-docx/pull/236/files#diff-499baf87dcb7284b44e8158df9492dc256a8d5c65d907c7ada8e1bb73a1aa05b
headerfooter.rst https://github.com/python-openxml/python-docx/pull/236/files#diff-27d57b4321f30097f00fe2459f380c683a32c27b2a19ba7af1f2a011487bef20
index.rst https://github.com/python-openxml/python-docx/pull/236/files#diff-804ea4a26526b00e550e5897049ba93bc0e90d546ad46d11119bffbeab84bf38
__init__.py https://github.com/python-openxml/python-docx/pull/236/files#diff-c0a1c822cb0981f051745bdb8830c1c8b9accf9400a83b25568ab76c90adc4bd
document.py https://github.com/python-openxml/python-docx/pull/236/files#diff-226dc206e0b28c8929d1d9f7b7d00174276b4f9c709c388f074b1bdb705d677f
header.py https://github.com/python-openxml/python-docx/pull/236/files#diff-23b7d2877479411f6b3732337d1d80af8a57a2c4587843f5727eafde591cb846
oxml.py https://github.com/python-openxml/python-docx/pull/236/files#diff-cbd0085360668dcc03d907ec32f137e41fd30fb22e77ebc9f5189158af560a22
rel.py https://github.com/python-openxml/python-docx/pull/236/files#diff-a7083e769cf34282c568e337d08e02c7f4f8ae6d5ebff3958a38e0027763e5f2
__init__.py https://github.com/python-openxml/python-docx/pull/236/files#diff-33e2fdac365881fbfed40519c30a287c43553f34f44a016cc2331d1165356c03
footer.py https://github.com/python-openxml/python-docx/pull/236/files#diff-d94f5fe6ff3f63a5785bbf4a000a7af6ad0241e5f5a397f39a1632f640bccd43
header.py https://github.com/python-openxml/python-docx/pull/236/files#diff-c41bb741930b4b3185483d274c356af890a7a5810ef138d810b0455f235f4df7
table.py https://github.com/python-openxml/python-docx/pull/236/files#diff-e5aa791484a3a28dc2e77dcbba71185edc882dd32c1389dde548ecc57385c5cf
xmlchemy.py https://github.com/python-openxml/python-docx/pull/236/files#diff-78c0dbc6591e9d74c5b5ba21f96bb1cee0901b090516d6216122405ec3a31b9a
header.py https://github.com/python-openxml/python-docx/pull/236/files#diff-aefdcc80b141ec48810a10fd6a9c4d5583797a05b16f24305ca5e66af5df2d01
test_phys_pkg.py https://github.com/python-openxml/python-docx/pull/236/files#diff-7c15f9df4e4e72b1c706b15ab71ff551e6fc6d171484106109817829686f4a63
[Content_Types].xml https://github.com/python-openxml/python-docx/pull/236/files#diff-e0ffe9de92970cd55535140e2bf86825cdfc79feb009f87aecdd3f13d4b00032
document.xml.rels https://github.com/python-openxml/python-docx/pull/236/files#diff-b00a4d8849e3f1fa4515c085ebee4a3bdd776ce447903157ae4f939a63ae9b0a
document.xml https://github.com/python-openxml/python-docx/pull/236/files#diff-3be30f5d17db4e34577a598bf38a2d8679dbf9502a19d70d5e3093bd76771882
footer1.xml https://github.com/python-openxml/python-docx/pull/236/files#diff-9fa5169ced24899b735489f4978cd711170095cd856ee6cd18a04ad11f6783fa
header1.xml https://github.com/python-openxml/python-docx/pull/236/files#diff-8aaa2e6856c6e0e849d3b3961267e915a93ea7aa46493be685398f286f31d47d
test_footer.py https://github.com/python-openxml/python-docx/pull/236/files#diff-68515dce5b410278855e692a540c6ee5e59f07248ead5bf45bb458d6548e6544
test_header.py https://github.com/python-openxml/python-docx/pull/236/files#diff-af13648081fd16ed9894083837d58398ff79c45df6cba54593ad2b12d37124a2
docs/dev/analysis/features/header-footer.rsthttps://github.com/python-openxml/python-docx/pull/236/files#diff-499baf87dcb7284b44e8158df9492dc256a8d5c65d907c7ada8e1bb73a1aa05b
View file https://github.com/eupharis/python-docx/blob/17d47bce0edff200fb8eb90aa0e0b6c777f0e508/docs/dev/analysis/features/header-footer.rst
Open in desktop https://desktop.github.com
Please reload this pagehttps://github.com/python-openxml/python-docx/pull/236/files
docs/dev/analysis/features/headerfooter.rsthttps://github.com/python-openxml/python-docx/pull/236/files#diff-27d57b4321f30097f00fe2459f380c683a32c27b2a19ba7af1f2a011487bef20
View file https://github.com/eupharis/python-docx/blob/17d47bce0edff200fb8eb90aa0e0b6c777f0e508/docs/dev/analysis/features/headerfooter.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-openxml/python-docx/pull/236/{{ revealButtonHref }}
docs/dev/analysis/index.rsthttps://github.com/python-openxml/python-docx/pull/236/files#diff-804ea4a26526b00e550e5897049ba93bc0e90d546ad46d11119bffbeab84bf38
View file https://github.com/eupharis/python-docx/blob/17d47bce0edff200fb8eb90aa0e0b6c777f0e508/docs/dev/analysis/index.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-openxml/python-docx/pull/236/{{ revealButtonHref }}
https://github.com/python-openxml/python-docx/pull/236/files#diff-804ea4a26526b00e550e5897049ba93bc0e90d546ad46d11119bffbeab84bf38
https://github.com/python-openxml/python-docx/pull/236/files#diff-804ea4a26526b00e550e5897049ba93bc0e90d546ad46d11119bffbeab84bf38
docx/__init__.pyhttps://github.com/python-openxml/python-docx/pull/236/files#diff-c0a1c822cb0981f051745bdb8830c1c8b9accf9400a83b25568ab76c90adc4bd
View file https://github.com/eupharis/python-docx/blob/17d47bce0edff200fb8eb90aa0e0b6c777f0e508/docx/__init__.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-openxml/python-docx/pull/236/{{ revealButtonHref }}
https://github.com/python-openxml/python-docx/pull/236/files#diff-c0a1c822cb0981f051745bdb8830c1c8b9accf9400a83b25568ab76c90adc4bd
https://github.com/python-openxml/python-docx/pull/236/files#diff-c0a1c822cb0981f051745bdb8830c1c8b9accf9400a83b25568ab76c90adc4bd
https://github.com/python-openxml/python-docx/pull/236/files#diff-c0a1c822cb0981f051745bdb8830c1c8b9accf9400a83b25568ab76c90adc4bd
Please reload this pagehttps://github.com/python-openxml/python-docx/pull/236/files
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.