CARVIEW |
Select Language
HTTP/2 200
server: nginx
content-type: text/html;charset=utf-8
cache-control: must-revalidate
expires: Fri, 01 Jan 1999 00:00:00 GMT
set-cookie: trac_form_token=7e67b4e2426af2dea6aad1a9; HttpOnly; Path=/; Secure
set-cookie: trac_session=681d5783c70def937ab0e9cd; expires=Tue, 21 Oct 2025 05:30:56 GMT; HttpOnly; Path=/; Secure
strict-transport-security: max-age=31536000; includeSubDomains; preload
permissions-policy: interest-cohort=()
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
accept-ranges: bytes
via: 1.1 varnish, 1.1 varnish
date: Wed, 23 Jul 2025 05:30:56 GMT
x-served-by: cache-fra-etou8220039-FRA, cache-bom-vanm7210066-BOM
x-cache: MISS, MISS
x-cache-hits: 0, 0
x-timer: S1753248657.559809,VS0,VE325
vary: Accept-Encoding
CookBookScriptsDjget – Django
Back to Top
Django
The web framework for perfectionists with deadlines.
Issues
A bash script to fetch files from the Django website.
Example usage:
cd ~/mytemplates djget https://code.djangoproject.com/browser/djangoproject.com/django_website/templates/base_community.html
This fetches the named file and puts it in the current directory with the basename which, in this case, is base_community.html.
Here is the script:
#! /bin/bash filename=$1 filebasename=`basename ${filename}` wgetfilename=${filename}?format=txt wget ${wgetfilename} if [ $? = 0 ]; then mv ${filebasename}?format=txt ${filebasename} else echo wget failed for ${filename} fi
Comment: You could just use wget's "-O" parameter to specify the output file directly, the script could be a one-liner
wget -O `basename $1` "$1?format=txt"
Last modified
15 years ago
Last modified on Feb 2, 2010, 12:30:46 AM
Note:
See TracWiki
for help on using the wiki.
Download in other formats:
Django Links
Learn More
Get Involved
Follow Us
- Hosting by In-kind donors
- Design by Threespot &
© 2005-2025 Django SoftwareFoundation unless otherwise noted. Django is a registered trademark of the Django Software Foundation.