Utility to download fonts, js etc

Some time ago I read a post either here or on OGF, where someone gave a tip about a utility that parses a website and downloads all webfonts and js files referenced and saves them locally.
I have googled and searched everywhere but I just cant find that utility again, does anyone know what I'm talking about?

Comments

  • wget --mirror?

    coupons for 3 months free of Netcup RS 1000 G9.5 root server (88€/year): [2915nc16765569654, 2915nc16765569653, 2915nc16765569652, 2915nc16765569651, 2915nc16765569650]

  • I might have expressed myself a bit unclear.
    I'm talking about webdesign here. A lot of templates and themes use webfonts or libraries that are referenced with their full URI. This utility would parse such a template/theme/website and download the content and rewrite the code to point to the local copy instead.

  • you're going to need a web scraper, just learn them on your own with python+beautifulsoup to parse the web page. upon css/font type, do a GET request.
    if you that lazy look at github with 'web scraper' tag

    Thanked by (1)yoursunny

    Fuck this 24/7 internet spew of trivia and celebrity bullshit.

  • @rcy026 said: A lot of templates and themes use webfonts or libraries that are referenced with their full URI.

    https://explainshell.com/explain?cmd=wget+-k

  • Just to clarify, I'm talking about when designing websites here, not scraping websites. It's a utility that you can point to a css file on your harddrive that is part of a website project and it will parse the file and download the dependencies.
    This is not a webscraper.

  • edited February 2023

    https://gulpjs.com/

    Chat GPT says:

    Here's an example of how you can use Gulp to parse a CSS file and download its dependencies:

    Install Gulp by running the following command in your terminal:

    npm install --global gulp-cli

    Create a new project directory and navigate to it:

    mkdir my-project
    cd my-project

    Create a new package.json file for your project:

    npm init

    Install Gulp and its plugins:

    npm install gulp gulp-postcss gulp-sourcemaps autoprefixer cssnano --save-dev

    Create a new gulpfile.js file in your project directory:

    touch gulpfile.js

    Open gulpfile.js in your text editor and add the following code:

    const gulp = require('gulp');
    const postcss = require('gulp-postcss');
    const sourcemaps = require('gulp-sourcemaps');
    const autoprefixer = require('autoprefixer');
    const cssnano = require('cssnano');
    
    gulp.task('styles', function () {
      return gulp.src('path/to/your/css/file.css')
        .pipe(sourcemaps.init())
        .pipe(postcss([autoprefixer(), cssnano()]))
        .pipe(sourcemaps.write('.'))
        .pipe(gulp.dest('path/to/your/destination/folder'));
    });
    

    This code defines a Gulp task called styles that reads your CSS file, parses it using PostCSS, and applies the Autoprefixer and CSSnano plugins to it. The resulting CSS is then saved to a destination folder with sourcemaps.

    Run the styles task by running the following command in your terminal:

    gulp styles

    This will execute the styles task and generate a new CSS file in the specified destination folder, along with any dependencies it requires.

    That's it! You can now use Gulp to parse and download dependencies for your CSS files.

  • YmpkerYmpker OGContent Writer
    edited February 2023

    GDPress does this for WordPress, kinda.
    OMGF for gfonts on wp sites.

  • @Ympker said:
    GDPress does this for WordPress, kinda.

    This is the kind of thing I was talking about. It's not the one I had in mind, but it is similar.

    Thanked by (1)Ympker
Sign In or Register to comment.