{"id":3550,"date":"2023-04-10T12:07:10","date_gmt":"2023-04-10T11:07:10","guid":{"rendered":"https:\/\/pmortensen.eu\/world2\/?p=3550"},"modified":"2023-05-09T14:17:56","modified_gmt":"2023-05-09T13:17:56","slug":"extracting-edit-summaries-from-firefox-e-g-for-stack-overflow","status":"publish","type":"post","link":"https:\/\/pmortensen.eu\/world2\/2023\/04\/10\/extracting-edit-summaries-from-firefox-e-g-for-stack-overflow\/","title":{"rendered":"Extracting edit summaries from Firefox (e.g., for Stack Overflow)"},"content":{"rendered":"<p>The short version: <a href=\"https:\/\/stackoverflow.com\/users\/63550\/peter-mortensen?tab=activity\">Past edit summaries<\/a> used on <a href=\"https:\/\/stackoverflow.com\/questions\">Stack Overflow<\/a> can be extracted from Firefox using a simple Linux (or Windows) command line with the SQL query &#8220;SELECT fieldname, value FROM moz_formhistory&#8221;:<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\nsqlite3 formhistory.sqlite &quot;SELECT fieldname, value FROM moz_formhistory&quot; | grep 'edit-comment' | sort\r\n<\/pre>\n<p>The current directory must be where file <em>formhistory.sqlite<\/em> is. And SQLite 3 must be installed. And on Linux, Firefox must not be active on (using) that &#8220;profile&#8221; (there is usually only one profile by default); otherwise the result is <em>&#8220;Error: database is locked&#8221;<\/em>. A workaround for the former (to avoid having to quit Firefox) is to make a copy of file <em>formhistory.sqlite<\/em> and use the copy instead.<\/p>\n<p>This can also be used when migrating to a new computer or to a new Firefox profile.<\/p>\n<p><!--   \n\n\n<h2>Introduction\n\n<h2>\n\nXXX Reusing edit summaries.\n\nXXX Reference to our edit summary page. \"or not covered by canned edit summaries\"\n\nOften, some past edit summaries are so far back in time it is unfeasible to review past revisions  XXX link to revision page XXX\n\nEspecially, if it has only been seldomly or never user.\n\n--><\/p>\n<h2>Finding <em>formhistory.sqlite<\/em><\/h2>\n<p>In <em>about:profiles<\/em>, it is on the line &#8220;Root Directory&#8221; (for the profile in question). Press &#8220;Open Directory&#8221; to get a convenient way to copy\/paste it.<\/p>\n<p>Sample (Linux):<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\n\/home\/mortensen\/.mozilla\/firefox\/moi8yf2e.default\r\n<\/pre>\n<h2>Command line<\/h2>\n<h3>Windows<\/h3>\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/11769524\/how-can-i-restore-firefox-bookmark-files-from-sqlite-files\/32238284#32238284\">Installation of SQLite 3<\/a>.<\/p>\n<p>Sample command-line<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\ncd C:\\Users\\someUser\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\wy9qk6en.default\r\nsqlite3 formhistory.sqlite &quot;SELECT fieldname, value FROM moz_formhistory&quot; | grep 'edit-comment'\r\n<\/pre>\n<h2>Sample output<\/h2>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\nedit-comment|Removed meta information (this belongs in comments).\r\nedit-comment|Copy edited (e.g. ref. &lt;https:\/\/www.youtube.com\/watch?v=1Dax90QyXgI&amp;t=17m54s&gt;). Dressed the naked link.\r\nedit-comment|Removed the (rhetorical) question - it is not a real question (or at least not one we would answer on this site).\r\nedit-comment|Removed the unrelated (rhetorical) question - it is not a real question (or at least not one we would answer on this site).\r\nedit-comment|Active reading [&lt;https:\/\/en.wikipedia.org\/wiki\/NetBeans&gt; &lt;https:\/\/en.wikipedia.org\/wiki\/Task_Manager_(Windows)&gt; &lt;https:\/\/en.wiktionary.org\/wiki\/can%27t#Verb&gt;]. Jeopardy compliance.\r\nedit-comment|Fixed the weird syntax highlighting (as a result, the diff looks more extensive than it really is - use view &quot;Side-by-side Markdown&quot; to compare).\r\nedit-comment|Active reading [&lt;https:\/\/en.wikipedia.org\/wiki\/NetBeans&gt; - it is also the literal name of the folder].\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The short version: Past edit summaries used on Stack Overflow can be extracted from Firefox using a simple Linux (or Windows) command line with the SQL query &#8220;SELECT fieldname, value FROM moz_formhistory&#8221;: The current directory must be where file formhistory.sqlite &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/pmortensen.eu\/world2\/2023\/04\/10\/extracting-edit-summaries-from-firefox-e-g-for-stack-overflow\/\"> <span class=\"screen-reader-text\">Extracting edit summaries from Firefox (e.g., for Stack Overflow)<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[22,3],"tags":[],"_links":{"self":[{"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/posts\/3550"}],"collection":[{"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/comments?post=3550"}],"version-history":[{"count":19,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/posts\/3550\/revisions"}],"predecessor-version":[{"id":3791,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/posts\/3550\/revisions\/3791"}],"wp:attachment":[{"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/media?parent=3550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/categories?post=3550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/tags?post=3550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}