<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5441947463553477837</id><updated>2011-11-27T19:46:51.658-05:00</updated><category term='picasa'/><category term='Python'/><category term='encryption'/><category term='SQL'/><category term='java'/><category term='technical'/><category term='software'/><category term='JPython'/><title type='text'>Malin's TechTalk</title><subtitle type='html'>Stuff... that works (hopefully).</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://davidmalin.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://davidmalin.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>David</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5441947463553477837.post-6591722748570680698</id><published>2011-01-03T08:52:00.000-05:00</published><updated>2011-01-03T08:52:47.887-05:00</updated><title type='text'>Download All Podcasts from A Html Page (Conversations with History)</title><content type='html'>&lt;span class="Apple-style-span" style="font-size: 32px; font-weight: bold;"&gt;Download All Podcasts from A Html Page&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(&lt;span class="Apple-style-span" style="font-size: 19px; font-weight: bold;"&gt;Cross-Post from &lt;a href="http://david-web.appspot.com/cnt/DowloadConversationsWithHistory/"&gt;main website&lt;/a&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I love the excellent &lt;a href="http://www.uctv.tv/"&gt;uctv TV&lt;/a&gt; program '&lt;a href="http://conversations.berkeley.edu/"&gt;conversation with history&lt;/a&gt;', with Harry Kreisler (&lt;a href="http://www.uctv.tv/cwh/"&gt;podcast url&lt;/a&gt;). I like it so much that I want to listen to them all. The problem is that I don't want to bother downloading them one by one to my mp3 player. The webpage labels the .mp3 inconveniently as non-consecutive numbers (ex: 72365.mp3). It makes it even harder to figure out if I listened to one of the downloaded files.&lt;br /&gt;&lt;br /&gt;This is a script that fetches the podcast's url, downloads all the mp3 and names the files after the podcasts' title (ex: 'Legislating for the People, with Ronald V. Dellums.mp3').&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Run the Scrip&lt;/h2&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;python3 download_cwh.py&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Output&lt;/h3&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;INFO: Starting at 2011-01-02 17:38&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/20378.mp3, writing to: 0001_islam, identity, and globalization with tariq ramadan.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/19846.mp3, writing to: 0002_henry kaplan and the story of hodgkin's disease.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/19856.mp3, writing to: 0003_america's path to permanent war.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/19488.mp3, writing to: 0004_reforming american health care.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/19602.mp3, writing to: 0005_the bp disaster - lessons from the niger delta.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/19332.mp3, writing to: 0006_political awakenings.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/19331.mp3, writing to: 0007_science diplomacy and nuclear threats.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/19197.mp3, writing to: 0008_nuclear proliferation with ambassador gregory l. schulte.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/18709.mp3, writing to: 0009_from salvation to spirituality.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/18527.mp3, writing to: 0010_reflections on u.s.- canada relations.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/18541.mp3, writing to: 0011_reflections on the university of california.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/18526.mp3, writing to: 0012_islam and the secular state.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/18336.mp3, writing to: 0013_the modern presidency and the national security state with garry wills.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/18375.mp3, writing to: 0014_the making of a marine officer.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/18192.mp3, writing to: 0015_american democracy, veterans, and higher education.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/18152.mp3, writing to: 0016_what made california great.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/18124.mp3, writing to: 0017_what happens when other countries have the money.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/17867.mp3, writing to: 0018_leadership in higher education with hanna holborn gray.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/17979.mp3, writing to: 0019_the grand strategy of the byzantine empire with edward n. luttwak.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/17870.mp3, writing to: 0020_the diaspora and israel.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/17787.mp3, writing to: 0021_finding an authentic voice.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/17602.mp3, writing to: 0022_nuclear weapons and international conflict.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/17601.mp3, writing to: 0023_a life in science: a sense of wonder.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/17429.mp3, writing to: 0024_u.s. policy toward iran: problems and prospects.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/17113.mp3, writing to: 0025_dealing with iran.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/16935.mp3, writing to: 0026_reaching for the stars.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/16749.mp3, writing to: 0027_social science and the public good.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/16463.mp3, writing to: 0028_power, ideas and foreign policy in the 21st century.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/16593.mp3, writing to: 0029_dignity, human rights, and torture.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/16750.mp3, writing to: 0030_the red cross report, the torture memos, and political accountability with mark danner.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/16456.mp3, writing to: 0031_building a multilateral international order.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/16455.mp3, writing to: 0032_a microbiologist&amp;amp;rsquo;s intellectual odyssey.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/16462.mp3, writing to: 0033_judges and the rule of law.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/16461.mp3, writing to: 0034_identity with john perry.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/16278.mp3, writing to: 0035_the politics of the veil.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/16279.mp3, writing to: 0036_nuclear power and the challenges of global climate change and nuclear proliferation.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/16404.mp3, writing to: 0037_congress, globalization, and the economic crisis.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/16412.mp3, writing to: 0038_your inner fish with neil shubin.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/16283.mp3, writing to: 0039_identity, freedom, and revolution.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/16083.mp3, writing to: 0040_lessons from fdr's new deal.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/16225.mp3, writing to: 0041_causes and consequences of the global economic collapse.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/15887.mp3, writing to: 0042_art and science.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/16055.mp3, writing to: 0043_historical perspective on the global economic crisis.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/16057.mp3, writing to: 0044_understanding the global environmental crisis.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/15882.mp3, writing to: 0045_the politics of food.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/15783.mp3, writing to: 0046_islam in the west with jocelyn cesari.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/15749.mp3, writing to: 0047_diplomacy with jeremy kinsman.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/15744.mp3, writing to: 0048_terrorism, immigration and security since 9/11.mp3&lt;br /&gt;DEBUG: Error (&amp;lt;class 'IOError'&amp;gt;): [Errno 2] No such file or directory: '0048_terrorism, immigration and security since 9/11.mp3'&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/15426.mp3, writing to: 0049_communication as a tool for european democracy.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/15607.mp3, writing to: 0050_global poverty, development, and social change.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/15745.mp3, writing to: 0051_the rumsfeld memo and the betrayal of american values.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/15591.mp3, writing to: 0052_natural capitalism.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/15590.mp3, writing to: 0053_abraham lincoln as commander in chief.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/15580.mp3, writing to: 0054_the ascent of money.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/15530.mp3, writing to: 0055_charting the geopolitics of a new century.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/15444.mp3, writing to: 0056_thinking about religion, secularism and politics.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/15411.mp3, writing to: 0057_american foreign policy from the end of the cold war to 9/11.mp3&lt;br /&gt;DEBUG: Error (&amp;lt;class 'IOError'&amp;gt;): [Errno 2] No such file or directory: '0057_american foreign policy from the end of the cold war to 9/11.mp3'&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/15414.mp3, writing to: 0058_pakistan.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/15413.mp3, writing to: 0059_china and the united states.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/15394.mp3, writing to: 0060_reflections on the supreme court.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/15229.mp3, writing to: 0061_how the war on terror turned into a war on american values.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/15135.mp3, writing to: 0062_descent into chaos.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14828.mp3, writing to: 0063_what does china think?.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14818.mp3, writing to: 0064_visualizing the relationship between structure and cellular activity.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14820.mp3, writing to: 0065_terror and consent: the wars for the twenty-first century.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14819.mp3, writing to: 0066_diplomacy and u.s. foreign policy.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14669.mp3, writing to: 0067_biblical insights into the problem of suffering.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14637.mp3, writing to: 0068_the power of words and the power over words.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14632.mp3, writing to: 0069_a surgeon&amp;amp;rsquo;s journey beyond science.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14865.mp3, writing to: 0070_addressing national security challenges in the post 911 world.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14670.mp3, writing to: 0071_reflections on a life as scholar,teacher,and policy advisor.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14633.mp3, writing to: 0072_capitalism, the environment, and crossing from crisis to sustainability.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14510.mp3, writing to: 0073_global competition and the rise of the second world.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14635.mp3, writing to: 0074_vice president cheney and america's response to 911.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14634.mp3, writing to: 0075_afghanistan and pakistan.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14500.mp3, writing to: 0076_u.s. foreign policy and the terrorist threat.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14490.mp3, writing to: 0077_the military in the post 911 world.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14478.mp3, writing to: 0078_the rise of asia and the decline of the west.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14477.mp3, writing to: 0079_chasing the flame.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14341.mp3, writing to: 0080_america&amp;amp;rsquo;s reckless response to terror.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14340.mp3, writing to: 0081_why market reform succeeded and democracy failed in russia.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14259.mp3, writing to: 0082_investigating military conduct at abu ghraib.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14257.mp3, writing to: 0083_the military and political development in egypt, algeria, and turkey.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/14234.mp3, writing to: 0084_the shaping of a legal response to 911.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13992.mp3, writing to: 0085_iran, israel, and the united states.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13974.mp3, writing to: 0086_national security and the rule of law.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13889.mp3, writing to: 0087_nuclear terrorism.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13833.mp3, writing to: 0088_science and history.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13832.mp3, writing to: 0089_science, government, and the university.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13830.mp3, writing to: 0090_the moment of empire.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13693.mp3, writing to: 0091_global capitalism, labor markets, and inequality.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13692.mp3, writing to: 0092_system change or more of the same.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13688.mp3, writing to: 0093_the imperial temptation of america.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13687.mp3, writing to: 0094_britain and america and the making of the modern world.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13662.mp3, writing to: 0095_economics, politics and public discourse.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13665.mp3, writing to: 0096_iran - domestic politics and foreign policy.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13555.mp3, writing to: 0097_what terrorists want.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13568.mp3, writing to: 0098_domestic politics and international relations.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13466.mp3, writing to: 0099_inside muslim militancy.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13433.mp3, writing to: 0100_wealth, empire, and the future of america.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13432.mp3, writing to: 0101_nationalism, cosmopolitanism and american national identity.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13327.mp3, writing to: 0102_truth, power, and the iraq debacle with mark danner.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13297.mp3, writing to: 0103_the jewish century with yuri slezkine.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13290.mp3, writing to: 0104_business, government and ethics in an era of globalization with david vogel.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13167.mp3, writing to: 0105_domestic politics and international behavior: the case of china and the u.s..mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/12356.mp3, writing to: 0106_freedom of expression, tolerance, and human rights with t.m. scanlon.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/13013.mp3, writing to: 0107_how traders, preachers, adventurers, and warriors shaped globalization with nayan chanda.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/12846.mp3, writing to: 0108_challenges for u.s. national security policy with general tony zinni.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/12824.mp3, writing to: 0109_confronting global terrorism: the elements of a liberal grand strategy with tom farer.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/12623.mp3, writing to: 0110_israel and the 1967 war with tom segev.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/12599.mp3, writing to: 0111_america, europe, and the islamic world with mark steyn.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/12490.mp3, writing to: 0112_law, politics, and the coming collapse of the middle class with elizabeth warren.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/12489.mp3, writing to: 0113_the last days of the american republic with chalmers johnson.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/12294.mp3, writing to: 0114_globalization and the conservative movement in the united states, with john micklethwait.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/12295.mp3, writing to: 0115_intuition and rationality with daniel kahneman.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/12243.mp3, writing to: 0116_globalization and islam, with olivier roy.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/12297.mp3, writing to: 0117_the emergence of the new china with john pomfret.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/12185.mp3, writing to: 0118_foreign correspondent - the middle east with robert  fisk.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/12117.mp3, writing to: 0119_al-qaeda and the road to 9/11, with lawrence wright.mp3&lt;br /&gt;DEBUG: Error (&amp;lt;class 'IOError'&amp;gt;): [Errno 2] No such file or directory: '0119_al-qaeda and the road to 9/11, with lawrence wright.mp3'&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/12102.mp3, writing to: 0120_reflections on empire, nationalism and globalization, with kenneth d. kaunda.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/12087.mp3, writing to: 0121_ethical realism and u.s. foreign policy, with anatole  lieven and john hulsman.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/12103.mp3, writing to: 0122_revolutions in military affairs and the war on terror, with max boot.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/12082.mp3, writing to: 0123_the war of the world, with niall ferguson.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/12061.mp3, writing to: 0124_a cosmologist&amp;amp;rsquo;s intellectual journey, with james e. peebles.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/11984.mp3, writing to: 0125_women's rights, religious freedom, and liberal education, with martha c. nussbaum.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/11335.mp3, writing to: 0126_meaning, relevance and the limits of technology, with hubert dreyfus.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/11738.mp3, writing to: 0127_larry brilliant.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/11794.mp3, writing to: 0128_the struggle for human rights in iran, with shirin  ebadi.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/11722.mp3, writing to: 0129_journalism in the digital age, with michael kinsley.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/11692.mp3, writing to: 0130_climate change and public policy, with lars-erik liljelund.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/11495.mp3, writing to: 0131_military victory in the information age, with stephen d. biddle.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/11493.mp3, writing to: 0132_thinking about the &amp;amp;ldquo;unthinkables&amp;amp;rdquo; in the post 911 world, with harold p smith, jr.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/11496.mp3, writing to: 0133_europe and the world, with the right honorable lord patten of barnes ch.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/11398.mp3, writing to: 0134_the transformation of american politics, with paul pierson.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/11244.mp3, writing to: 0135_science and society, with dudley herschbach.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/9165.mp3, writing to: 0136_the peace movement in historical perspective, with linus pauling.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/9510.mp3, writing to: 0137_on theory, with amartya sen.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/9511.mp3, writing to: 0138_the pentagon's new map, with thomas p.m. barnett.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/9322.mp3, writing to: 0139_economic history, with robert william fogel.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/9171.mp3, writing to: 0140_islam and the state, with vali nasr.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/8994.mp3, writing to: 0141_science and politics, with richard c. lewontin.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/8991.mp3, writing to: 0142_theory and international institutions, with robert o. keohane.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/8800.mp3, writing to: 0143_a geographer's perspective on the new american imperialism, with david harvey.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/8639.mp3, writing to: 0144_the myths of globalization: markets, democracy, and ethnic hatred, with amy chua.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/8634.mp3, writing to: 0145_occupation and terrorism, with amira hass.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/8848.mp3, writing to: 0146_a diplomat's odyssey, with joseph wilson.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/8642.mp3, writing to: 0147_a scientist's random walk, with steven chu.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/8641.mp3, writing to: 0148_militarism and the american empire, with chalmers johnson.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/7894.mp3, writing to: 0149_islam, empire, and the left, with tariq ali.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/7682.mp3, writing to: 0150_islam and the west, with john l. esposito.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/7390.mp3, writing to: 0151_u.s. foreign policy and the american political tradition, with walter russell mead.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/7386.mp3, writing to: 0152_theory, international politics, kenneth n. waltz.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/7388.mp3, writing to: 0153_islam and state power in middle east and central asia, with vitaly naumkin.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/7242.mp3, writing to: 0154_islamic societies, with ira lapidus.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/6797.mp3, writing to: 0155_writing, theatre arts, and political activism, with wole soyinka.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/6728.mp3, writing to: 0156_intelligence and national security in a democracy, jennifer e. sims.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/6726.mp3, writing to: 0157_u.s. foreign policy and multilateral negotiations, with robert l. gallucci.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/6604.mp3, writing to: 0158_the political imagination of islam, with olivier roy.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/6570.mp3, writing to: 0159_pakistan &amp;amp;amp; islamic fundamentalism, with khaled ahmed.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/6568.mp3, writing to: 0160_activism, anarchism, and power, with noam chomsky.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/6569.mp3, writing to: 0161_the rise of militant islam, ahmed rashid.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/6233.mp3, writing to: 0162_the case of trauma and recovery, psychological insight and political understanding, with judith herman.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/6046.mp3, writing to: 0163_adventures of a scientist, with charles w. townes.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/5217.mp3, writing to: 0164_legislating for the people, with ronald v. dellums.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/4975.mp3, writing to: 0165_art and healing, with kenzaburo oe.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/11289.mp3, writing to: 0166_ethics and foreign policy, with father j. bryan hehir.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/7126.mp3, writing to: 0167_intellectual journey:  challenging the conventional wisdom, with john kenneth galbraith.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/7127.mp3, writing to: 0168_reporting the story of  genocide, with philip gourevitch.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/7131.mp3, writing to: 0169_a life in public service, with robert s. mcnamara.mp3&lt;br /&gt;DEBUG: Fetching http://podcast.uctv.tv/mp3/7796.mp3, writing to: 0170_philosophy and the habits of critical thinking, with john r. searle.mp3&lt;br /&gt;INFO: Finishing at 2011-01-02 22:49&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Comment&lt;/h3&gt;&lt;br /&gt;5 hours and 4GB later later the 170 'conversations with history' have been downloaded.&lt;br /&gt;&lt;br /&gt;As it can be seen in the output, X files failed to be saved (IOError). This is simply because there was no validation of the filename (the '/' in 9/11 is illegal in a filename). This has been fixed by the &lt;code&gt;substIllegalCharsInFilename()&lt;/code&gt; function. After introducing the function, I ran the script again. It downloaded the missing files whilst skipping the ones previously downloaded items.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;The Code! (Also Check Download Section)&lt;/h2&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;#!/usr/bin/python3&lt;br /&gt; &lt;br /&gt;import os.path&lt;br /&gt;import urllib.request&lt;br /&gt;import logging&lt;br /&gt;import time&lt;br /&gt; &lt;br /&gt;# constants&lt;br /&gt;LOG_FILENAME = 'download_cwh.log'&lt;br /&gt;CACHE_FILE = 'uctv_cwh_htmlcache.html'&lt;br /&gt;SRC_WEBSITE_CWH = 'http://www.uctv.tv/cwh/'&lt;br /&gt; &lt;br /&gt;class ScriptLogHandler(logging.FileHandler):&lt;br /&gt;  """&lt;br /&gt;  Save to file and output to screen&lt;br /&gt;  """&lt;br /&gt;  def emit(self, record):&lt;br /&gt;    print("{0}: {1}".format(record.levelname, record.getMessage()))&lt;br /&gt;    logging.FileHandler.emit(self, record)&lt;br /&gt; &lt;br /&gt;# configure logger&lt;br /&gt;logger = logging.getLogger("script_logger")&lt;br /&gt;logger.setLevel(logging.DEBUG)&lt;br /&gt;log_handler = ScriptLogHandler("download_cwh.log")&lt;br /&gt;log_handler.setLevel(logging.DEBUG)&lt;br /&gt;logger.addHandler(log_handler)&lt;br /&gt; &lt;br /&gt;class Got404WhileAttemptingToDlPodcast(Exception):&lt;br /&gt;  pass&lt;br /&gt; &lt;br /&gt;def substIllegalCharsInFilename(filename):&lt;br /&gt;  allowedChars = """abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-,?.': """&lt;br /&gt; &lt;br /&gt;  lstOutChars = []&lt;br /&gt;  for char in filename:&lt;br /&gt;    if char in allowedChars:&lt;br /&gt;      lstOutChars.append(char)&lt;br /&gt;    else:&lt;br /&gt;      lstOutChars.append('_')&lt;br /&gt;  return "".join(lstOutChars)&lt;br /&gt; &lt;br /&gt;def getTimeNow():&lt;br /&gt;  strTime = time.strftime("%Y-%m-%d %H:%S", time.localtime())&lt;br /&gt;  return strTime&lt;br /&gt; &lt;br /&gt;def getHtml():&lt;br /&gt;  sock =  urllib.request.urlopen(SRC_WEBSITE_CWH)&lt;br /&gt;  htmlSource = sock.read()&lt;br /&gt;  sock.close()&lt;br /&gt;  return htmlSource.decode("utf-8")&lt;br /&gt; &lt;br /&gt;def findTitleUrlTuples(htmlSource):&lt;br /&gt;  curr_program_title = ''&lt;br /&gt;  tag_beginTitle = 'Conversations With History:'.lower()&lt;br /&gt;  tag_mp3 = 'Audio Podcast'.lower()&lt;br /&gt;  lst_TitleUrlTuples = []&lt;br /&gt;  for line in htmlSource.splitlines():&lt;br /&gt; &lt;br /&gt;    # Ignore case&lt;br /&gt;    line = line.lower()&lt;br /&gt; &lt;br /&gt;    if line.find(tag_beginTitle) != -1:&lt;br /&gt;      pre = line.split(tag_beginTitle, 1)[1]&lt;br /&gt;      curr_program_title = pre.split('&amp;lt;',1)[0].strip()&lt;br /&gt; &lt;br /&gt;    if line.find(tag_mp3) != -1 and line.find('.mp3'):&lt;br /&gt;      mp3_url_posthttp          = line.split('http')[1]&lt;br /&gt;      mp3_url_posthttp_premp3   = mp3_url_posthttp.split('.mp3', 1)[0]&lt;br /&gt;      mp3_url = 'http' + mp3_url_posthttp_premp3 + '.mp3'&lt;br /&gt;      lst_TitleUrlTuples.append((curr_program_title, mp3_url))&lt;br /&gt;  return lst_TitleUrlTuples&lt;br /&gt; &lt;br /&gt;def numTo4DigitsStr(iNum):&lt;br /&gt;  strNum = str(iNum)&lt;br /&gt;  while len(strNum) &amp;lt; 4:&lt;br /&gt;    strNum = '0' + strNum&lt;br /&gt;  return strNum&lt;br /&gt; &lt;br /&gt;def downloadMp3sFromTitleUrlTuple(titleUrlTuple, fileNo):&lt;br /&gt;  (title, mp3_url) = titleUrlTuple&lt;br /&gt;  filename = "{0}_".format(numTo4DigitsStr(fileNo)) + title + '.mp3'&lt;br /&gt;  filename = substIllegalCharsInFilename(filename)&lt;br /&gt; &lt;br /&gt;  if not os.path.isfile(filename):&lt;br /&gt;    logger.debug("Fetching {0}, writing to: {1}".format(mp3_url, filename))&lt;br /&gt; &lt;br /&gt;    sock =  urllib.request.urlopen(mp3_url)&lt;br /&gt;    mp3_bytes = sock.read()&lt;br /&gt;    sock.close()&lt;br /&gt; &lt;br /&gt;    fh = open(filename, 'wb')&lt;br /&gt;    fh.write(mp3_bytes)&lt;br /&gt;    fh.close()&lt;br /&gt;  else:&lt;br /&gt;    logger.debug("Skipping {0}, file alredy in directory.".format(filename))&lt;br /&gt; &lt;br /&gt;def downloadMp3sFromTitleUrlTuples(lst_TitleUrlTuples):&lt;br /&gt;  fileNo = 0&lt;br /&gt;  for titleUrlTuple in lst_TitleUrlTuples:&lt;br /&gt;    fileNo = fileNo + 1&lt;br /&gt;    try:&lt;br /&gt;      downloadMp3sFromTitleUrlTuple(titleUrlTuple, fileNo)&lt;br /&gt;    except Got404WhileAttemptingToDlPodcast as inst:&lt;br /&gt;      logger.debug("Error (" + str(type(inst)) + "): " + str(inst))&lt;br /&gt;    except Exception as inst:&lt;br /&gt;      logger.debug("Error (" + str(type(inst)) + "): " + str(inst))&lt;br /&gt; &lt;br /&gt;def do():&lt;br /&gt; &lt;br /&gt;  htmlSource = getHtml()  &lt;br /&gt; &lt;br /&gt;  lst_TitleUrlTuples = findTitleUrlTuples(htmlSource)&lt;br /&gt;  downloadMp3sFromTitleUrlTuples(lst_TitleUrlTuples)&lt;br /&gt; &lt;br /&gt;if __name__ == '__main__':&lt;br /&gt;  logger.info("Starting at {0}".format(getTimeNow()))&lt;br /&gt;  do()&lt;br /&gt;  logger.info("Finishing at {0}".format(getTimeNow()))&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h2&gt;Download&lt;/h2&gt;&lt;br /&gt;&lt;a href="http://www.blogger.com/static/download_cwh.zip"&gt;download_cwh.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Afterword&lt;/h2&gt;&lt;br /&gt;It might have been faster to use the 'html.parser.HTMLParser' class and regexes in order to extract the files from the html page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5441947463553477837-6591722748570680698?l=davidmalin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidmalin.blogspot.com/feeds/6591722748570680698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5441947463553477837&amp;postID=6591722748570680698' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/6591722748570680698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/6591722748570680698'/><link rel='alternate' type='text/html' href='http://davidmalin.blogspot.com/2011/01/download-all-podcasts-from-html-page.html' title='Download All Podcasts from A Html Page (Conversations with History)'/><author><name>David</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5441947463553477837.post-2401321992030361879</id><published>2011-01-01T16:20:00.001-05:00</published><updated>2011-01-01T16:21:30.637-05:00</updated><title type='text'>Website move notification</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;This website has moved.&lt;/b&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The posts here will stay on, but will no longer be updated. The important projects have been moved to their respective pages at:&amp;nbsp;&lt;a href="http://david-web.appspot.com/"&gt;http://david-web.appspot.com&lt;/a&gt;. (e.g:&amp;nbsp;&lt;a href="http://david-web.appspot.com/cnt/PEasyCrypt"&gt;http://david-web.appspot.com/cnt/PEasyCrypt&lt;/a&gt;,&amp;nbsp;&lt;a href="http://david-web.appspot.com/cnt/FileSpaceAnalysis/"&gt;http://david-web.appspot.com/cnt/FileSpaceAnalysis/&lt;/a&gt;,&amp;nbsp;&lt;a href="http://david-web.appspot.com/cnt/WeightWatch/"&gt;http://david-web.appspot.com/cnt/WeightWatch/&lt;/a&gt;,&amp;nbsp;...)&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Thank you.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5441947463553477837-2401321992030361879?l=davidmalin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidmalin.blogspot.com/feeds/2401321992030361879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5441947463553477837&amp;postID=2401321992030361879' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/2401321992030361879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/2401321992030361879'/><link rel='alternate' type='text/html' href='http://davidmalin.blogspot.com/2011/01/website-move-notification.html' title='Website move notification'/><author><name>David</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5441947463553477837.post-7566670773514801483</id><published>2010-12-26T17:50:00.002-05:00</published><updated>2010-12-26T17:50:45.477-05:00</updated><title type='text'>Fixing Latex Quotes With a Script</title><content type='html'>&lt;h1&gt;Fixing Latex Quotes With a Script&lt;/h1&gt;&lt;br /&gt;&lt;p&gt;Latex is &lt;strong&gt;great&lt;/strong&gt;, but there are a &lt;em&gt;lot&lt;/em&gt; of small quirks to take account for. Fortunately, since Latex is like code that is compiled, it is quite easy to fix some of the problem with text-processing scripts.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;One of my pet peeve is that in order to get nice English quotes to work, Latex requires the user to use non-standard quotes. This is not correct: 'quotes', &lt;em&gt;this&lt;/em&gt; is correct: `quotes'. Quite annoying when you use a non-English keyboard layout.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I saw that there was no quick solution (e.g. a script that fixes the problem) on &lt;a href="http://stackoverflow.com/questions/346567/how-can-one-turn-regular-quotes-i-e-into-latex-tex-quotes-i-e"&gt;stackoverflow&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;What the scipt does is quite simple, it will replace the 'quotes' in your latex document into 'proper latex quotes'. Here is an example of the input-output:&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Input&lt;/h3&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;This is intended to be a moderately 'hard' test for the 'fixLatexQuotes script'.&lt;br /&gt;If all goes 'well', it's going to work, without making the file 'kaput'.&lt;br /&gt;The scrip should 'work in most situations', however, it will not 'try to fix 'compicated' cases'.&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Command Line&lt;/h3&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;python3 fixLatexQuotes.py fixLatexQuotes_test.tex fixLatexQuotes_test_out.tex&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Output (fixLatexQuotes&lt;em&gt;test&lt;/em&gt;out.tex)&lt;/h3&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;This is intended to be a moderately `hard' test for the `fixLatexQuotes script'.&lt;br /&gt;If all goes `well', it's going to work, without making the file `kaput'.&lt;br /&gt;The scrip should `work in most situations', however, it will not `try to fix 'compicated' cases'.&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Note&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;It should fix the quotes properly, but does not try to fix everything (you can see one instance in the example (the indented quote) that is not fixed). The reason is that I guess when it is too hard to make a decision, it should leave the source alone. For my reports it fixes 95% of problems. :)&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;The Code!&lt;/h3&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;#python3 script, put in 'fixLatexQuotes.py'.    &lt;br /&gt;&lt;br /&gt;import sys&lt;br /&gt;import os&lt;br /&gt;import re&lt;br /&gt;&lt;br /&gt;def do(filename_in, filename_out):&lt;br /&gt;&lt;br /&gt;  fh = open(filename_in, 'r')&lt;br /&gt;  fc = fh.read()&lt;br /&gt;  fh.close()&lt;br /&gt;&lt;br /&gt;  dst = ''&lt;br /&gt;  for line in fc.splitlines():&lt;br /&gt;    line_c = re.sub(r" '([ \w-]+)'", " `\\1'", line)&lt;br /&gt;    if line != line_c:&lt;br /&gt;      print("|{}| -&amp;gt; |{}|".format(line, line_c))&lt;br /&gt;    dst = dst + line_c + '\n'&lt;br /&gt;&lt;br /&gt;  if filename_out != '':&lt;br /&gt;    fh = open(filename_out, 'w')&lt;br /&gt;    fh.write(dst)&lt;br /&gt;    fh.close()&lt;br /&gt;  else:&lt;br /&gt;    print('No output file specified, changes discarded.')&lt;br /&gt;&lt;br /&gt;if __name__ == '__main__':&lt;br /&gt;  filename_in = sys.argv[1]&lt;br /&gt;  if len(sys.argv) &amp;gt; 2:&lt;br /&gt;    filename_out = sys.argv[2]&lt;br /&gt;  else:&lt;br /&gt;    filename_out = ''&lt;br /&gt;&lt;br /&gt;  do(filename_in, filename_out)&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;How it Works&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;It is all in the regex:&lt;br /&gt;    line_c = re.sub(r" '([ \w-]+)'", " `\1'", line)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The script only applies it on every line. Feel free to tune it and send the improvements!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5441947463553477837-7566670773514801483?l=davidmalin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidmalin.blogspot.com/feeds/7566670773514801483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5441947463553477837&amp;postID=7566670773514801483' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/7566670773514801483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/7566670773514801483'/><link rel='alternate' type='text/html' href='http://davidmalin.blogspot.com/2010/12/fixing-latex-quotes-with-script.html' title='Fixing Latex Quotes With a Script'/><author><name>David</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5441947463553477837.post-537113653471732942</id><published>2010-07-02T20:03:00.000-04:00</published><updated>2010-07-02T20:03:30.049-04:00</updated><title type='text'>Analyse Which Files Take the Most Space; Linux Version</title><content type='html'>I was curious to learn what takes up space on a Linux distribution, so I decided to run the script&amp;nbsp;mentioned&amp;nbsp;in the previous post. Unlike on Windows, here it is more convenient to run the script from python (I did not bother to compile a binary on Linux).&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://miscdev.googlecode.com/files/get_space_hoggers_report.py"&gt;download the script here&lt;/a&gt;. (The script in the last post did not include a small dependency).&lt;br /&gt;&lt;br /&gt;Here is the result on my distribution:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;Total size: 3132993k&lt;br /&gt;/usr/lib/libpython2.6.so.1                                   : 2340k&lt;br /&gt;/usr/lib/libpython2.6.so.1.0                                 : 2340k&lt;br /&gt;/usr/lib/python2.6/config/libpython2.6.so                    : 2340k&lt;br /&gt;/usr/lib/dri/r128_dri.so                                     : 2342k&lt;br /&gt;/usr/lib/dri/i810_dri.so                                     : 2350k&lt;br /&gt;apt/archives/xserver-xorg-core_2%3a1.7.6-2ubuntu7.2_i386.deb : 2352k&lt;br /&gt;/var/cache/apt/archives/evolution_2.28.3-0ubuntu10_i386.deb  : 2370k&lt;br /&gt;/usr/lib/dri/savage_dri.so                                   : 2386k&lt;br /&gt;/usr/lib/dri/tdfx_dri.so                                     : 2394k&lt;br /&gt;/usr/bin/python3.1                                           : 2407k&lt;br /&gt;/usr/lib/dri/sis_dri.so                                      : 2410k&lt;br /&gt;/usr/lib/dri/mach64_dri.so                                   : 2414k&lt;br /&gt;/usr/lib/openoffice/basis3.2/program/libchartcontrollerli.so : 2420k&lt;br /&gt;/usr/lib/dri/r600_dri.so                                     : 2430k&lt;br /&gt;/usr/lib/dri/mga_dri.so                                      : 2442k&lt;br /&gt;/var/cache/apt/archives/libgtk2.0-0_2.20.1-0ubuntu1_i386.deb : 2455k&lt;br /&gt;/usr/lib/dri/radeon_dri.so                                   : 2455k&lt;br /&gt;/usr/lib/openoffice/basis3.2/program/libscfiltli.so          : 2467k&lt;br /&gt;/usr/lib/dri/r200_dri.so                                     : 2489k&lt;br /&gt;/usr/lib/dri/r300_dri.so                                     : 2491k&lt;br /&gt;/usr/lib/openoffice/basis3.2/program/libfrmli.so             : 2502k&lt;br /&gt;le-content/Ubuntu_Free_Culture_Showcase/UbuntuIsHumanity.ogv : 2503k&lt;br /&gt;/usr/lib/mono/2.0/mscorlib.dll                               : 2508k&lt;br /&gt;/usr/lib/vmware-tools/configurator/XOrg/7.6/vmwgfx_dri.so    : 2522k&lt;br /&gt;/usr/lib/vmware-tools/configurator/XOrg/7.5/vmwgfx_dri.so    : 2535k&lt;br /&gt;/var/lib/aspell/en-common.rws                                : 2589k&lt;br /&gt;/usr/lib/aspell/en-common.rws                                : 2589k&lt;br /&gt;/usr/lib/dri/i915_dri.so                                     : 2610k&lt;br /&gt;/usr/lib/openoffice/basis3.2/program/libfwkli.so             : 2655k&lt;br /&gt;/usr/lib/dri/i965_dri.so                                     : 2701k&lt;br /&gt;/usr/lib/vmware-tools/configurator/XOrg/7.5_64/vmwgfx_dri.so : 2706k&lt;br /&gt;/usr/lib/vmware-tools/configurator/XOrg/7.6_64/vmwgfx_dri.so : 2730k&lt;br /&gt;/var/lib/defoma/gs.d/dirs/fonts/UnDotumBold.ttf              : 2744k&lt;br /&gt;/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType/UnDotumBold.ttf : 2744k&lt;br /&gt;/usr/share/fonts/truetype/unfonts/UnDotumBold.ttf            : 2744k&lt;br /&gt;r/cache/apt/archives/libgl1-mesa-dri_7.7.1-1ubuntu3_i386.deb : 2799k&lt;br /&gt;/usr/lib/openoffice/basis3.2/program/libtkli.so              : 2880k&lt;br /&gt;usr/lib/vmware-tools/lib32/libconf/gtk-2.0/modules/libgail.a : 2894k&lt;br /&gt;/boot/grub/unicode.pf2                                       : 2898k&lt;br /&gt;/usr/share/grub/unicode.pf2                                  : 2898k&lt;br /&gt;/usr/lib/libc.a                                              : 2960k&lt;br /&gt;/var/cache/apt/archives/emacs23_23.1+1-4ubuntu7_i386.deb     : 2966k&lt;br /&gt;/home/david/.dropbox-dist/libwx_gtk2ud_core-2.8.so.0         : 2968k&lt;br /&gt;/usr/lib/xen/libc.a                                          : 3063k&lt;br /&gt;ink/PxpMisc/CodeTests/c++/monitor_memory_allocation/test.ncb : 3147k&lt;br /&gt;cache/apt/archives/evolution-common_2.28.3-0ubuntu10_all.deb : 3157k&lt;br /&gt;us.archive.ubuntu.com_ubuntu_dists_lucid_main_source_Sources : 3169k&lt;br /&gt;/usr/lib/gcc/i486-linux-gnu/4.4/libgcc.a                     : 3183k&lt;br /&gt;/usr/lib/openoffice/basis3.2/program/libsvxli.so             : 3294k&lt;br /&gt;/usr/lib/perl5/auto/Gtk2/Gtk2.so                             : 3323k&lt;br /&gt;/usr/lib/libpython3.1.a                                      : 3361k&lt;br /&gt;/apt/archives/gnome-do-plugins_0.8.2.1+dfsg-2ubuntu1_all.deb : 3371k&lt;br /&gt;/usr/lib/libgtkmm-2.4.so.1.1.0                               : 3389k&lt;br /&gt;/usr/lib/libgtkmm-2.4.so.1                                   : 3389k&lt;br /&gt;/usr/lib/libgucharmap.so.7                                   : 3442k&lt;br /&gt;/usr/lib/libgucharmap.so.7.0.0                               : 3442k&lt;br /&gt;/var/cache/apt/archives/python3.1_3.1.2-0ubuntu2_i386.deb    : 3463k&lt;br /&gt;/usr/share/hplip/data/pcl/colorcal1_450.pcl.gz               : 3506k&lt;br /&gt;ives/openoffice.org-style-human_1%3a3.2.0-7ubuntu4.1_all.deb : 3584k&lt;br /&gt;/var/lib/defoma/gs.d/dirs/fonts/UnBatang.ttf                 : 3592k&lt;br /&gt;var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType/UnBatang.ttf : 3592k&lt;br /&gt;/usr/share/fonts/truetype/unfonts/UnBatang.ttf               : 3592k&lt;br /&gt;/var/cache/apt/archives/humanity-icon-theme_0.5.2.1_all.deb  : 3602k&lt;br /&gt;/usr/lib/libflite_cmu_us_kal16.so.1                          : 3617k&lt;br /&gt;/usr/lib/libflite_cmu_us_kal16.so.1.3                        : 3617k&lt;br /&gt;/usr/lib/xen/libc_pic.a                                      : 3672k&lt;br /&gt;/var/cache/apt/archives/libc6_2.11.1-0ubuntu7.1_i386.deb     : 3690k&lt;br /&gt;/usr/lib/openoffice/basis3.2/program/libcuili.so             : 3886k&lt;br /&gt;/cache/apt/archives/libavcodec52_4%3a0.5.1-1ubuntu1_i386.deb : 3904k&lt;br /&gt;/usr/lib/libgtk-x11-2.0.so.0                                 : 3916k&lt;br /&gt;/usr/lib/libgtk-x11-2.0.so.0.2000.1                          : 3916k&lt;br /&gt;/usr/lib/libflite_cmu_time_awb.so.1                          : 3925k&lt;br /&gt;/usr/lib/libflite_cmu_time_awb.so.1.3                        : 3925k&lt;br /&gt;/vmlinuz.old                                                 : 3935k&lt;br /&gt;/boot/vmlinuz-2.6.32-21-generic                              : 3935k&lt;br /&gt;/boot/vmlinuz-2.6.32-22-generic                              : 3935k&lt;br /&gt;/var/lib/defoma/gs.d/dirs/fonts/UnBatangBold.ttf             : 3977k&lt;br /&gt;lib/defoma/x-ttcidfont-conf.d/dirs/TrueType/UnBatangBold.ttf : 3977k&lt;br /&gt;/usr/share/fonts/truetype/unfonts/UnBatangBold.ttf           : 3977k&lt;br /&gt;/var/lib/mlocate/mlocate.db                                  : 3981k&lt;br /&gt;r/lib/vmware-tools/lib32/libgtkmm-2.4.so.1/libgtkmm-2.4.so.1 : 4057k&lt;br /&gt;ache/apt/archives/gnome-screensaver_2.30.0-0ubuntu2_i386.deb : 4078k&lt;br /&gt;/tmp/VMwareDnD/c3f93485/scripts/sa_utils/dist/library.zip    : 4115k&lt;br /&gt;/usr/lib/openoffice/basis3.2/program/libsvtli.so             : 4124k&lt;br /&gt;/usr/lib/openoffice/basis3.2/program/libsfxli.so             : 4257k&lt;br /&gt;b/vmware-tools/lib32/libgtk-x11-2.0.so.0/libgtk-x11-2.0.so.0 : 4315k&lt;br /&gt;/usr/lib/openoffice/basis3.2/program/libvclli.so             : 4336k&lt;br /&gt;/usr/lib/vmware-tools/icu/icudt38l.dat                       : 4496k&lt;br /&gt;t/archives/openoffice.org-calc_1%3a3.2.0-7ubuntu4.1_i386.deb : 4538k&lt;br /&gt;/usr/lib/openoffice/basis3.2/program/libooxli.so             : 4627k&lt;br /&gt;/usr/lib/openoffice/basis3.2/program/libxoli.so              : 4634k&lt;br /&gt;b/vmware-tools/lib64/libgtk-x11-2.0.so.0/libgtk-x11-2.0.so.0 : 4673k&lt;br /&gt;/usr/lib/libsmbclient.so.0                                   : 4698k&lt;br /&gt;/var/cache/apt/archives/libc6-dev_2.11.1-0ubuntu7.1_i386.deb : 4726k&lt;br /&gt;/var/cache/apt/archives/g++-4.4_4.4.3-4ubuntu5_i386.deb      : 4833k&lt;br /&gt;/usr/lib/openoffice/basis3.2/program/libwriterfilterli.so    : 4839k&lt;br /&gt;/usr/share/fonts/truetype/wqy/wqy-microhei.ttc               : 5056k&lt;br /&gt;/usr/share/icons/hicolor/icon-theme.cache                    : 5181k&lt;br /&gt;r/lib/vmware-tools/lib64/libgtkmm-2.4.so.1/libgtkmm-2.4.so.1 : 5247k&lt;br /&gt;/usr/lib/i686/cmov/libavcodec.so.52                          : 5328k&lt;br /&gt;/usr/lib/i686/cmov/libavcodec.so.52.20.1                     : 5328k&lt;br /&gt;/usr/lib/libavcodec.so.52                                    : 5336k&lt;br /&gt;/usr/lib/libavcodec.so.52.20.1                               : 5336k&lt;br /&gt;/var/lib/openoffice/basis3.2/program/services.rdb            : 5408k&lt;br /&gt;/usr/lib/openoffice/basis3.2/program/services.rdb            : 5408k&lt;br /&gt;/cache/apt/archives/vim-runtime_2%3a7.2.330-1ubuntu3_all.deb : 5572k&lt;br /&gt;/usr/share/openoffice/basis3.2/share/config/images_human.zip : 5827k&lt;br /&gt;/usr/lib/openoffice/basis3.2/program/libsdli.so              : 5946k&lt;br /&gt;/usr/bin/net.samba3                                          : 5949k&lt;br /&gt;archives/openoffice.org-writer_1%3a3.2.0-7ubuntu4.1_i386.deb : 5983k&lt;br /&gt;/etc/alternatives/ttf-japanese-gothic.ttf                    : 6088k&lt;br /&gt;/usr/share/fonts/truetype/ttf-japanese-gothic.ttf            : 6088k&lt;br /&gt;/usr/share/fonts/truetype/takao/TakaoPGothic.ttf             : 6088k&lt;br /&gt;/usr/lib/openoffice/basis3.2/program/offapi.rdb              : 6368k&lt;br /&gt;/usr/share/icons/gnome/icon-theme.cache                      : 7081k&lt;br /&gt;ar/cache/apt/archives/libflite1_1.3-release-2build1_i386.deb : 7103k&lt;br /&gt;aves_via_symlink/PxpMisc/CodeTests/c++/win_os_layer/test.ncb : 7243k&lt;br /&gt;/initrd.img                                                  : 7778k&lt;br /&gt;/boot/initrd.img-2.6.32-22-generic                           : 7778k&lt;br /&gt;/initrd.img.old                                              : 7790k&lt;br /&gt;/boot/initrd.img-2.6.32-21-generic                           : 7790k&lt;br /&gt;/home/david/.dropbox-dist/library.zip                        : 7867k&lt;br /&gt;hive.ubuntu.com_ubuntu_dists_lucid_main_binary-i386_Packages : 8396k&lt;br /&gt;/usr/lib/libgs.so.8                                          : 8487k&lt;br /&gt;/usr/lib/libgs.so.8.71                                       : 8487k&lt;br /&gt;/usr/lib/openoffice/basis3.2/program/libsvxcoreli.so         : 9191k&lt;br /&gt;/var/cache/cups/ppds.dat                                     : 9230k&lt;br /&gt;/usr/lib/openoffice/basis3.2/program/libscli.so              : 9584k&lt;br /&gt;he/apt/archives/linux-headers-2.6.32-22_2.6.32-22.36_all.deb : 9636k&lt;br /&gt;/usr/lib/openoffice/basis3.2/program/libswli.so              : 11390k&lt;br /&gt;/opt/google/chrome/libgcflashplayer.so                       : 11511k&lt;br /&gt;avid/.mozilla/firefox/g9eit4ej.default/urlclassifier3.sqlite : 12472k&lt;br /&gt;/usr/lib/xulrunner-1.9.2.3/libxul.so                         : 13332k&lt;br /&gt;rchive.ubuntu.com_ubuntu_dists_lucid_universe_source_Sources : 13563k&lt;br /&gt;/var/lib/apt-xapian-index/index.1/termlist.DB                : 13648k&lt;br /&gt;/var/cache/apt/srcpkgcache.bin                               : 13956k&lt;br /&gt;/var/cache/apt/pkgcache.bin                                  : 13976k&lt;br /&gt;/usr/lib/firefox-3.6.3/libxul.so                             : 14113k&lt;br /&gt;/usr/lib/libwebkit-1.0.so.2                                  : 14502k&lt;br /&gt;/usr/lib/libwebkit-1.0.so.2.17.2                             : 14502k&lt;br /&gt;/usr/lib/libicudata.so.42.1                                  : 15636k&lt;br /&gt;/usr/lib/libicudata.so.42                                    : 15636k&lt;br /&gt;/archives/openoffice.org-common_1%3a3.2.0-7ubuntu4.1_all.deb : 17854k&lt;br /&gt;ar/cache/apt/archives/emacs23-common_23.1+1-4ubuntu7_all.deb : 20145k&lt;br /&gt;.ubuntu.com_ubuntu_dists_lucid_universe_binary-i386_Packages : 26179k&lt;br /&gt;t/archives/openoffice.org-core_1%3a3.2.0-7ubuntu4.1_i386.deb : 27214k&lt;br /&gt;/var/cache/apt/archives/freepats_20060219-1_all.deb          : 28285k&lt;br /&gt;archives/linux-image-2.6.32-22-generic_2.6.32-22.36_i386.deb : 30204k&lt;br /&gt;pbox/misc_saves_via_symlink/PxpMisc/Backups/cygwin_backup.7z : 30643k&lt;br /&gt;/var/lib/apt-xapian-index/index.1/postlist.DB                : 40624k&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;No so bad considering the biggest file is about 40Mb. But then again I seldom use this Linux machine (my windows machine has much more wear and tear).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5441947463553477837-537113653471732942?l=davidmalin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidmalin.blogspot.com/feeds/537113653471732942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5441947463553477837&amp;postID=537113653471732942' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/537113653471732942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/537113653471732942'/><link rel='alternate' type='text/html' href='http://davidmalin.blogspot.com/2010/07/analyse-which-files-take-most-space_02.html' title='Analyse Which Files Take the Most Space; Linux Version'/><author><name>David</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5441947463553477837.post-5575416375673811170</id><published>2010-07-02T00:15:00.000-04:00</published><updated>2010-07-02T00:15:40.366-04:00</updated><title type='text'>Analyse Which Files Take the Most Space</title><content type='html'>I often need to either clean up space on a drive or to shrink a project / notes for archiving. One way to do it is to navigate blindly and to erase big files when found. But this process can be cumbersome. I wrote a small Python script that lists the 150 biggest files contained under the folder in which the script is executed.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;#python 2.6, 3.1&lt;br /&gt;&lt;br /&gt;import os, tempfile&lt;br /&gt;import misc.search_files&lt;br /&gt;&lt;br /&gt;class FileInfo:&lt;br /&gt;  &lt;br /&gt;  __FullPathFilename = None&lt;br /&gt;  __FileSize = None&lt;br /&gt;  &lt;br /&gt;  def __init__(self, FullPathFilename_, FileSize_):&lt;br /&gt;    self.__FullPathFilename = FullPathFilename_&lt;br /&gt;    self.__FileSize = FileSize_&lt;br /&gt;  &lt;br /&gt;  def __lt__(self, other):&lt;br /&gt;    return (self.__FileSize &amp;lt; other.__FileSize)&lt;br /&gt;  &lt;br /&gt;  def ToRow_NameAndSize(self, SepareAt = 100):&lt;br /&gt;    FullPathStr = self.GetFilename()&lt;br /&gt;    if len(FullPathStr) &amp;gt; SepareAt:&lt;br /&gt;      FullPathStr = FullPathStr[len(FullPathStr)-SepareAt:]&lt;br /&gt;    while len(FullPathStr) &amp;lt; SepareAt:&lt;br /&gt;      FullPathStr+= " "&lt;br /&gt;    return FullPathStr + " : " + str(self.GetFileSize()/1024) + 'k'&lt;br /&gt;&lt;br /&gt;  def GetFilename(self):&lt;br /&gt;    return self.__FullPathFilename&lt;br /&gt;  &lt;br /&gt;  def GetFileSize(self):&lt;br /&gt;    return self.__FileSize&lt;br /&gt;&lt;br /&gt;def GetBiggestFileList(SepareAt = 110, MaxNumFilesInReport = 150):&lt;br /&gt;  lAllFilesListIncludingSubDirs = misc.search_files.getAllFilesRecursively(['*.*'], '.')&lt;br /&gt;  &lt;br /&gt;  TotalDiskSpace = 0&lt;br /&gt;  AllFileInfo = []&lt;br /&gt;  &lt;br /&gt;  for file in lAllFilesListIncludingSubDirs:&lt;br /&gt;    try:&lt;br /&gt;      lFileSize = os.path.getsize(file)&lt;br /&gt;      TotalDiskSpace += lFileSize&lt;br /&gt;      AllFileInfo.append( FileInfo(file, lFileSize) )&lt;br /&gt;    #@tag Give a better output of why the file exception occurred&lt;br /&gt;    #except Exception as inst:&lt;br /&gt;    except Exception:&lt;br /&gt;      print ("Error! " + file)&lt;br /&gt;  &lt;br /&gt;  AllFileInfo.sort()&lt;br /&gt;  &lt;br /&gt;  if( len(AllFileInfo)&amp;gt;MaxNumFilesInReport ):&lt;br /&gt;    subAllFileInfo = AllFileInfo[-MaxNumFilesInReport:]&lt;br /&gt;  else:&lt;br /&gt;    subAllFileInfo = AllFileInfo&lt;br /&gt;  &lt;br /&gt;  Report = ''&lt;br /&gt;  Report+= 'Total size: ' + str(TotalDiskSpace/1024) + "k\n"&lt;br /&gt;  for lFileInfo in subAllFileInfo:&lt;br /&gt;    Report += str(lFileInfo.ToRow_NameAndSize(SepareAt)) + "\n"&lt;br /&gt;  &lt;br /&gt;  return Report&lt;br /&gt;&lt;br /&gt;if __name__ == '__main__':&lt;br /&gt;  print (GetBiggestFileList())&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;For example, here is the result of launching the command in c:\windows to find out which files take the most space in the OS.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;python get_space_hoggers_report.py | tee report.txt&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And here is the result:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Total size: 18528928k&lt;br /&gt;orms\9c6fe9d44d22834993e9aa23cc9dc272\System.Windows.Forms.ni.dll : 12139k&lt;br /&gt;31bf3856ad364e35_6.0.6001.18000_none_c0a3fbb5ef29fe27\Mahjong.dll : 12261k&lt;br /&gt;31bf3856ad364e35_6.0.6002.18005_none_c28f74c1ec4bc973\Mahjong.dll : 12261k&lt;br /&gt;orms\17e020ae92d7fab33bcc1c98b25019d0\System.Windows.Forms.ni.dll : 12701k&lt;br /&gt;Entity\642a7b3d47828fb0070a55cfeb58f42b\System.Data.Entity.ni.dll : 12962k&lt;br /&gt;load\41bec7591f57a2b41248a2c1d4189ab0\Windows6.0-KB944036-x86.cab : 13073k&lt;br /&gt;c:\Windows\Fonts\gulim.ttc                                        : 13207k&lt;br /&gt;6ad364e35_6.0.6000.16386_none_4355a8715fa423d5_gulim.ttc_7c526737 : 13207k&lt;br /&gt;m_31bf3856ad364e35_6.0.6000.16386_none_4355a8715fa423d5\gulim.ttc : 13207k&lt;br /&gt;s\System32\DriverStore\FileRepository\nvdj.inf_d1096b58\nvcpl.dll : 13234k&lt;br /&gt;s\System32\DriverStore\FileRepository\nvdj.inf_e166b159\nvcpl.dll : 13234k&lt;br /&gt;s\System32\DriverStore\FileRepository\nvdj.inf_f4eaea07\nvcpl.dll : 13234k&lt;br /&gt;a_31bf3856ad364e35_6.0.6001.18000_none_03ed68ae2c4994ef\dicjp.bin : 13259k&lt;br /&gt;c:\Windows\System32\xlivefnt.dll                                  : 13322k&lt;br /&gt;c:\Windows\System32\nvcpl.dll                                     : 13363k&lt;br /&gt;c:\Windows\Fonts\simsun.ttc                                       : 13424k&lt;br /&gt;ad364e35_6.0.6000.16386_none_f8d25d0e72c3c090_simsun.ttc_eba56c14 : 13424k&lt;br /&gt;_31bf3856ad364e35_6.0.6000.16386_none_f8d25d0e72c3c090\simsun.ttc : 13424k&lt;br /&gt;d_31bf3856ad364e35_6.0.6000.16386_none_770bd33f8d44346e\ehcir.ird : 13575k&lt;br /&gt;ache$\Managed\00002109030000000000000000F01FEC\12.0.4518\OART.DLL : 13819k&lt;br /&gt;c:\Windows\System32\xlive.dll                                     : 13976k&lt;br /&gt;wo#\b89f584d5b315c16d4e57e747158cb69\PresentationFramework.ni.dll : 13992k&lt;br /&gt;wo#\0832f9155d800cb802e70409447c1128\PresentationFramework.ni.dll : 13993k&lt;br /&gt;0319_32\mscorlib\246f1a5abb686b9dcdf22d3505b08cea\mscorlib.ni.dll : 14078k&lt;br /&gt;c:\Windows\Fonts\msjhbd.ttf                                       : 14169k&lt;br /&gt;ad364e35_6.0.6000.16386_none_5c79d760afbbb312_msjhbd.ttf_176cee86 : 14169k&lt;br /&gt;_31bf3856ad364e35_6.0.6000.16386_none_5c79d760afbbb312\msjhbd.ttf : 14169k&lt;br /&gt;c:\Windows\Logs\CBS\CBS.log                                       : 14280k&lt;br /&gt;e$\Managed\00002109030000000000000000F01FEC\12.0.4518\XL12CNV.EXE : 14330k&lt;br /&gt;_31bf3856ad364e35_6.0.6000.16386_none_0c8ed16bb707d3be\msyhbd.ttf : 14341k&lt;br /&gt;c:\Windows\Fonts\msyhbd.ttf                                       : 14343k&lt;br /&gt;ad364e35_6.0.6002.18005_none_10b10c73b114afde_msyhbd.ttf_16e5cd4d : 14343k&lt;br /&gt;_31bf3856ad364e35_6.0.6002.18005_none_10b10c73b114afde\msyhbd.ttf : 14343k&lt;br /&gt;c:\Windows\Fonts\msjh.ttf                                         : 14368k&lt;br /&gt;56ad364e35_6.0.6000.16386_none_6309f686e329e15f_msjh.ttf_ea675e5c : 14368k&lt;br /&gt;ei_31bf3856ad364e35_6.0.6000.16386_none_6309f686e329e15f\msjh.ttf : 14368k&lt;br /&gt;c:\Windows\Fonts\msyh.ttf                                         : 14691k&lt;br /&gt;ei_31bf3856ad364e35_6.0.6000.16386_none_389c8034332e39c5\msyh.ttf : 14691k&lt;br /&gt;c:\Windows\IME\IMEJP10\DICTS\IMJPST.DIC                           : 14726k&lt;br /&gt;_31bf3856ad364e35_6.0.6000.16386_none_7e4e5681ddf0010b\IMJPST.DIC : 14726k&lt;br /&gt;c:\Windows\Installer\1aac20a.msp                                  : 14834k&lt;br /&gt;c:\Windows\System32\nvoglv32.dll                                  : 14878k&lt;br /&gt;ystem32\DriverStore\FileRepository\nvdj.inf_59384ced\nvoglv32.dll : 14878k&lt;br /&gt;c:\Windows\Fonts\simsunb.ttf                                      : 15045k&lt;br /&gt;d364e35_6.0.6000.16386_none_8ec3c7fa1f04c342_simsunb.ttf_08f71e3f : 15045k&lt;br /&gt;31bf3856ad364e35_6.0.6000.16386_none_8ec3c7fa1f04c342\simsunb.ttf : 15045k&lt;br /&gt;c:\Windows\Installer\24fce6d.msp                                  : 15342k&lt;br /&gt;c:\Windows\IME\IMETC10\DICTS\IMTCS.IMD                            : 15444k&lt;br /&gt;y_31bf3856ad364e35_6.0.6000.16386_none_8c1c51f402c169d0\IMTCS.IMD : 15444k&lt;br /&gt;c:\Windows\System32\imageres.dll                                  : 15450k&lt;br /&gt;364e35_6.0.6000.16386_none_da86e136fafaf563_imageres.dll_44f44625 : 15450k&lt;br /&gt;1bf3856ad364e35_6.0.6000.16386_none_da86e136fafaf563\imageres.dll : 15450k&lt;br /&gt;1FEC\12.0.4518\msmdlocal.dll.5DF9D670_534C_4AB2_B0C6_FF0B0C448C29 : 15489k&lt;br /&gt;93892-1000\65AE474ADBD51814280308A67426AEF7\6.2.7000\Combi.04.psi : 15611k&lt;br /&gt;c:\Windows\Fonts\batang.ttc                                       : 15883k&lt;br /&gt;ad364e35_6.0.6000.16386_none_b5b2ca1d695fce16_batang.ttc_949601ce : 15883k&lt;br /&gt;_31bf3856ad364e35_6.0.6000.16386_none_b5b2ca1d695fce16\batang.ttc : 15883k&lt;br /&gt;ndows\System32\spool\drivers\w32x86\PCC\prnhp001.inf_2ade4966.cab : 16103k&lt;br /&gt;c:\Windows\ehome\ehcir.ird                                        : 16170k&lt;br /&gt;d_31bf3856ad364e35_6.0.6000.16663_none_771e77eb8d36a7fc\ehcir.ird : 16170k&lt;br /&gt;d_31bf3856ad364e35_6.0.6000.20804_none_77e9f66ea622b69e\ehcir.ird : 16170k&lt;br /&gt;d_31bf3856ad364e35_6.0.6001.18043_none_791a56698a4d010b\ehcir.ird : 16170k&lt;br /&gt;d_31bf3856ad364e35_6.0.6001.22147_none_79a7f45ca3670631\ehcir.ird : 16170k&lt;br /&gt;d_31bf3856ad364e35_6.0.6002.18005_none_7b2e0e478751108e\ehcir.ird : 16170k&lt;br /&gt;c:\Windows\Fonts\meiryo.ttc                                       : 16318k&lt;br /&gt;ad364e35_6.0.6002.18130_none_76259f2c44aeed75_meiryo.ttc_ab0401d6 : 16318k&lt;br /&gt;_31bf3856ad364e35_6.0.6000.16945_none_72531e3e4a65a4dd\meiryo.ttc : 16318k&lt;br /&gt;_31bf3856ad364e35_6.0.6000.21148_none_72df94096380c3ee\meiryo.ttc : 16318k&lt;br /&gt;_31bf3856ad364e35_6.0.6001.18349_none_743d5e0c47889b2a\meiryo.ttc : 16318k&lt;br /&gt;_31bf3856ad364e35_6.0.6001.22550_none_74b32a3760b66ffd\meiryo.ttc : 16318k&lt;br /&gt;_31bf3856ad364e35_6.0.6002.18130_none_76259f2c44aeed75\meiryo.ttc : 16318k&lt;br /&gt;_31bf3856ad364e35_6.0.6002.22252_none_769b9cb35ddaf7cf\meiryo.ttc : 16318k&lt;br /&gt;c:\Windows\System32\wbem\Logs\WMITracing.log                      : 16384k&lt;br /&gt;c:\Windows\System32\config\COMPONENTS.SAV                         : 16452k&lt;br /&gt;Cache$\Managed\00002109030000000000000000F01FEC\12.0.4518\MSO.DLL : 16475k&lt;br /&gt;c:\Windows\Fonts\meiryob.ttc                                      : 16757k&lt;br /&gt;d364e35_6.0.6002.18130_none_cf13a97974e4cf1c_meiryob.ttc_d9ebd964 : 16757k&lt;br /&gt;31bf3856ad364e35_6.0.6000.16945_none_cb41288b7a9b8684\meiryob.ttc : 16757k&lt;br /&gt;31bf3856ad364e35_6.0.6000.21148_none_cbcd9e5693b6a595\meiryob.ttc : 16757k&lt;br /&gt;31bf3856ad364e35_6.0.6001.18349_none_cd2b685977be7cd1\meiryob.ttc : 16757k&lt;br /&gt;31bf3856ad364e35_6.0.6001.22550_none_cda1348490ec51a4\meiryob.ttc : 16757k&lt;br /&gt;31bf3856ad364e35_6.0.6002.18130_none_cf13a97974e4cf1c\meiryob.ttc : 16757k&lt;br /&gt;31bf3856ad364e35_6.0.6002.22252_none_cf89a7008e10d976\meiryob.ttc : 16757k&lt;br /&gt;000\65AE474ADBD51814280308A67426AEF7\6.2.7000\Le_Petit_Druide.psi : 16829k&lt;br /&gt;Model\52cbaee4e94489731096be5ecc320958\System.ServiceModel.ni.dll : 16996k&lt;br /&gt;che$\Managed\00002109030000000000000000F01FEC\12.0.4518\WWLIB.DLL : 17073k&lt;br /&gt;wo#\7f91eecda3ff7ce478146b6458580c98\PresentationFramework.ni.dll : 17216k&lt;br /&gt;che$\Managed\00002109030000000000000000F01FEC\12.0.4518\EXCEL.EXE : 17471k&lt;br /&gt;Model\250b525aa8c17327216e102569c0d766\System.ServiceModel.ni.dll : 17499k&lt;br /&gt;c:\Windows\Installer\fe5e2c.msi                                   : 17755k&lt;br /&gt;c:\Windows\System32\WDI\LogFiles\BootCKCL.etl                     : 17792k&lt;br /&gt;c:\Windows\System32\IME\IMETC10\applets\MSHWCHTR.dll              : 19522k&lt;br /&gt;1bf3856ad364e35_6.0.6001.18000_none_fb2914a7fb7f05d4\MSHWCHTR.dll : 19522k&lt;br /&gt;1bf3856ad364e35_6.0.6002.18005_none_fd148db3f8a0d120\MSHWCHTR.dll : 19522k&lt;br /&gt;1bf3856ad364e35_6.0.6001.18000_none_fd48368c658afbaa\mshwchtr.dll : 19522k&lt;br /&gt;ache$\Managed\68AB67CA7DA73301B7449A0300000010\9.3.0\AcroRd32.dll : 19957k&lt;br /&gt;_msige52\program files\Google\Google Earth\client\googleearth.exe : 20428k&lt;br /&gt;c:\Windows\System32\winevt\Logs\Security.evtx                     : 20484k&lt;br /&gt;c:\Windows\System32\winevt\Logs\System.evtx                       : 20484k&lt;br /&gt;c:\Windows\Installer\1aac08e.msp                                  : 20889k&lt;br /&gt;c:\Windows\System32\IME\IMEJP10\APPLETS\mshwjpnr.dll              : 20959k&lt;br /&gt;1bf3856ad364e35_6.0.6000.16386_none_29bd61de3dbf60e5\mshwjpnr.dll : 20959k&lt;br /&gt;1bf3856ad364e35_6.0.6001.18000_none_03ed68ae2c4994ef\mshwjpnr.dll : 20959k&lt;br /&gt;c:\Windows\System32\IME\imekr8\applets\mshwkorr.dll               : 21316k&lt;br /&gt;1bf3856ad364e35_6.0.6000.16386_none_4e1eb5b4af3fbd40\mshwkorr.dll : 21316k&lt;br /&gt;1bf3856ad364e35_6.0.6001.18000_none_03ed2a082c4a1514\mshwkorr.dll : 21316k&lt;br /&gt;1bf3856ad364e35_6.0.6001.18000_none_fd484d54658ae209\mshwchsr.dll : 21448k&lt;br /&gt;c:\Windows\System32\wbem\repository\OBJECTS.DATA                  : 22528k&lt;br /&gt;c:\Windows\Fonts\ARIALUNI.TTF                                     : 22730k&lt;br /&gt;c:\Windows\Speech\Engines\SR\en-US\t1033.ngr                      : 22858k&lt;br /&gt;_31bf3856ad364e35_6.0.6000.16386_en-us_cbfb04a3abf30016\t1033.ngr : 22858k&lt;br /&gt;e52\program files\Google\Google Earth\plugin\googleearth_free.dll : 22880k&lt;br /&gt;naged\00002109F10090400000000000F01FEC\12.0.4518\NLSDATA.DLL_1033 : 23818k&lt;br /&gt;0002109030000000000000000F01FEC\12.0.4518\INSTALLED_RESOURCES.XSS : 24288k&lt;br /&gt;c:\Windows\inf\setupapi.dev.log                                   : 24433k&lt;br /&gt;c:\Windows\System32\config\RegBack\SYSTEM.OLD                     : 25552k&lt;br /&gt;c:\Windows\Fonts\mingliu.ttc                                      : 26851k&lt;br /&gt;31bf3856ad364e35_6.0.6000.16386_none_b8e3a7d58b1249ca\mingliu.ttc : 26851k&lt;br /&gt;c:\Windows\Speech\Engines\SR\en-US\l1033.ngr                      : 27833k&lt;br /&gt;_31bf3856ad364e35_6.0.6000.16386_en-us_cbfb04a3abf30016\l1033.ngr : 27833k&lt;br /&gt;3856ad364e35_6.0.6001.18000_none_062b7e7afe71e492\PurblePlace.dll : 27994k&lt;br /&gt;3856ad364e35_6.0.6002.18005_none_0816f786fb93afde\PurblePlace.dll : 27994k&lt;br /&gt;s_31bf3856ad364e35_6.0.6001.18000_none_74d4a1cd7e673a2e\Chess.dll : 28321k&lt;br /&gt;s_31bf3856ad364e35_6.0.6002.18005_none_76c01ad97b89057a\Chess.dll : 28321k&lt;br /&gt;1bf3856ad364e35_6.0.6000.16386_none_0d44c2d7a6e22754\M1033DSK.CSD : 29099k&lt;br /&gt;c:\Windows\System32\config\RegBack\COMPONENTS.OLD                 : 31148k&lt;br /&gt;c:\Windows\System32\mrt.exe                                       : 31710k&lt;br /&gt;c:\Windows\Fonts\mingliub.ttc                                     : 32999k&lt;br /&gt;364e35_6.0.6000.16386_none_c6eae5a23b4a0d1e_mingliub.ttc_b8743970 : 32999k&lt;br /&gt;1bf3856ad364e35_6.0.6000.16386_none_c6eae5a23b4a0d1e\mingliub.ttc : 32999k&lt;br /&gt;32\DriverStore\FileRepository\nvdj.inf_05fd020f\NvCplSetupInt.exe : 37308k&lt;br /&gt;93892-1000\65AE474ADBD51814280308A67426AEF7\6.2.7000\Combi.01.psi : 38261k&lt;br /&gt;32\DriverStore\FileRepository\nvdj.inf_59384ced\NvCplSetupInt.exe : 39343k&lt;br /&gt;c:\Windows\ehome\en-US\Intro.wmv                                  : 45166k&lt;br /&gt;_31bf3856ad364e35_6.0.6000.16386_en-us_35933539ffce9bad\Intro.wmv : 45166k&lt;br /&gt;c:\Windows\System32\config\RegBack\SOFTWARE.OLD                   : 45532k&lt;br /&gt;5_6.0.6000.16386_none_3264f7ee9b82c6e1\Jewels of Caribbean.dvr-ms : 45830k&lt;br /&gt;856ad364e35_6.0.6000.16386_none_3264f7ee9b82c6e1\Apollo 13.dvr-ms : 48902k&lt;br /&gt;c:\Windows\Installer\4dac3f.msp                                   : 49713k&lt;br /&gt;f3856ad364e35_6.0.6000.16386_none_3264f7ee9b82c6e1\Vertigo.dvr-ms : 51846k&lt;br /&gt;c:\Windows\Speech\Engines\SR\en-GB\l2057.ngr                      : 55999k&lt;br /&gt;_31bf3856ad364e35_6.0.6000.16386_en-gb_857893b11436ae5f\l2057.ngr : 55999k&lt;br /&gt;c:\Windows\IME\IMESC5\DICTS\PINTLGT.IMD                           : 65408k&lt;br /&gt;31bf3856ad364e35_6.0.6000.16386_none_b4aaff4041e28397\PINTLGT.IMD : 65408k&lt;br /&gt;c:\Windows\Logs\CBS\CBS.persist.log                               : 68341k&lt;br /&gt;c:\Windows\SoftwareDistribution\DataStore\DataStore.edb           : 77832k&lt;br /&gt;c:\Windows\Installer\13ea212.msp                                  : 99335k&lt;br /&gt;crosoft.NET\Framework\v4.0.30319\SetupCache\Client\netfx_core.mzz : 113164k&lt;br /&gt;c:\Windows\winsxs\ManifestCache\6.0.6002.18005_001c11ba_blobs.bin : 188770k&lt;br /&gt;c:\Windows\Installer\1aac1e6.msp                                  : 335018k&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You can see that by clearing the last two files (which seem to just be cache files that were not deleted for whatever reason) one would free ~500Mb.&lt;br /&gt;&lt;br /&gt;I bundled &lt;a href="http://code.google.com/p/miscdev/downloads/detail?name=get_space_hoggers_win32_bin.zip&amp;amp;can=2&amp;amp;q="&gt;the Python script compiled as a win32 binary&lt;/a&gt;. It is for my own personal need when I am on a (windows) computer in a lab which does not have Python installed and I need to hunt down a few big files.&lt;br /&gt;&lt;br /&gt;On a side note&amp;nbsp;&lt;a href="http://www.py2exe.org/"&gt;http://www.py2exe.org&lt;/a&gt;&amp;nbsp;is an amazing tool that works quite well. It takes about 5 min to download / install / compile your script into a standalone windows application. For your reference here is the small script that uses py2exe:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;#Launch with: python26 make_bin.py py2exeb&lt;br /&gt;from distutils.core import setup&lt;br /&gt;import py2exe&lt;br /&gt;&lt;br /&gt;setup(&lt;br /&gt;    console=['get_space_hoggers_report.py'],&lt;br /&gt;    options={"py2exe":{"bundle_files":1}}    &lt;br /&gt;    )&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Happy hunting!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5441947463553477837-5575416375673811170?l=davidmalin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidmalin.blogspot.com/feeds/5575416375673811170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5441947463553477837&amp;postID=5575416375673811170' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/5575416375673811170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/5575416375673811170'/><link rel='alternate' type='text/html' href='http://davidmalin.blogspot.com/2010/07/analyse-which-files-take-most-space.html' title='Analyse Which Files Take the Most Space'/><author><name>David</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5441947463553477837.post-1123711027456999581</id><published>2010-07-01T00:25:00.000-04:00</published><updated>2010-07-01T00:25:42.799-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>Torrent Files: Begone! (And Be Recoverable!)</title><content type='html'>Whenever I download a torrent file, the file ends-up in my web browser's download directory. Then I invariably click on the .torrent file to start the download. Since I usually download a few .torrent files a day, my download directory becomes cluttered with files I do not really want. But I do not want to delete the files since I might want to forward them to someone else later or download the rest of a partially downloaded torrent at a later time.&lt;br /&gt;&lt;br /&gt;As with any difficulty in live, it can be solved by a small Python script. The best way I found to handle the files is to just move the files in a subdirectory. So I just "double-click" the script whenever I think too many .torrent files are lying around.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;import os&lt;br /&gt;import fnmatch&lt;br /&gt;&lt;br /&gt;def main():&lt;br /&gt;  try:&lt;br /&gt;    _clear_torrent_files()&lt;br /&gt;  except BaseException as e:&lt;br /&gt;    print(e)&lt;br /&gt;  input("Press a key to exit")&lt;br /&gt;&lt;br /&gt;def _clear_torrent_files():&lt;br /&gt;  files = os.listdir('./')&lt;br /&gt;&lt;br /&gt;  files_move = []&lt;br /&gt;  for file in files:&lt;br /&gt;    if fnmatch.fnmatch(file, '*.torrent'):&lt;br /&gt;      files_move.append(file)&lt;br /&gt;  &lt;br /&gt;  x=0&lt;br /&gt;  for file in files_move:&lt;br /&gt;    x +=1&lt;br /&gt;    folder_dest = './TorrRep/__Cleared/'&lt;br /&gt;    _createDirIfNotExist(folder_dest)&lt;br /&gt;    file_dest = folder_dest + file&lt;br /&gt;    str = '[{2}] - Moving {0} to {1}'.format(file, file_dest, x)&lt;br /&gt;    if len(str) &gt; 70:&lt;br /&gt;      str = str[0:69]&lt;br /&gt;    print (str)&lt;br /&gt;    os.rename(file, file_dest)&lt;br /&gt;&lt;br /&gt;def _createDirIfNotExist(in_dir):&lt;br /&gt;  if not os.path.exists(in_dir):&lt;br /&gt;    os.makedirs(in_dir)&lt;br /&gt;&lt;br /&gt;if __name__ == '__main__':&lt;br /&gt;  main()&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Then the files are 'gone', but recoverable!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5441947463553477837-1123711027456999581?l=davidmalin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidmalin.blogspot.com/feeds/1123711027456999581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5441947463553477837&amp;postID=1123711027456999581' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/1123711027456999581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/1123711027456999581'/><link rel='alternate' type='text/html' href='http://davidmalin.blogspot.com/2010/07/torrent-files-begone-and-be-recoverable.html' title='Torrent Files: Begone! (And Be Recoverable!)'/><author><name>David</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5441947463553477837.post-8215707285429721061</id><published>2010-06-27T19:43:00.003-04:00</published><updated>2010-07-01T00:45:29.350-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>Securely Erase the Content of A Drive... The Easy Way!</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman';"&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;Do you sometimes have somewhat sensitive data that has been deleted on a drive but you would feel better if it were unrecoverable? And you don't want to wipe-out the whole drive (keep the data that is already in). Such a situation occurs a lot when changing PC at work. You know the next guy will likely be a computer expert; if that person &lt;a href="http://en.wikipedia.org/wiki/Alignment_(Dungeons_%26_Dragons)#Lawful_Evil"&gt;has a penchant for evil&lt;/a&gt;, you definitely do not what that person to have access to the data that used to be on that computer.&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman';"&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman';"&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;Leave this script running overnight and you can be (kind of) confident nothing will be recoverable.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;#python 3&lt;br /&gt;&lt;br /&gt;import random&lt;br /&gt;import os&lt;br /&gt;&lt;br /&gt;def _getRandStr(rand_str_len):&lt;br /&gt;  lib = "abcdefghjiklmnopqrstuvwxyz123456789"&lt;br /&gt;  &lt;br /&gt;  randomStr = []&lt;br /&gt;  &lt;br /&gt;  while len(randomStr) &lt; rand_str_len:&lt;br /&gt;    randomStr += lib[ random.randint(0,len(lib)-1) ]&lt;br /&gt;  &lt;br /&gt;  assert len(randomStr) == rand_str_len&lt;br /&gt;  return "".join(randomStr)&lt;br /&gt;&lt;br /&gt;def writeToHDUntilException():&lt;br /&gt;  randomfolder = None&lt;br /&gt;  nfilesInFolder = 0&lt;br /&gt;  while True:&lt;br /&gt;    if randomfolder is None or nfilesInFolder &gt; 9:&lt;br /&gt;      randomfolder = _getRandStr(16)&lt;br /&gt;      if not os.path.isdir(randomfolder):&lt;br /&gt;        os.mkdir(randomfolder)&lt;br /&gt;      nfilesInFolder = 0&lt;br /&gt;    fh = open( randomfolder + '/' + _getRandStr(32) + '.jpg', 'wb' )&lt;br /&gt;    fh.write( _getRandStr(128).encode()*1024*8 )&lt;br /&gt;    fh.close()&lt;br /&gt;    nfilesInFolder += 1&lt;br /&gt;&lt;br /&gt;if __name__ == '__main__':&lt;br /&gt;  writeToHDUntilException()&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;If you leave that script running for long enough then you will eventually have overwritten all the free nodes of the HD. Delete the files created and the content that was there beforehand will be unrecoverable. Quite handy for USB keys.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5441947463553477837-8215707285429721061?l=davidmalin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidmalin.blogspot.com/feeds/8215707285429721061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5441947463553477837&amp;postID=8215707285429721061' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/8215707285429721061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/8215707285429721061'/><link rel='alternate' type='text/html' href='http://davidmalin.blogspot.com/2010/06/securely-erase-content-of-drive-easy.html' title='Securely Erase the Content of A Drive... The Easy Way!'/><author><name>David</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5441947463553477837.post-8591621159140477347</id><published>2010-06-19T23:55:00.010-04:00</published><updated>2010-06-20T11:32:45.644-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='encryption'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>da_crypt.py: The smallest encryption library you will ever find!</title><content type='html'>Here is a small library that I wrote just for fun. If you provide a key that is the same length as the file/bytes to be encrypted, this algorithm is unbreakable (see &lt;a href="http://en.wikipedia.org/wiki/XOR_cipher"&gt;XOR_cipher&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/One_time_pad"&gt;One Time Pad&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;#!/usr/bin/python3.0&lt;br /&gt;&lt;br /&gt;class Key:&lt;br /&gt;&lt;br /&gt; def __init__(self, bytesKey):&lt;br /&gt;   self.__key = bytesKey&lt;br /&gt;&lt;br /&gt; def getAt(self, x):&lt;br /&gt;   x = x % len(self.__key)&lt;br /&gt;   return self.__key[x]&lt;br /&gt;&lt;br /&gt;class Crypt_Xor:&lt;br /&gt;&lt;br /&gt; def __init__(self, key):&lt;br /&gt;   self.__key = key&lt;br /&gt;&lt;br /&gt; def encrypt(self, bytesToCrypt):&lt;br /&gt;   bytesCrypt = bytearray(len(bytesToCrypt))&lt;br /&gt;   x = 0&lt;br /&gt;   for byte in bytesToCrypt:&lt;br /&gt;     key_node = self.__key.getAt(x)&lt;br /&gt;     bytesCrypt[x] = byte ^ key_node&lt;br /&gt;     x += 1   &lt;br /&gt;   return bytesCrypt&lt;br /&gt;  &lt;br /&gt; def decrypt(self, bytesToDecrypt):&lt;br /&gt;   bytesDeCrypt = bytearray(len(bytesToDecrypt))&lt;br /&gt;   x = 0&lt;br /&gt;   lstDecrypted = []&lt;br /&gt;   for char in bytesToDecrypt:&lt;br /&gt;     key_node = self.__key.getAt(x)&lt;br /&gt;     bytesDeCrypt[x] = bytesToDecrypt[x] ^ key_node&lt;br /&gt;     x += 1&lt;br /&gt;  &lt;br /&gt;   return bytesDeCrypt&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The amazing thing is that it can be fully implemented with very little code (31 lines in this case).&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;I got the idea reading the excellent book '&lt;a href="http://books.google.com/books?id=Pd-z64SJRBAC&amp;amp;lpg=PP1&amp;amp;dq=Computer%20Networks%20by%20Andrew%20S.Tanenbaum&amp;amp;pg=PP1#v=onepage&amp;amp;q&amp;amp;f=false"&gt;Computer Networks by Andrew S.Tanenbaum&lt;/a&gt; -- 8.1.4'.&lt;br /&gt;&lt;br /&gt;Here is a small test function:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;def _test_crypt_object( crypt ):&lt;br /&gt; data_orig = b'I am a simple string to be encrypted.'&lt;br /&gt; print( 'data_orig: %s' % data_orig )&lt;br /&gt;&lt;br /&gt; testKey = b'My secret key... \x123\x456\x798' &lt;br /&gt;&lt;br /&gt; crypt = crypt( Key(testKey) )&lt;br /&gt; data_encoded = crypt.encrypt(data_orig)&lt;br /&gt; print( 'data_encoded: %s' % data_encoded )&lt;br /&gt; data_decoded = crypt.decrypt(data_encoded)&lt;br /&gt; print( 'data_decoded: %s' % data_decoded )&lt;br /&gt;&lt;br /&gt; assert data_decoded == data_orig&lt;br /&gt;&lt;br /&gt;def test_module():&lt;br /&gt; print( 'da_crypt test start' )&lt;br /&gt; _test_crypt_object(Crypt_Xor)&lt;br /&gt; print( 'da_crypt test end' )&lt;br /&gt;&lt;br /&gt;if __name__ == '__main__':&lt;br /&gt; test_module()&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You can check the updated code at:&lt;br /&gt;&lt;a href="http://code.google.com/p/miscdev/source/browse/da_crypt/"&gt;http://code.google.com/p/miscdev/source/browse/da_crypt/&lt;/a&gt;&lt;br /&gt;It also contains a small extension that allows file encryption.&lt;br /&gt;&lt;br /&gt;Be careful though: the implementation uses a circular key (for simplicity's sake). If you use a key that is not random or a key that is less than the size of the data to be encrypted then it becomes relatively easy to crack.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5441947463553477837-8591621159140477347?l=davidmalin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidmalin.blogspot.com/feeds/8591621159140477347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5441947463553477837&amp;postID=8591621159140477347' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/8591621159140477347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/8591621159140477347'/><link rel='alternate' type='text/html' href='http://davidmalin.blogspot.com/2010/06/dacryptpy-smallest-encryption-library.html' title='da_crypt.py: The smallest encryption library you will ever find!'/><author><name>David</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5441947463553477837.post-7170661940261335524</id><published>2009-06-01T12:26:00.004-04:00</published><updated>2010-06-20T11:33:28.312-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='picasa'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>Picasa - Delete Annoying ".picasaoriginals" Space Consuming Folders</title><content type='html'>&lt;div&gt;Did you ever notice that &lt;a href="http://picasa.google.com/"&gt;Picasa&lt;/a&gt; creates a backup of any picture that has been modified? I could never find an option to suppress that behavior. I mean, I know what I am doing; I do not want to have extra copies of my pictures laying around and taking up all my disk space.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So I built a small applicaiton that lists the ".picasaoriginals" folders location under the folder where the Python script is run from. It lists the content of the ".picasaoriginals" and prompts the user for deletion. &lt;a href="http://docs.google.com/View?id=advtnkffrbr5_133gb9gtzj7"&gt;You can view the code here&lt;/a&gt;. It is only a few dozens lines long so just copy/paste to a .py file if you want to use it. It is written in a Python 3.0.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is an example of the command-prompt interation with the program.&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;python DelPicasaOriginalBackups.py&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Folder:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;C:\pics\09-01-03 - Montreal\.picasaoriginals&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Content:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;   {IMG_7432.jpg,IMG_7433.jpg,IMG_7434.jpg}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Do you want to delete the following folder and everything in sub-dirs?&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;   C:\pics\09-01-03 - Montreal\.picasaoriginals&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;N/Y?&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Hope it is useful. Feel free to post any comment/suggestion.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5441947463553477837-7170661940261335524?l=davidmalin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidmalin.blogspot.com/feeds/7170661940261335524/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5441947463553477837&amp;postID=7170661940261335524' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/7170661940261335524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/7170661940261335524'/><link rel='alternate' type='text/html' href='http://davidmalin.blogspot.com/2009/06/picasa-delete-annoying-picasaoriginals.html' title='Picasa - Delete Annoying &quot;.picasaoriginals&quot; Space Consuming Folders'/><author><name>David</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5441947463553477837.post-240990751795634739</id><published>2007-09-02T14:22:00.001-04:00</published><updated>2011-01-01T16:13:50.093-05:00</updated><title type='text'>pyWeightWatch: Monitor your Weight Efficiently</title><content type='html'>&lt;h1&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;pyWeightWatch&lt;/span&gt;: Monitor your Weight Efficiently&lt;/h1&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;Note:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://david-web.appspot.com/cnt/WeightWatch/"&gt;project page has moved&lt;/a&gt;:&amp;nbsp;&lt;a href="http://david-web.appspot.com/cnt/WeightWatch/"&gt;http://david-web.appspot.com/cnt/WeightWatch/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Consider the information on this page deprecated.&lt;br /&gt;&lt;h2&gt;Installation:&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Just unpack the .&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;exe&lt;/span&gt; in a directory, then run &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;pyWeight&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;exe&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;The program is going to ask you how much you weight now. Jump on a scale and enter your weight.&lt;br /&gt;&lt;br /&gt;The program will automatically generate a graph of your weight over time.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is what the program generates for me:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_jvL3f7BHJKY/Rtr_-tS1hWI/AAAAAAAABDY/cXgOv4YQ1GM/s1600-h/ScreenShot_v1p0.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5105674580353451362" src="http://4.bp.blogspot.com/_jvL3f7BHJKY/Rtr_-tS1hWI/AAAAAAAABDY/cXgOv4YQ1GM/s320/ScreenShot_v1p0.png" style="cursor: pointer; display: block; margin: 0px auto 10px; text-align: center;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h2&gt;Usage:&lt;br /&gt;&lt;/h2&gt;&lt;pre&gt;Enter today's weight and see the graph/save to .&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;png&lt;/span&gt;:&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;pyWeight&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;exe&lt;/span&gt;&lt;br /&gt;Just update the .&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;png&lt;/span&gt; file with the data contained in Weight.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;xml&lt;/span&gt;:&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;pyWeight&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;exe&lt;/span&gt; -u&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;pyWeight&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;exe&lt;/span&gt; --update&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;h2&gt;Download:&lt;br /&gt;&lt;/h2&gt;&lt;a href="http://davidmalinstuff.googlepages.com/pyWeight_1p0.exe"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;pyWeightWatch&lt;/span&gt; v1.0 &lt;/a&gt;(&lt;a href="http://commonrepository.googlecode.com/svn/trunk/pyWeightWatch/"&gt;source here&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Future features:&lt;br /&gt;&lt;/h2&gt;-Interpolation and prediction&lt;br /&gt;-Better labelling&lt;br /&gt;-XML indexed by date and weight, should extract all &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;weightelement&lt;/span&gt; and then extract the weight and date.&lt;br /&gt;-Leave some space in graph (not just the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;extremum&lt;/span&gt; of the data)&lt;br /&gt;-Build Weight.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;xml&lt;/span&gt; if not present/valid&lt;br /&gt;&lt;br /&gt;&lt;timestamp&gt;[Generated at: 2007_09_02_14h21m16s]&lt;/timestamp&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5441947463553477837-240990751795634739?l=davidmalin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidmalin.blogspot.com/feeds/240990751795634739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5441947463553477837&amp;postID=240990751795634739' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/240990751795634739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/240990751795634739'/><link rel='alternate' type='text/html' href='http://davidmalin.blogspot.com/2007/09/pyweightwatch-monitor-your-weight.html' title='pyWeightWatch: Monitor your Weight Efficiently'/><author><name>David</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_jvL3f7BHJKY/Rtr_-tS1hWI/AAAAAAAABDY/cXgOv4YQ1GM/s72-c/ScreenShot_v1p0.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5441947463553477837.post-2658147413579024820</id><published>2007-08-30T07:41:00.000-04:00</published><updated>2007-08-30T07:43:58.148-04:00</updated><title type='text'>ScreenSpy: New Release V1.1</title><content type='html'>&lt;h1&gt;ScreenSpy: New Release V1.1&lt;br /&gt;&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can download it here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://davidmalinstuff.googlepages.com/JScreenSpy_v1p1.zip"&gt;ScreenSpy v1.1 (Win, Unix, MacOS) -- Includes source code.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://davidmalinstuff.googlepages.com/ScreenSpy_v1p0.zip"&gt;ScreenSpy v1.0 (Win, Unix, MacOS) -- Includes source code.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Usage:&lt;br /&gt;&lt;br /&gt;   java -jar ScreenSpy.jar ftp.domain.com username password 1000&lt;br /&gt;&lt;br /&gt;   or, for the win32 .exe:&lt;br /&gt;&lt;br /&gt;   Screenspy.exe ftp.domain.com username password 1000&lt;br /&gt;  &lt;br /&gt;   This would start sending the screenshots to "ftp.domain.com" once every second.&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Changes:&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;V 1.1:&lt;br /&gt;&lt;br /&gt; -Smarter naming of pictures (for example: Thu_Aug_30_06-57-19_.jpg)&lt;br /&gt;&lt;br /&gt; -Always delete the file on exit. X&lt;br /&gt;&lt;br /&gt; -Option to select the amount of time in between screenshots.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;V 1.0:&lt;br /&gt;&lt;br /&gt; -Initial release&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;It will run on all major platforms give you have a java virtual machine installed (www.java.com). I also included a win32 binary.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Have fun!&lt;br /&gt;&lt;br /&gt;&lt;timestamp&gt;[Generated at: 2007_08_30_07h41m06s]&lt;/timestamp&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5441947463553477837-2658147413579024820?l=davidmalin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidmalin.blogspot.com/feeds/2658147413579024820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5441947463553477837&amp;postID=2658147413579024820' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/2658147413579024820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/2658147413579024820'/><link rel='alternate' type='text/html' href='http://davidmalin.blogspot.com/2007/08/screenspy-new-release-v11.html' title='ScreenSpy: New Release V1.1'/><author><name>David</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5441947463553477837.post-41598774257365972</id><published>2007-08-20T12:35:00.001-04:00</published><updated>2008-11-18T19:56:35.834-05:00</updated><title type='text'>Draw simple graphs with DOT</title><content type='html'>A quick and painless way to generate directed and undirected graphs under windows / Linux.&lt;br /&gt;The DOT language is useful because it can be easily generated by a script and hence  can be used to automatically generate documentation.&lt;br /&gt;It is also useful to quickly draw a professional looking graph without having to use a graphical interface.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Example:&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Here is a simple graph:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_jvL3f7BHJKY/RsnEO9S1gPI/AAAAAAAAA30/tUXCtQEequw/s1600-h/Graph.dot.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_jvL3f7BHJKY/RsnEO9S1gPI/AAAAAAAAA30/tUXCtQEequw/s400/Graph.dot.png" alt="" id="BLOGGER_PHOTO_ID_5100823814224576754" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Do you get it? Visit my blog often and you will never need time or ideas again to solve your problems!&lt;br /&gt;&lt;br /&gt;Here is the .dot script that generated the graph.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Source Code: [File=Graph.dot]&lt;/h2&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;digraph G&lt;br /&gt;{&lt;br /&gt;Computer -&gt; David;&lt;br /&gt;Problem -&gt; David;&lt;br /&gt;Time -&gt; David;&lt;br /&gt;Idea -&gt; David;&lt;br /&gt;&lt;br /&gt;{rank=same; Problem; Idea; David; Computer; Time;}&lt;br /&gt;&lt;br /&gt;David -&gt; Blog;&lt;br /&gt;Problem -&gt; You;&lt;br /&gt;Blog -&gt; You [dir=both, color=lawngreen, style = bold];&lt;br /&gt;You -&gt; Solve;&lt;br /&gt;&lt;br /&gt;You [shape=box]&lt;br /&gt;Problem [shape=&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;tripleoctagon&lt;/span&gt;, color = red, style=filled, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;fillcolor&lt;/span&gt;=yellow]&lt;br /&gt;David [label = "David &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Malin&lt;/span&gt;", shape=box]&lt;br /&gt;Blog [label = "davidmaling.blogspot.com", shape=diamond, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;fontsize&lt;/span&gt;=15, color=&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;steelblue&lt;/span&gt;3]&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The following command will compile the .dot file into a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;png&lt;/span&gt; image:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;dot -&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;Tpng&lt;/span&gt; -O Graph.dot&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Neat no? The program (dot) can be obtained here:&lt;br /&gt;&lt;a href="http://graphviz.org/"&gt;http://graphviz.org/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can read the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;wikipedia&lt;/span&gt; entry about dot:&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/DOT_language"&gt;http://en.wikipedia.org/wiki/DOT_language&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;... or download a more complete documentation here:&lt;br /&gt;&lt;a href="http://graphviz.org/Documentation/dotguide.pdf"&gt;http://graphviz.org/Documentation/dotguide.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Graph on!&lt;br /&gt;&lt;br /&gt;P.S: Send me your home-made graph and I will post it on the blog. :)&lt;br /&gt;&lt;br /&gt;&lt;timestamp&gt;[Generated at: 2007_08_21_01h34m18s]&lt;/timestamp&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5441947463553477837-41598774257365972?l=davidmalin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidmalin.blogspot.com/feeds/41598774257365972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5441947463553477837&amp;postID=41598774257365972' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/41598774257365972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/41598774257365972'/><link rel='alternate' type='text/html' href='http://davidmalin.blogspot.com/2007/08/draw-simple-graphs-with-dot.html' title='Draw simple graphs with DOT'/><author><name>David</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_jvL3f7BHJKY/RsnEO9S1gPI/AAAAAAAAA30/tUXCtQEequw/s72-c/Graph.dot.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5441947463553477837.post-9032779136846879697</id><published>2007-08-16T04:45:00.001-04:00</published><updated>2007-08-16T09:49:49.456-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='JPython'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>pyScreenSpy, a Python implementation using Java libraries &amp; JPython</title><content type='html'>I love Python, I dislike Java. But Java is maintained by a large corporation and has some tools that Python does not. It is possible to write a program in Python, using Python's core library &lt;span style="font-weight: bold;"&gt;and &lt;/span&gt;Java's library in the same program and compile it in a Java &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;bytecode&lt;/span&gt;&lt;/span&gt; executable. All you need is to download and setup &lt;a href="http://www.jython.org/Project/index.html"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;JPython&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;. Here are the implications of &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;developing&lt;/span&gt; a program using &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;JPython&lt;/span&gt;&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Advantages:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Use both Java's and Python's libraries seamlessly in the same program.&lt;/li&gt;&lt;li&gt;Will work on all platforms that Java works.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Disadvantages:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Java's virtual machine is long to load (~3sec compared to Python's ~0.1 sec)&lt;/li&gt;&lt;li&gt;Some &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;functionalities&lt;/span&gt; of Java and of Python are not &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;available&lt;/span&gt; in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;JYthon&lt;/span&gt;, and the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_6"&gt;documentation&lt;/span&gt; about that is not very good.&lt;/li&gt;&lt;/ul&gt;As an example, I re-coded parts of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;JScreenSpy&lt;/span&gt; application that I published a few days ago using &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;JPython&lt;/span&gt; in 21 lines. This is just an example, I will re-release a fully working and ameliorated version (1.1) of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;JScreenSpy&lt;/span&gt; in Python in the following days.&lt;br /&gt;&lt;br /&gt;Here is the source file, you can execute it using &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;jpython&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;pyScreenSpy&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;py&lt;/span&gt;&lt;br /&gt;&lt;blockquote style="font-family: courier new;"&gt;#Pythons imports&lt;br /&gt;import &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;os&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;#Java Imports&lt;br /&gt;from &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;javax&lt;/span&gt; import &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;imageio&lt;/span&gt;&lt;br /&gt;from java import &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;awt&lt;/span&gt;&lt;br /&gt;from java.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;awt&lt;/span&gt; import image&lt;br /&gt;from java import &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;io&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;#Determine current screen size&lt;br /&gt;toolkit = awt.Toolkit.getDefaultToolkit();&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;screenSize&lt;/span&gt; = toolkit.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;getScreenSize&lt;/span&gt;();&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;screenRect&lt;/span&gt; = &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;awt&lt;/span&gt;.Rectangle(&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;screenSize&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;#Create screenshot&lt;br /&gt;robot = &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;awt&lt;/span&gt;.Robot();&lt;br /&gt;&lt;br /&gt;#Take &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;ScreenShot&lt;/span&gt;&lt;br /&gt;image = robot.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;createScreenCapture&lt;/span&gt;(&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;screenRect&lt;/span&gt;);&lt;br /&gt;imageio.ImageIO.write(image, "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;jpg&lt;/span&gt;", &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;io&lt;/span&gt;.File("test.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_30"&gt;jpg&lt;/span&gt;") );&lt;/blockquote&gt;21 lines, in Python, using Java's libraries. How cool is that? Very!&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5441947463553477837-9032779136846879697?l=davidmalin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidmalin.blogspot.com/feeds/9032779136846879697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5441947463553477837&amp;postID=9032779136846879697' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/9032779136846879697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/9032779136846879697'/><link rel='alternate' type='text/html' href='http://davidmalin.blogspot.com/2007/08/pyscreenspy-python-implementation-using.html' title='pyScreenSpy, a Python implementation using Java libraries &amp; JPython'/><author><name>David</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5441947463553477837.post-3782339113605828422</id><published>2007-08-16T03:22:00.000-04:00</published><updated>2007-08-16T09:44:24.896-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='technical'/><title type='text'>Easily Encode your Videos / DVDs with MPlayer/Mencoder</title><content type='html'>This entry will show you how to easily encode videos with MPlayer / Mencoder. MPlayer is a good, free, open-source, cross platform player / encoder that can make a local copy of your DVDs and transcode your videos to a format your embedded player (iPod, Cowon D2, ...) can read.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Video Codecs:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;First, I have to talk a little bit about video codecs. In a nutshell, there are two main formats in which you should consider encoding your videos:&lt;br /&gt;&lt;br /&gt;1. &lt;a href="http://en.wikipedia.org/wiki/Xvid"&gt;Xvid&lt;/a&gt;: Free and open source, widely used,  your dvd player can probably read/play the transcoded video files.&lt;br /&gt;&lt;br /&gt;2. &lt;a href="http://en.wikipedia.org/wiki/H264"&gt;H.264&lt;/a&gt; ~30% more efficient than Xvid, but not yet widely spread. You should probably not use this format yet unless you do not care about being able to read the files on your dvd player. I do not recommend this format, but it is the one I use for my personnal video library :P.&lt;br /&gt;&lt;br /&gt;You can get &lt;a href="http://www.mplayerhq.hu/design7/dload.html"&gt;MPlayer/Mencoder for your platform here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Commands:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;These commands will encode / rip  the video files into the Xvid format. To use other formats, please refer to the &lt;a href="http://www.mplayerhq.hu/DOCS/HTML/en/index.html"&gt;Mencoder documentation&lt;/a&gt;.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;[For Windows] Once Mplayer / Mencoder is installed, go into the directory that contains the Mencoder.exe binary.&lt;br /&gt;&lt;br /&gt;The you can use the following commands:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Normal Encode:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;resize video (fixed):&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:lucida grande;"&gt;      mencoder input.avi -o output.avi −vf scale=500:375 -oac copy -ovc xvid -xvidencopts bitrate=1500&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;encoding video using mencode:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:lucida grande;"&gt;      mencoder input.avi -o output.avi -oac lavc -ovc xvid -xvidencopts bitrate=1500&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:lucida grande;"&gt;      mencoder input.avi -o output.avi -oac lavc -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1500&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:lucida grande;"&gt;      mencoder input.avi -o output.avi -oac copy -ovc lavc -lavcopts vcodec=mjpeg:vbitrate=4000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;join multiples files:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:lucida grande;"&gt;      mencoder -oac copy -ovc copy -idx -o output.avi *.avi&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; or&lt;br /&gt;&lt;span style="font-size:85%;"&gt;      cat a.avi b.avi &gt; all.avi&lt;/span&gt;&lt;br /&gt; (and then:)&lt;br /&gt;&lt;span style="font-size:85%;"&gt;      mencoder -forceidx -oac copy -ovc copy all.avi -o all_final.avi&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;build slideshow from .jpg:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;      mencoder "mf://*.jpg" -mf fps=0.2 -vf scale=640:480 -o output.avi -ovc xvid -xvidencopts bitrate=1500&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Rip DVDs:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;   keep original (mpeg-2) encoding:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;          mencoder dvd://1 -dvd-device D: -o out.avi -oac copy -ovc copy&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; orig.size, with compression:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;mencoder dvd://1 -dvd-device D: -o out.avi -oac lavc -ovc xvid -xvidencopts bitrate=1500&lt;br /&gt;&lt;/span&gt;&lt;br /&gt; resizing, with keeping aspect ratio (572 x abc):&lt;br /&gt;&lt;span style="font-size:85%;"&gt;          mencoder dvd://1 -dvd-device D: -o out.avi −vf scale −zoom −xy 572 -oac lavc -ovc xvid -xvidencopts bitrate=1500&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; resizing, with keeping aspect ratio and reducing framerate:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;          mencoder dvd://1 -dvd-device D: -ofps 23 -o out.avi -vf scale -zoom -xy 320 -oac lavc -ovc xvid -xvidencopts bitrate=2000&lt;br /&gt;     mencoder dvd://1 -dvd-device D: -ofps 23 -o out.avi −vf scale −zoom −xy 572 -oac lavc -ovc xvid -xvidencopts bitrate=1500&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; resizing, force 640x480:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;          mencoder dvd://1 -dvd-device D: -o out.avi −vf scale=640:480 -oac lavc -ovc xvid -xvidencopts bitrate=1500&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Misc:&lt;br /&gt; If you get error messages about the audio compression, just replace "-oac copy" by "-oac lavc" or "-oac mp3ame"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5441947463553477837-3782339113605828422?l=davidmalin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidmalin.blogspot.com/feeds/3782339113605828422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5441947463553477837&amp;postID=3782339113605828422' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/3782339113605828422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/3782339113605828422'/><link rel='alternate' type='text/html' href='http://davidmalin.blogspot.com/2007/08/easily-encode-your-videos-dvds-with.html' title='Easily Encode your Videos / DVDs with MPlayer/Mencoder'/><author><name>David</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5441947463553477837.post-2815617322719329446</id><published>2007-08-10T05:07:00.001-04:00</published><updated>2007-08-10T12:16:14.191-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='technical'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL Basic Commands</title><content type='html'>SQL is a computer language that can be used to store and manage data. It can be used to store and retrieve information without having to worry about the internal representation of the data, SQL will choose the best way to manage it. Now, with the release of SQLite and bindings for most popular programming languages, it can be very useful in small applications as it will store the database locally and hence does not need a server to work. I have used it in many small applications, one of which I will probably release in this blog in the following weeks.&lt;br /&gt;&lt;br /&gt;There are many free version available, my two favorites being PostgreSQL and SQLite. MySQL is freely available, but it has the drawback of being licensed under the GPL, which means that if you used it in your application, you *have* to release the source code.&lt;br /&gt;&lt;br /&gt;Here are some of the commands you need to get started with SQL:&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-left: 40px;"&gt;Show databases:&lt;br /&gt;  SHOW DATABASES;&lt;br /&gt;Change database:&lt;br /&gt;  USE dbname;&lt;br /&gt;Create table:&lt;br /&gt;  CREATE TABLE tablename (name VARCHAR(20));&lt;br /&gt;Create database:&lt;br /&gt;  CREATE DATABASE dbname;&lt;br /&gt;Create user:&lt;br /&gt;  CREATE USER username;&lt;br /&gt;  CREATE USER username@localhost;&lt;br /&gt;Remove user:&lt;br /&gt;  DROP USER username;&lt;br /&gt;Rename table:&lt;br /&gt;  DROM TABLE tablename;&lt;br /&gt;Grand access rights to the database:&lt;br /&gt;  (&lt;a href="http://dev.mysql.com/doc/refman/4.1/en/adding-users.html"&gt;http://dev.mysql.com/doc/refman/4.1/en/adding-users.html&lt;/a&gt;)&lt;br /&gt;  GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost' IDENTIFIED BY 'some_pass' WITH GRANT OPTION;&lt;br /&gt;  GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%' IDENTIFIED BY 'some_pass' WITH GRANT OPTION;&lt;br /&gt;  GRANT RELOAD,PROCESS ON *.* TO 'admin'@'localhost'; #No password&lt;br /&gt;  GRANT USAGE ON *.* TO 'dummy'@'localhost'; #No password, has to log from localhost, usage = no privileges&lt;br /&gt;  Notes:&lt;br /&gt;      [...]@localhost --&amp;gt; Allows the user to log on FROM localhost.&lt;br /&gt;      GRANT ALL PRIVILEGES ON *.* TO 'youUsername'@'localhost';&lt;br /&gt;Select data:&lt;br /&gt;  SELECT * FROM tablename;&lt;br /&gt;Delete specific data in a table:&lt;br /&gt;  DELETE FROM tablename WHERE property_name='bob';&lt;br /&gt;Delete all data in table:&lt;br /&gt;  DELETE FROM tablename;&lt;br /&gt;  TRUNCATE tablename;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;With these commands you can start building your own custom application. I will post more information on how to embed it in a python program soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5441947463553477837-2815617322719329446?l=davidmalin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidmalin.blogspot.com/feeds/2815617322719329446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5441947463553477837&amp;postID=2815617322719329446' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/2815617322719329446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/2815617322719329446'/><link rel='alternate' type='text/html' href='http://davidmalin.blogspot.com/2007/08/sql-basic-commands.html' title='SQL Basic Commands'/><author><name>David</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5441947463553477837.post-5185842461528575746</id><published>2007-08-09T10:52:00.000-04:00</published><updated>2007-08-16T09:44:54.233-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>ScreenSpy: Record what your Computer is Doing while you are Away</title><content type='html'>I recently wrote a small program in Java that takes a screenshot every second or so and sends it to a FTP of your choice. It could be used to check which websites you children are visiting when you are away, or if they are approached by inappropriate individuals on &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;myspace&lt;/span&gt;. I didn't make it stealthy, the goal is to give an incentive to your youngsters not to visit prohibited websites, not to catch them being naughty.&lt;br /&gt;&lt;br /&gt;You can download it here:&lt;br /&gt;&lt;a href="http://davidmalinstuff.googlepages.com/ScreenSpy_v1p0.zip"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;ScreenSpy&lt;/span&gt; v1.0&lt;/a&gt; (Win, Unix, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;MacOS&lt;/span&gt;) -- Includes source code.&lt;br /&gt;&lt;br /&gt;Usage:&lt;br /&gt;&lt;blockquote style="font-weight: bold;"&gt;java -jar &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;ScreenSpy&lt;/span&gt;.jar ftp.domain.com &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;username&lt;/span&gt; password&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;or, for the win32 .&lt;/span&gt;&lt;span style="font-weight: normal;" class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;exe&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;Screenspy&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;exe&lt;/span&gt; ftp.domain.com &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;username&lt;/span&gt; password&lt;/blockquote&gt;It will run on all major platforms give you have a java virtual machine installed (www.java.com). I also included a win32 binary.&lt;br /&gt;&lt;br /&gt;Have fun!&lt;br /&gt;&lt;br /&gt;By the way, I am looking for others fellow &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;bloggers&lt;/span&gt; to contribute to this blog or to contribute to the source code of my projects. Leave a comment if interested.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:130%;"&gt;*Q&amp;amp;A*&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Matt:&lt;br /&gt;If the screen has been idle, does it save space not hold off sending anything?&lt;br /&gt;&lt;br /&gt;A:&lt;br /&gt;Unfortunately not. It is a feature that could be added. Anyone has a good idea on how to implement that in Java? Save checksums of the pictures and compare them? If lots of people feel strongly about this I might try to find a solution...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5441947463553477837-5185842461528575746?l=davidmalin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidmalin.blogspot.com/feeds/5185842461528575746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5441947463553477837&amp;postID=5185842461528575746' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/5185842461528575746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/5185842461528575746'/><link rel='alternate' type='text/html' href='http://davidmalin.blogspot.com/2007/08/screenspy-spy-on-your-children-or.html' title='ScreenSpy: Record what your Computer is Doing while you are Away'/><author><name>David</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5441947463553477837.post-4952450591699158936</id><published>2007-08-07T07:40:00.004-04:00</published><updated>2011-06-21T22:28:21.475-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='technical'/><title type='text'>Batch Resize and Compress your Images with ImageMagick</title><content type='html'>.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Web Page Moved!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;New location:&amp;nbsp;&lt;a href="http://david-web.appspot.com/cnt/CompressImagesImageMagick/"&gt;http://david-web.appspot.com/cnt/CompressImagesImageMagick/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Old Entry (Information Might Be Deprecated)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It regularly amazes me how little people know about the capabilities of the .jpeg .jpg format and how, as a result, their image libraries are easily four to five time as big as they need to be.&lt;br /&gt;&lt;br /&gt;The method that I am going to show here is going to reduce the size of every picture in a directory to about 500k. This compression will reduce the quality of the picture, but not enough to make it noticeable to the naked eye.&lt;br /&gt;&lt;br /&gt;First of all, go download the excellent ImageMagick software at:&lt;br /&gt;http://www.imagemagick.org/ (dl: &lt;a href="http://www.imagemagick.org/script/binary-releases.php#windows"&gt;win&lt;/a&gt; &lt;a href="http://www.imagemagick.org/script/binary-releases.php#unix"&gt;unix&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;Once the software is installed, go to the directory containing the files (it would be wise to back-up your pictures first) and type in the command line:&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;span style="font-family: 'times new roman'; font-size: 130%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote style="font-weight: bold;"&gt;&lt;span style="font-family: 'times new roman'; font-size: 130%;"&gt;mogrify -resize "2048x2048&amp;gt;" -quality 75 *.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;jpg&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-family: 'times new roman'; font-size: 130%;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;What it will do is that it will take each picture individually, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;resize&lt;/span&gt; it to 2048x[...] pixels and change the quality setting. I chose 75 because it yields the greatest compression/quality loss ratio. Check it out for yourself, I am sure you can't tell the difference between the compressed picture and the original. This typically reduces the size of a 3,000 &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;Kb&lt;/span&gt; picture to under 500&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;Kb&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Here are some other cool things you can do with ImageMagick intalled:&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-size: 85%;"&gt;&lt;br /&gt;Get the picture properties:&lt;br /&gt;identify -verbose &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4" style="font-size: 85%;"&gt;abc&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;.&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5" style="font-size: 85%;"&gt;jpg&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;br /&gt;&lt;br /&gt;Compare the diff between two pictures:&lt;br /&gt;compare -metric MAE First.&lt;/span&gt;       &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6" style="font-size: 85%;"&gt;png&lt;/span&gt;&lt;span style="font-size: 85%;"&gt; Second.&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7" style="font-size: 85%;"&gt;jpg&lt;/span&gt;&lt;span style="font-size: 85%;"&gt; diff.&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8" style="font-size: 85%;"&gt;png&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;br /&gt;&lt;br /&gt;Burn a logo into a pic:&lt;br /&gt;(more on composing: http://www.imagemagick.org/Usage/compose/)&lt;br /&gt;(Use white background)&lt;br /&gt;composite -gravity &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9" style="font-size: 85%;"&gt;NorthWest&lt;/span&gt;&lt;span style="font-size: 85%;"&gt; -compose color-burn logo.&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10" style="font-size: 85%;"&gt;png&lt;/span&gt;&lt;span style="font-size: 85%;"&gt; image.&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11" style="font-size: 85%;"&gt;jpg&lt;/span&gt;&lt;span style="font-size: 85%;"&gt; out.&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12" style="font-size: 85%;"&gt;jpg&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;br /&gt;&lt;br /&gt;Write text on all pictures:&lt;br /&gt;(x,y , &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13" style="font-size: 85%;"&gt;dx&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;,&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14" style="font-size: 85%;"&gt;dy&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;) 0,0 = original size&lt;br /&gt;&lt;/span&gt;            &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15" style="font-size: 85%;"&gt;    mogrify&lt;/span&gt;&lt;span style="font-size: 85%;"&gt; -draw "image color-burn 4,4 0,0 'logo.&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16" style="font-size: 85%;"&gt;png&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;'" *.&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17" style="font-size: 85%;"&gt;jpg&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;br /&gt;convert -draw "image color-burn 4,4 0,0 'logo.&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18" style="font-size: 85%;"&gt;png&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;'" *.&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19" style="font-size: 85%;"&gt;jpg&lt;/span&gt;&lt;span style="font-size: 85%;"&gt; out.&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20" style="font-size: 85%;"&gt;jpg&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;br /&gt;&lt;br /&gt;More at:&lt;br /&gt;http://www.imagemagick.org/script/composite.php&lt;br /&gt;http://www.imagemagick.org/Usage/&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5441947463553477837-4952450591699158936?l=davidmalin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidmalin.blogspot.com/feeds/4952450591699158936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5441947463553477837&amp;postID=4952450591699158936' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/4952450591699158936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5441947463553477837/posts/default/4952450591699158936'/><link rel='alternate' type='text/html' href='http://davidmalin.blogspot.com/2007/08/batch-resize-and-compress-your-images.html' title='Batch Resize and Compress your Images with ImageMagick'/><author><name>David</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
