René's URL Explorer Experiment


Title: Starting Address record line is always the first line, but in original file it was last line · Issue #43 · python-intelhex/intelhex · GitHub

Open Graph Title: Starting Address record line is always the first line, but in original file it was last line · Issue #43 · python-intelhex/intelhex

X Title: Starting Address record line is always the first line, but in original file it was last line · Issue #43 · python-intelhex/intelhex

Description: I am testing this module for some production/testing firmware automation and I am super pleased! I am noticing that when I encode a hex file to a dict with this module, then fetch and re-save to a hex file (the data is stored in a databa...

Open Graph Description: I am testing this module for some production/testing firmware automation and I am super pleased! I am noticing that when I encode a hex file to a dict with this module, then fetch and re-save to a ...

X Description: I am testing this module for some production/testing firmware automation and I am super pleased! I am noticing that when I encode a hex file to a dict with this module, then fetch and re-save to a ...

Opengraph URL: https://github.com/python-intelhex/intelhex/issues/43

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Starting Address record line is always the first line, but in original file it was last line","articleBody":"I am testing this module for some production/testing firmware automation and I am super pleased! \r\nI am noticing that when I encode a hex file to a dict with this module, then fetch and re-save to a hex file (the data is stored in a database as a JSON record) one line gets swapped in the file thus causing my md5 checksums to not match. While I am fairly certain the structure of an intel hex file prevents this from being an issue, it would be nice to under stand how this happens.\r\n\r\nEncode to database:\r\n```\r\nfile_name = file_path.split('/')[-1]\r\nwith open(file_path, 'rb') as file:\r\n    md5 = hashlib.md5(\r\n        file.read()\r\n    ).hexdigest()\r\nintel_hex = IntelHex()\r\nintel_hex.loadhex(file_path)\r\nif image_type.lower() in ['mfg', 'manufacturing']:\r\n    self.manufacturing_fw = intel_hex.todict()\r\n    self.manufacturing_fw_name = file_name\r\n    self.manufacturing_md5 = md5\r\n```\r\n\r\nDecode From database:\r\n```\r\nif image_type.lower() in ['mfg', 'manufacturing']:\r\n    output_file_name = f'{out_path}/{self.part_number}-{self.manufacturing_fw_name}'\r\n    firmware_data = self.manufacturing_fw\r\n\r\ndata = {}\r\nfor key, value in firmware_data.items():\r\n    if key != 'start_addr':\r\n        key = int(key)\r\n    data[key] = value\r\n\r\nintel_hex = IntelHex()\r\nintel_hex.fromdict(data)\r\nintel_hex.write_hex_file(output_file_name)\r\n```\r\n\r\nI need to add these lines upon export to re-arrange the lines to get the exported file to match the original exactly.\r\nNot efficient or the minimum solution, but it works with everything I have tested so far.\r\n```\r\nfile = open(output_file_name, 'r')\r\nlines = file.readlines()\r\nfile.close()\r\noutput = open(output_file_name, 'w')\r\ntotal_lines = len(lines)\r\nlast_line = lines[-1]\r\nlines.append(lines[-1])\r\nlines[0], lines[total_lines-1] = lines[total_lines-1], lines[0]\r\nlines.append(last_line)\r\nfor line in lines[1:-1]:\r\n    output.write(line)\r\noutput.close()\r\n```\r\n\r\nI appreciate any help with this!","author":{"url":"https://github.com/LukeGary462","@type":"Person","name":"LukeGary462"},"datePublished":"2020-07-08T15:15:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/43/intelhex/issues/43"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:2b21757e-6ef7-f1ec-1fe3-b474c822dbcf
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9446:3F2860:49169A:63480B:698D8BC3
html-safe-nonce14a44a2f6629cd83b3afc3efde5dc2df95deb2214c1d2285ed3243cd6ca787d3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NDQ2OjNGMjg2MDo0OTE2OUE6NjM0ODBCOjY5OEQ4QkMzIiwidmlzaXRvcl9pZCI6IjM5ODA4NjE0OTE3MTI0NjE3NjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac6d1434d0bb2ef0393c1a451648d68e52c202f8ec4b3d653bf75202c640066648
hovercard-subject-tagissue:653381763
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-intelhex/intelhex/43/issue_layout
twitter:imagehttps://opengraph.githubassets.com/abe8751dc293e3d9458725a0c8fad18fc19a543a9444b3a0898a755cf4a325d9/python-intelhex/intelhex/issues/43
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/abe8751dc293e3d9458725a0c8fad18fc19a543a9444b3a0898a755cf4a325d9/python-intelhex/intelhex/issues/43
og:image:altI am testing this module for some production/testing firmware automation and I am super pleased! I am noticing that when I encode a hex file to a dict with this module, then fetch and re-save to a ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameLukeGary462
hostnamegithub.com
expected-hostnamegithub.com
Nonec0818105fa276287e9369cfdefa0a0fa7953719791ceff9b94d69623c0a4fe8a
turbo-cache-controlno-preview
go-importgithub.com/python-intelhex/intelhex git https://github.com/python-intelhex/intelhex.git
octolytics-dimension-user_id55888006
octolytics-dimension-user_loginpython-intelhex
octolytics-dimension-repository_id33128473
octolytics-dimension-repository_nwopython-intelhex/intelhex
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id33128473
octolytics-dimension-repository_network_root_nwopython-intelhex/intelhex
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
releasebd964b0594af16531b06ac03e14711206a3079aa
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/python-intelhex/intelhex/issues/43#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-intelhex%2Fintelhex%2Fissues%2F43
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://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-intelhex%2Fintelhex%2Fissues%2F43
Sign up https://patch-diff.githubusercontent.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-intelhex%2Fintelhex
Reloadhttps://patch-diff.githubusercontent.com/python-intelhex/intelhex/issues/43
Reloadhttps://patch-diff.githubusercontent.com/python-intelhex/intelhex/issues/43
Reloadhttps://patch-diff.githubusercontent.com/python-intelhex/intelhex/issues/43
python-intelhex https://patch-diff.githubusercontent.com/python-intelhex
intelhexhttps://patch-diff.githubusercontent.com/python-intelhex/intelhex
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-intelhex%2Fintelhex
Fork 114 https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-intelhex%2Fintelhex
Star 223 https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-intelhex%2Fintelhex
Code https://patch-diff.githubusercontent.com/python-intelhex/intelhex
Issues 17 https://patch-diff.githubusercontent.com/python-intelhex/intelhex/issues
Pull requests 14 https://patch-diff.githubusercontent.com/python-intelhex/intelhex/pulls
Actions https://patch-diff.githubusercontent.com/python-intelhex/intelhex/actions
Projects 0 https://patch-diff.githubusercontent.com/python-intelhex/intelhex/projects
Wiki https://patch-diff.githubusercontent.com/python-intelhex/intelhex/wiki
Security 0 https://patch-diff.githubusercontent.com/python-intelhex/intelhex/security
Insights https://patch-diff.githubusercontent.com/python-intelhex/intelhex/pulse
Code https://patch-diff.githubusercontent.com/python-intelhex/intelhex
Issues https://patch-diff.githubusercontent.com/python-intelhex/intelhex/issues
Pull requests https://patch-diff.githubusercontent.com/python-intelhex/intelhex/pulls
Actions https://patch-diff.githubusercontent.com/python-intelhex/intelhex/actions
Projects https://patch-diff.githubusercontent.com/python-intelhex/intelhex/projects
Wiki https://patch-diff.githubusercontent.com/python-intelhex/intelhex/wiki
Security https://patch-diff.githubusercontent.com/python-intelhex/intelhex/security
Insights https://patch-diff.githubusercontent.com/python-intelhex/intelhex/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/python-intelhex/intelhex/issues/43
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/python-intelhex/intelhex/issues/43
Starting Address record line is always the first line, but in original file it was last linehttps://patch-diff.githubusercontent.com/python-intelhex/intelhex/issues/43#top
https://github.com/LukeGary462
https://github.com/LukeGary462
LukeGary462https://github.com/LukeGary462
on Jul 8, 2020https://github.com/python-intelhex/intelhex/issues/43#issue-653381763
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.