Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set file size programmatically #60

Closed
danirabbit opened this issue Jan 11, 2015 · 3 comments · Fixed by #605
Closed

Set file size programmatically #60

danirabbit opened this issue Jan 11, 2015 · 3 comments · Fixed by #605

Comments

@danirabbit
Copy link
Member

So that we don't have to modify this page every time the iso changes (creating potential for human error), we should be setting the file size of the ISO programmatically.

@martpie martpie mentioned this issue Jan 12, 2015
5 tasks
@cassidyjames
Copy link
Contributor

Are we still planning to link to Sourceforge for the download? Perhaps they have an API to get the filesize? If not, I'm totally okay with it being manual as it's not going to change often at all.

@martpie
Copy link
Collaborator

martpie commented Jan 12, 2015

I didn't find any "filesize" in sourceforge api. Anyway Cassidy is right, we can just show something like "around 8xx mb".

@emersion
Copy link
Collaborator

There is a way to do this with Sourceforge API: http://sourceforge.net/p/forge/documentation/API%20-%20Classic/ > "File Releases"

For each file in a feed (e.g. http://sourceforge.net/projects/limechat/rss), there is a filesize attribute (in media:content).

    <item>
      <title><![CDATA[/limechat/LimeChat_2.41.tbz]]></title>
      <link>http://sourceforge.net/projects/limechat/files/limechat/LimeChat_2.41.tbz/download</link>
      <guid>http://sourceforge.net/projects/limechat/files/limechat/LimeChat_2.41.tbz/download</guid>
      <pubDate>Tue, 06 May 2014 04:44:32 UT</pubDate>
      <description><![CDATA[/limechat/LimeChat_2.41.tbz]]></description>
      <files:sf-file-id xmlns:files="https://sourceforge.net/api/files.rdf#">12529123</files:sf-file-id>
      <files:extra-info xmlns:files="https://sourceforge.net/api/files.rdf#">POSIX tar archive (bzip2 compressed data)</files:extra-info>
      <media:content xmlns:media="http://video.search.yahoo.com/mrss/" type="application/x-bzip2; charset=binary" url="http://sourceforge.net/projects/limechat/files/limechat/LimeChat_2.41.tbz/download" filesize="1846497"><media:hash algo="md5">6104656879ccaa4c114e6a24e33b6848</media:hash></media:content>
    </item>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants